'widget_league_table widget_sp_league_table', 'description' => __( 'Display a league table.', 'sportspress' ) ); parent::__construct('sp_league_table', __( 'SportsPress League Table', 'sportspress' ), $widget_ops); } function widget( $args, $instance ) { extract($args); $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base); $id = empty($instance['id']) ? null : $instance['id']; $number = empty($instance['number']) ? null : $instance['number']; $columns = empty($instance['columns']) ? null : $instance['columns']; $show_team_logo = empty($instance['show_team_logo']) ? false : $instance['show_team_logo']; $show_full_table_link = empty($instance['show_full_table_link']) ? false : $instance['show_full_table_link']; echo $before_widget; if ( $title ) echo $before_title . $title . $after_title; echo '
'sp_table', 'name' => $this->get_field_name('id'), 'id' => $this->get_field_id('id'), 'selected' => $id, 'values' => 'ID', 'class' => 'widefat', ); if ( ! sp_dropdown_pages( $args ) ): sp_post_adder( 'sp_table', __( 'Add New', 'sportspress' ) ); endif; ?>
'sp_column',
'numberposts' => -1,
'posts_per_page' => -1,
'orderby' => 'menu_order',
'order' => 'ASC'
);
$the_columns = get_posts( $args );
$field_name = $this->get_field_name('columns') . '[]';
$field_id = $this->get_field_id('columns');
?>
>
>