/**
  * Output the metabox
  */
 public static function output($post)
 {
     global $pagenow;
     if ($pagenow != 'post-new.php') {
         $team = new SP_Team($post);
         list($data, $checked) = $team->tables(true);
         self::table($data, $checked);
     } else {
         printf(__('No results found.', 'sportspress'));
     }
 }
Ejemplo n.º 2
0
<?php

/**
 * Team League Tables
 *
 * @author 		ThemeBoy
 * @package 	SportsPress/Templates
 * @version     1.8.7
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
if (!isset($id)) {
    $id = get_the_ID();
}
$team = new SP_Team($id);
$tables = $team->tables();
foreach ($tables as $table) {
    if (!$table) {
        continue;
    }
    sp_get_template('league-table.php', array('id' => $table->ID, 'highlight' => $id));
}