Fix permissions, add post filters
This commit is contained in:
@@ -4,166 +4,11 @@ global $sportspress_sports;
|
||||
$sportspress_sports['soccer'] = array(
|
||||
'name' => __( 'Association Football (Soccer)', 'sportspress' ),
|
||||
'posts' => array(
|
||||
// Table Columns
|
||||
'sp_column' => array(
|
||||
array(
|
||||
'post_title' => 'P',
|
||||
'post_name' => 'p',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$eventsplayed',
|
||||
'sp_format' => 'integer',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => 'W',
|
||||
'post_name' => 'w',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$w',
|
||||
'sp_format' => 'integer',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => 'D',
|
||||
'post_name' => 'd',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$d',
|
||||
'sp_format' => 'integer',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => 'L',
|
||||
'post_name' => 'l',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$l',
|
||||
'sp_format' => 'integer',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => 'F',
|
||||
'post_name' => 'f',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$goalsfor',
|
||||
'sp_priority' => '3',
|
||||
'sp_order' => 'DESC',
|
||||
'sp_format' => 'integer',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => 'A',
|
||||
'post_name' => 'a',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$goalsagainst',
|
||||
'sp_format' => 'integer',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => 'GD',
|
||||
'post_name' => 'gd',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$goalsfor - $goalsagainst',
|
||||
'sp_priority' => '2',
|
||||
'sp_order' => 'DESC',
|
||||
'sp_format' => 'integer',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => 'Pts',
|
||||
'post_name' => 'pts',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$w * 3 + $d',
|
||||
'sp_priority' => '1',
|
||||
'sp_order' => 'DESC',
|
||||
'sp_format' => 'integer',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
// Player Statistics
|
||||
'sp_statistic' => array(
|
||||
array(
|
||||
'post_title' => 'Goals',
|
||||
'post_name' => 'goals',
|
||||
'meta' => array(
|
||||
'sp_equation' => '',
|
||||
'sp_priority' => '1',
|
||||
'sp_order' => 'DESC',
|
||||
'sp_format' => 'integer',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => 'Assists',
|
||||
'post_name' => 'assists',
|
||||
'meta' => array(
|
||||
'sp_equation' => '',
|
||||
'sp_format' => 'integer',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => 'Yellow Cards',
|
||||
'post_name' => 'yellowcards',
|
||||
'meta' => array(
|
||||
'sp_equation' => '',
|
||||
'sp_format' => 'integer',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => 'Red Cards',
|
||||
'post_name' => 'redcards',
|
||||
'meta' => array(
|
||||
'sp_equation' => '',
|
||||
'sp_format' => 'integer',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
// Player Metrics
|
||||
'sp_metric' => array(
|
||||
array(
|
||||
'post_title' => 'Appearances',
|
||||
'post_name' => 'appearances',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$eventsplayed',
|
||||
'sp_format' => 'integer',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => 'Height',
|
||||
'post_name' => 'height',
|
||||
'meta' => array(
|
||||
'sp_equation' => '',
|
||||
'sp_format' => 'integer',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => 'Weight',
|
||||
'post_name' => 'weight',
|
||||
'meta' => array(
|
||||
'sp_equation' => '',
|
||||
'sp_format' => 'integer',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
// Results
|
||||
'sp_result' => array(
|
||||
array(
|
||||
'post_title' => 'Goals',
|
||||
'post_title' => __( 'Goals', 'sportspress' ),
|
||||
'post_name' => 'goals',
|
||||
'meta' => array(
|
||||
'sp_format' => 'integer',
|
||||
),
|
||||
),
|
||||
),
|
||||
// Outcomes
|
||||
@@ -181,5 +26,120 @@ $sportspress_sports['soccer'] = array(
|
||||
'post_name' => 'l',
|
||||
),
|
||||
),
|
||||
// Table Columns
|
||||
'sp_column' => array(
|
||||
array(
|
||||
'post_title' => 'P',
|
||||
'post_name' => 'p',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$eventsplayed',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => 'W',
|
||||
'post_name' => 'w',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$w',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => 'D',
|
||||
'post_name' => 'd',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$d',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => 'L',
|
||||
'post_name' => 'l',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$l',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => 'F',
|
||||
'post_name' => 'f',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$goalsfor',
|
||||
'sp_precision' => 1,
|
||||
'sp_priority' => '3',
|
||||
'sp_order' => 'DESC',
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => 'A',
|
||||
'post_name' => 'a',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$goalsagainst',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => 'GD',
|
||||
'post_name' => 'gd',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$goalsfor - $goalsagainst',
|
||||
'sp_precision' => 1,
|
||||
'sp_priority' => '2',
|
||||
'sp_order' => 'DESC',
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => 'Pts',
|
||||
'post_name' => 'pts',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$w * 3 + $d',
|
||||
'sp_precision' => 1,
|
||||
'sp_priority' => '1',
|
||||
'sp_order' => 'DESC',
|
||||
),
|
||||
),
|
||||
),
|
||||
// Player Metrics
|
||||
'sp_metric' => array(
|
||||
array(
|
||||
'post_title' => __( 'Height', 'sportspress' ),
|
||||
'post_name' => 'height',
|
||||
),
|
||||
array(
|
||||
'post_title' => __( 'Weight', 'sportspress' ),
|
||||
'post_name' => 'weight',
|
||||
),
|
||||
),
|
||||
// Player Statistics
|
||||
'sp_statistic' => array(
|
||||
array(
|
||||
'post_title' => __( 'Goals', 'sportspress' ),
|
||||
'post_name' => 'goals',
|
||||
'meta' => array(
|
||||
'sp_calculate' => 'sum',
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => __( 'Assists', 'sportspress' ),
|
||||
'post_name' => 'assists',
|
||||
'meta' => array(
|
||||
'sp_calculate' => 'sum',
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => __( 'Yellow Cards', 'sportspress' ),
|
||||
'post_name' => 'yellowcards',
|
||||
'meta' => array(
|
||||
'sp_calculate' => 'sum',
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => __( 'Red Cards', 'sportspress' ),
|
||||
'post_name' => 'redcards',
|
||||
'meta' => array(
|
||||
'sp_calculate' => 'sum',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user