function widget($args, $instance) { global $theme_option; $title = apply_filters('widget_title', $instance['title']); $category = $instance['category']; $num_fetch = $instance['num_fetch']; $full_table_text = $instance['full_table_text']; $full_table_link = $instance['full_table_link']; // Opening of widget echo $args['before_widget']; // Open of title tag if (!empty($title)) { echo $args['before_title'] . $title . $args['after_title']; } if (function_exists('gdlr_print_league_table_item')) { gdlr_print_league_table_item(array('style' => 'summary', 'button-link' => $full_table_link, 'button-text' => $full_table_text, 'num-display' => $num_fetch, 'category' => $category)); } // Closing of widget echo $args['after_widget']; }
function gdlr_league_table_item($type, $settings = array()) { if ($type == 'league-table') { gdlr_print_league_table_item($settings); } }