';
$data = get_game_list_category($cat, $amount);
$games = $data['results'];
foreach ( $games as $game ) { ?>
';
}
function list_games_by_categories($cat, $amount){
// Deprecated, not used anymore
echo '
';
$data = get_game_list_categories($cat, $amount);
$games = $data['results'];
foreach ( $games as $game ) { ?>
';
}
function show_user_profile_header(){
global $login_user;
if($login_user){
?>
'Head',
'id' => 'head',
'description' => 'HTML element before </head>',
));
register_sidebar(array(
'name' => 'Sidebar 1',
'id' => 'sidebar-1',
'description' => 'Right sidebar',
));
register_sidebar(array(
'name' => 'Footer 1',
'id' => 'footer-1',
'description' => 'Footer 1',
));
register_sidebar(array(
'name' => 'Footer 2',
'id' => 'footer-2',
'description' => 'Footer 2',
));
register_sidebar(array(
'name' => 'Footer 3',
'id' => 'footer-3',
'description' => 'Footer 3',
));
register_sidebar(array(
'name' => 'Top Content',
'id' => 'top-content',
'description' => 'Above main content element. Recommended for Ad banner placement.',
));
register_sidebar(array(
'name' => 'Bottom Content',
'id' => 'bottom-content',
'description' => 'Under main content element. Recommended for Ad banner placement.',
));
register_sidebar(array(
'name' => 'Homepage Bottom',
'id' => 'homepage-bottom',
'description' => 'Bottom content on homepage. Can be used to show site description or explaining about your site.',
));
register_sidebar(array(
'name' => 'Footer Copyright',
'id' => 'footer-copyright',
'description' => 'Copyright section.',
));
class widget_game_list extends Widget {
function __construct() {
$this->name = 'Game List';
$this->id_base = 'game-list';
$this->description = 'Show game list ( Grid ). Is recommedned to put this on sidebar.';
}
public function widget( $instance, $args = array() ){
$label = isset($instance['label']) ? $instance['label'] : '';
$class = isset($instance['class']) ? $instance['class'] : 'widget';
$type = isset($instance['type']) ? $instance['type'] : 'new';
$amount = isset($instance['amount']) ? $instance['amount'] : 9;
echo '
';
if($label != ''){
$icon = 'fa-plus';
if($type != 'new'){
$icon = 'fa-gamepad';
}
echo '';
}
list_games($type, (int)$amount);
echo '
';
}
public function form( $instance = array() ){
if(!isset( $instance['label'] )){
$instance['label'] = '';
}
if(!isset( $instance['type'] )){
$instance['type'] = 'new';
}
if(!isset( $instance['amount'] )){
$instance['amount'] = 9;
}
if(!isset( $instance['class'] )){
$instance['class'] = 'widget';
}
?>