Fix permissions, add post filters
This commit is contained in:
@@ -4,6 +4,32 @@ global $sportspress_sports;
|
||||
$sportspress_sports['rugby'] = array(
|
||||
'name' => __( 'Rugby', 'sportspress' ),
|
||||
'posts' => array(
|
||||
// Results
|
||||
'sp_result' => array(
|
||||
array(
|
||||
'post_title' => __( 'Points', 'sportspress' ),
|
||||
'post_name' => 'points',
|
||||
),
|
||||
array(
|
||||
'post_title' => __( 'Bonus', 'sportspress' ),
|
||||
'post_name' => 'bonus',
|
||||
),
|
||||
),
|
||||
// Outcomes
|
||||
'sp_outcome' => array(
|
||||
array(
|
||||
'post_title' => 'W',
|
||||
'post_name' => 'w',
|
||||
),
|
||||
array(
|
||||
'post_title' => 'D',
|
||||
'post_name' => 'd',
|
||||
),
|
||||
array(
|
||||
'post_title' => 'L',
|
||||
'post_name' => 'l',
|
||||
),
|
||||
),
|
||||
// Table Columns
|
||||
'sp_column' => array(
|
||||
array(
|
||||
@@ -11,6 +37,7 @@ $sportspress_sports['rugby'] = array(
|
||||
'post_name' => 'p',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$eventsplayed',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
array(
|
||||
@@ -18,6 +45,7 @@ $sportspress_sports['rugby'] = array(
|
||||
'post_name' => 'w',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$w',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
array(
|
||||
@@ -25,6 +53,7 @@ $sportspress_sports['rugby'] = array(
|
||||
'post_name' => 'd',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$d',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
array(
|
||||
@@ -32,54 +61,100 @@ $sportspress_sports['rugby'] = array(
|
||||
'post_name' => 'l',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$l',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => 'B',
|
||||
'post_name' => 'b',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$b',
|
||||
'sp_equation' => '$bonus',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => 'F',
|
||||
'post_name' => 'f',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$ptsfor',
|
||||
'sp_equation' => '$pointsfor',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => 'A',
|
||||
'post_name' => 'a',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$ptsagainst',
|
||||
'sp_equation' => '$pointsagainst',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => '+/-',
|
||||
'post_name' => 'pd',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$ptsfor - $ptsagainst',
|
||||
'sp_equation' => '$pointsfor - $pointsagainst',
|
||||
'sp_precision' => 1,
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => 'Pts',
|
||||
'post_name' => 'pts',
|
||||
'meta' => array(
|
||||
'sp_equation' => '( $w + $b ) * 2 + $d',
|
||||
'sp_equation' => '( $w + $bonus ) * 2 + $d',
|
||||
'sp_precision' => 1,
|
||||
'sp_priority' => '1',
|
||||
'sp_order' => 'DESC',
|
||||
),
|
||||
),
|
||||
),
|
||||
// Statistics
|
||||
// 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(
|
||||
),
|
||||
// Results
|
||||
'sp_result' => array(
|
||||
),
|
||||
// Outcomes
|
||||
'sp_outcome' => array(
|
||||
array(
|
||||
'post_title' => __( 'Points', 'sportspress' ),
|
||||
'post_name' => 'points',
|
||||
'meta' => array(
|
||||
'sp_calculate' => 'sum',
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => __( 'Tries', 'sportspress' ),
|
||||
'post_name' => 'tries',
|
||||
'meta' => array(
|
||||
'sp_calculate' => 'sum',
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => __( 'Conversions', 'sportspress' ),
|
||||
'post_name' => 'conversions',
|
||||
'meta' => array(
|
||||
'sp_calculate' => 'sum',
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => __( 'Penalty Goals', 'sportspress' ),
|
||||
'post_name' => 'penaltygoals',
|
||||
'meta' => array(
|
||||
'sp_calculate' => 'sum',
|
||||
),
|
||||
),
|
||||
array(
|
||||
'post_title' => __( 'Drop Goals', 'sportspress' ),
|
||||
'post_name' => 'dropgoals',
|
||||
'meta' => array(
|
||||
'sp_calculate' => 'sum',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user