/** * Output the metabox */ public static function output($post) { $event = new SP_Event($post); list($labels, $columns, $stats, $teams, $formats, $order) = $event->performance(true); if ('yes' == get_option('sportspress_event_performance_show_minutes', 'yes')) { $timeline = $event->timeline(true); } else { $timeline = false; } // Determine if columns are auto or manual if ('manual' == get_option('sportspress_event_performance_columns', 'auto')) { $manual = true; } else { $manual = false; } // Determine if we need checkboxes if ($manual) { $has_checkboxes = true; } else { $has_checkboxes = false; } // Get player number option $numbers = 'yes' == get_option('sportspress_event_show_player_numbers', 'yes') ? true : false; // Get positions $positions = array(); if ('yes' == get_option('sportspress_event_show_position', 'yes') && taxonomy_exists('sp_position')) { $args = array('hide_empty' => false, 'parent' => 0, 'include_children' => true); $positions = get_terms('sp_position', $args); } // Get status option if ('yes' == get_option('sportspress_event_show_status', 'yes')) { $status = true; } else { $status = false; } // Apply filters to labels $labels = apply_filters('sportspress_event_performance_labels_admin', $labels); // Check if individual mode $is_individual = get_option('sportspress_load_individual_mode_module', 'no') === 'yes' ? true : false; self::tables($post->ID, $stats, $labels, $columns, $teams, $has_checkboxes, $positions, $status, $formats, $order, $numbers, $is_individual, $timeline); }