diff --git a/admin/post-types/column.php b/admin/post-types/column.php index 6b7a7fc6..f2fcef18 100644 --- a/admin/post-types/column.php +++ b/admin/post-types/column.php @@ -23,9 +23,11 @@ function sp_column_edit_columns() { $columns = array( 'cb' => '', 'title' => __( 'Label', 'sportspress' ), + 'sp_key' => __( 'Key', 'sportspress' ), + 'sp_format' => __( 'Format', 'sportspress' ), + 'sp_precision' => __( 'Precision', 'sportspress' ), 'sp_equation' => __( 'Equation', 'sportspress' ), 'sp_order' => __( 'Sort Order', 'sportspress' ), - 'sp_abbreviation' => __( 'Abbreviation', 'sportspress' ) ); return $columns; } @@ -36,15 +38,34 @@ function sp_column_meta_init() { } function sp_column_details_meta( $post ) { + global $sportspress_config_formats; + $equation = explode( ' ', get_post_meta( $post->ID, 'sp_equation', true ) ); $order = get_post_meta( $post->ID, 'sp_order', true ); $priority = get_post_meta( $post->ID, 'sp_priority', true ); $precision = get_post_meta( $post->ID, 'sp_precision', true ); - $abbreviation = get_post_meta( $post->ID, 'sp_abbreviation', true ); // Defaults if ( $precision == '' ) $precision = 1; ?> +
+
+ +
++
+ +
++
+ +
-
--
- -
--
- -
'', 'title' => __( 'Label', 'sportspress' ), 'sp_key' => __( 'Key', 'sportspress' ), - 'sp_abbreviation' => __( 'Abbreviation', 'sportspress' ) ); return $columns; } @@ -35,11 +34,10 @@ function sp_outcome_meta_init() { } function sp_outcome_details_meta( $post ) { - $abbreviation = get_post_meta( $post->ID, 'sp_abbreviation', true ); - ?> -+?> +
- +
'', 'title' => __( 'Label', 'sportspress' ), 'sp_key' => __( 'Key', 'sportspress' ), - 'sp_abbreviation' => __( 'Abbreviation', 'sportspress' ) + 'sp_format' => __( 'Format', 'sportspress' ), ); return $columns; } @@ -35,11 +35,21 @@ function sp_result_meta_init() { } function sp_result_details_meta( $post ) { - $abbreviation = get_post_meta( $post->ID, 'sp_abbreviation', true ); + global $sportspress_config_formats; ?> -+
- + +
++
+
+
+ +
++
+
+
+ +
+
-
-
- -
--
-
ID, 'sp_abbreviation', true ); - $totals['streak'] = ( $abbreviation ? $abbreviation : $outcome->post_title ) . $streak['count']; + $totals['streak'] = $outcome->post_title . $streak['count']; endif; // Generate array of placeholder values for each league diff --git a/admin/presets/baseball.php b/admin/presets/baseball.php index 2e9dd5f0..f16db198 100644 --- a/admin/presets/baseball.php +++ b/admin/presets/baseball.php @@ -7,181 +7,159 @@ $sportspress_sports['baseball'] = array( // Columns 'sp_column' => array( array( - 'post_title' => __( 'Wins', 'sportspress' ), + 'post_title' => 'W', + 'post_name' => 'w', 'meta' => array( - 'sp_equation' => '$win', - 'sp_abbreviation' => __( 'W', 'sportspress' ), + 'sp_equation' => '$w', 'sp_priority' => 1, - 'sp_order' => 'DESC' - ) + 'sp_order' => 'DESC', + ), ), array( - 'post_title' => __( 'Losses', 'sportspress' ), + 'post_title' => 'L', + 'post_name' => 'l', 'meta' => array( - 'sp_equation' => '$loss', - 'sp_abbreviation' => __( 'L', 'sportspress' ), + 'sp_equation' => '$l', 'sp_priority' => 2, - 'sp_order' => 'ASC' - ) + 'sp_order' => 'ASC', + ), ), array( - 'post_title' => __( 'Win Percentage', 'sportspress' ), + 'post_title' => 'Pct', + 'post_name' => 'pct', 'meta' => array( - 'sp_equation' => '$win / $eventsplayed', - 'sp_abbreviation' => __( 'Pct', 'sportspress' ) - ) + 'sp_equation' => '$w / $eventsplayed', + ), ), array( - 'post_title' => __( 'Games Back', 'sportspress' ), + 'post_title' => 'GB', + 'post_name' => 'gb', 'meta' => array( - 'sp_equation' => '( $winmax + $loss - $win - $lossmax ) / 2', - 'sp_abbreviation' => __( 'GB', 'sportspress' ) - ) + 'sp_equation' => '( $wmax + $l - $w - $lmax ) / 2', + ), ), array( - 'post_title' => __( 'Runs Scored', 'sportspress' ), + 'post_title' => 'RS', + 'post_name' => 'rs', 'meta' => array( 'sp_equation' => '$rfor', - 'sp_abbreviation' => __( 'RS', 'sportspress' ), 'sp_priority' => 3, - 'sp_order' => 'DESC' - ) + 'sp_order' => 'DESC', + ), ), array( - 'post_title' => __( 'Runs Against', 'sportspress' ), + 'post_title' => 'RA', + 'post_name' => 'ra', 'meta' => array( 'sp_equation' => '$ragainst', - 'sp_abbreviation' => __( 'RA', 'sportspress' ) - ) + ), ), array( - 'post_title' => __( 'Streak', 'sportspress' ), + 'post_title' => 'Strk', + 'post_name' => 'strk', 'meta' => array( 'sp_equation' => '$streak', - 'sp_abbreviation' => __( 'Strk', 'sportspress' ) - ) - ) + ), + ), ), // Statistics 'sp_statistic' => array( - array( - 'post_title' => __( 'Appearances', 'sportspress' ), - 'meta' => array( - 'sp_equation' => '$eventsplayed' - ) - ), - array( - 'post_title' => __( 'Goals', 'sportspress' ), - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Assists', 'sportspress' ), - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Yellow Cards', 'sportspress' ), - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Red Cards', 'sportspress' ), - 'meta' => array( 'sp_equation' => '' ) - ) ), // Results 'sp_result' => array( array( - 'post_title' => __( '1st Inning', 'sportspress' ), + 'post_title' => '1', + 'post_name' => 'first', 'meta' => array( - 'sp_abbreviation' => __( '1', 'sportspress' ) - ) + ), ), array( - 'post_title' => __( '2nd Inning', 'sportspress' ), + 'post_title' => '2', + 'post_name' => 'second', 'meta' => array( - 'sp_abbreviation' => __( '2', 'sportspress' ) - ) + ), ), array( - 'post_title' => __( '3rd Inning', 'sportspress' ), + 'post_title' => '3', + 'post_name' => 'third', 'meta' => array( - 'sp_abbreviation' => __( '3', 'sportspress' ) - ) + ), ), array( - 'post_title' => __( '4th Inning', 'sportspress' ), + 'post_title' => '4', + 'post_name' => 'fourth', 'meta' => array( - 'sp_abbreviation' => __( '4', 'sportspress' ) - ) + ), ), array( - 'post_title' => __( '5th Inning', 'sportspress' ), + 'post_title' => '5', + 'post_name' => 'fifth', 'meta' => array( - 'sp_abbreviation' => __( '5', 'sportspress' ) - ) + ), ), array( - 'post_title' => __( '6th Inning', 'sportspress' ), + 'post_title' => '6', + 'post_name' => 'sixth', 'meta' => array( - 'sp_abbreviation' => __( '6', 'sportspress' ) - ) + ), ), array( - 'post_title' => __( '7th Inning', 'sportspress' ), + 'post_title' => '7', + 'post_name' => 'seventh', 'meta' => array( - 'sp_abbreviation' => __( '7', 'sportspress' ) - ) + ), ), array( - 'post_title' => __( '8th Inning', 'sportspress' ), + 'post_title' => '8', + 'post_name' => 'eighth', 'meta' => array( - 'sp_abbreviation' => __( '8', 'sportspress' ) - ) + ), ), array( - 'post_title' => __( '9th Inning', 'sportspress' ), + 'post_title' => '9', + 'post_name' => 'ninth', 'meta' => array( - 'sp_abbreviation' => __( '9', 'sportspress' ) - ) + ), ), array( - 'post_title' => __( 'Extra Innings', 'sportspress' ), + 'post_title' => ' ', + 'post_name' => 'extra', 'meta' => array( - 'sp_abbreviation' => __( ' ', 'sportspress' ) - ) + ), ), array( - 'post_title' => __( 'Runs', 'sportspress' ), + 'post_title' => 'R', + 'post_name' => 'r', 'meta' => array( - 'sp_abbreviation' => __( 'R', 'sportspress' ) - ) + ), ), array( - 'post_title' => __( 'Hits', 'sportspress' ), + 'post_title' => 'H', + 'post_name' => 'h', 'meta' => array( - 'sp_abbreviation' => __( 'H', 'sportspress' ) - ) + ), ), array( - 'post_title' => __( 'Errors', 'sportspress' ), + 'post_title' => 'E', + 'post_name' => 'e', 'meta' => array( - 'sp_abbreviation' => __( 'E', 'sportspress' ) - ) - ) + ), + ), ), // Outcomes 'sp_outcome' => array( array( - 'post_title' => __( 'Win', 'sportspress' ), + 'post_title' => 'W', + 'post_name' => 'w', 'meta' => array( - 'sp_abbreviation' => __( 'W', 'sportspress' ) - ) + ), ), array( - 'post_title' => __( 'Loss', 'sportspress' ), + 'post_title' => 'L', + 'post_name' => 'l', 'meta' => array( - 'sp_abbreviation' => __( 'L', 'sportspress' ) - ) - ) - ) - ) + ), + ), + ), + ), ); \ No newline at end of file diff --git a/admin/presets/basketball.php b/admin/presets/basketball.php index cf82ec62..fe845471 100644 --- a/admin/presets/basketball.php +++ b/admin/presets/basketball.php @@ -1,127 +1,87 @@ __( 'Baseball', 'sportspress' ), +$sportspress_sports['basketball'] = array( + 'name' => __( 'Basketball', 'sportspress' ), 'posts' => array( // Table Columns 'sp_column' => array( array( - 'post_title' => __( 'Wins', 'sportspress' ), + 'post_title' => 'W', + 'post_name' => 'w', 'meta' => array( - 'sp_equation' => '$win', - 'sp_abbreviation' => __( 'W', 'sportspress' ) - ) + 'sp_equation' => '$w', + ), ), array( - 'post_title' => __( 'Losses', 'sportspress' ), + 'post_title' => 'L', + 'post_name' => 'l', 'meta' => array( - 'sp_equation' => '$loss', - 'sp_abbreviation' => __( 'L', 'sportspress' ) - ) + 'sp_equation' => '$l', + ), ), array( - 'post_title' => __( 'Win Percentage', 'sportspress' ), + 'post_title' => 'Pct', + 'post_name' => 'pct', 'meta' => array( - 'sp_equation' => '$win / $eventsplayed', - 'sp_abbreviation' => __( 'Pct', 'sportspress' ) - ) + 'sp_equation' => '$w / $eventsplayed', + ), ), array( - 'post_title' => __( 'Games Behind', 'sportspress' ), + 'post_title' => 'GB', + 'post_name' => 'gb', 'meta' => array( - 'sp_equation' => '( $winmax + $loss - $win - $lossmax ) / 2', - 'sp_abbreviation' => __( 'GB', 'sportspress' ) - ) + 'sp_equation' => '( $wmax + $l - $w - $lmax ) / 2', + ), ), array( - 'post_title' => __( 'Streak', 'sportspress' ), + 'post_title' => 'Strk', + 'post_name' => 'strk', 'meta' => array( 'sp_equation' => '$streak', - 'sp_abbreviation' => __( 'Strk', 'sportspress' ) - ) - ) + ), + ), ), // Statistics 'sp_statistic' => array( - array( - 'post_title' => __( 'Appearances', 'sportspress' ), - 'meta' => array( - 'sp_equation' => '$eventsplayed' - ) - ), - array( - 'post_title' => __( 'Goals', 'sportspress' ), - 'meta' => array( - 'sp_equation' => '' - ) - ), - array( - 'post_title' => __( 'Assists', 'sportspress' ), - 'meta' => array( - 'sp_equation' => '' - ) - ), - array( - 'post_title' => __( 'Yellow Cards', 'sportspress' ), - 'meta' => array( - 'sp_equation' => '' - ) - ), - array( - 'post_title' => __( 'Red Cards', 'sportspress' ), - 'meta' => array( - 'sp_equation' => '' - ) - ) ), // Results 'sp_result' => array( array( - 'post_title' => __( '1st Quarter', 'sportspress' ), - 'meta' => array( - 'sp_abbreviation' => __( '1', 'sportspress' ) - ) + 'post_title' => '1', + 'post_name' => 'first', ), array( - 'post_title' => __( '2nd Quarter', 'sportspress' ), - 'meta' => array( - 'sp_abbreviation' => __( '2', 'sportspress' ) - ) + 'post_title' => '2', + 'post_name' => 'second', ), array( - 'post_title' => __( '3rd Quarter', 'sportspress' ), - 'meta' => array( - 'sp_abbreviation' => __( '3', 'sportspress' ) - ) + 'post_title' => '3', + 'post_name' => 'third', ), array( - 'post_title' => __( '4th Quarter', 'sportspress' ), - 'meta' => array( - 'sp_abbreviation' => __( '4', 'sportspress' ) - ) + 'post_title' => '4', + 'post_name' => 'fourth', ), array( - 'post_title' => __( 'Overtime', 'sportspress' ), - 'meta' => array( - 'sp_abbreviation' => __( ' ', 'sportspress' ) - ) + 'post_title' => 'OT', + 'post_name' => 'ot', ), array( - 'post_title' => __( 'Total', 'sportspress' ), - 'meta' => array( - 'sp_abbreviation' => __( 'T', 'sportspress' ) - ) - ) + 'post_title' => 'T', + 'post_name' => 't', + ), ), // Outcomes 'sp_outcome' => array( array( - 'post_title' => __( 'Win', 'sportspress' ) + 'post_title' => 'W', + 'post_name' => 'w' ), array( - 'post_title' => __( 'Loss', 'sportspress' ) - ) - ) - ) + 'post_title' => 'L', + 'post_name' => 'l' + ), + ), + ), ); \ No newline at end of file diff --git a/admin/presets/cricket.php b/admin/presets/cricket.php index 20ae1b95..31738b78 100644 --- a/admin/presets/cricket.php +++ b/admin/presets/cricket.php @@ -4,106 +4,68 @@ global $sportspress_sports; $sportspress_sports['cricket'] = array( 'name' => __( 'Cricket', 'sportspress' ), 'posts' => array( + // Table Columns + 'sp_column' => array( + array( + 'post_title' => 'M', + 'post_name' => 'm', + 'meta' => array( + 'sp_equation' => '$eventsplayed', + ), + ), + array( + 'post_title' => 'W', + 'post_name' => 'w', + 'meta' => array( + 'sp_equation' => '$w', + ), + ), + array( + 'post_title' => 'L', + 'post_name' => 'l', + 'meta' => array( + 'sp_equation' => '$l', + ), + ), + array( + 'post_title' => 'T', + 'post_name' => 't', + 'meta' => array( + 'sp_equation' => '$t', + ), + ), + array( + 'post_title' => 'N/R', + 'post_name' => 'nr', + 'meta' => array( + 'sp_equation' => '$nr', + ), + ), + array( + 'post_title' => 'Pts', + 'post_name' => 'pts', + 'meta' => array( + 'sp_equation' => '$w * 2 + $nr', + 'sp_priority' => '1', + 'sp_order' => 'DESC', + ), + ), + array( + 'post_title' => 'RR', + 'post_name' => 'rr', + 'meta' => array( + 'sp_equation' => '( $rfor / $oagainst ) - ( $ragainst / $ofor )', + ), + ), + ), // Statistics 'sp_statistic' => array( - array( - 'post_title' => __( 'Appearances', 'sportspress' ), - 'post_name' => 'appearances', - 'meta' => array( 'sp_equation' => '$eventsplayed' ) - ), - array( - 'post_title' => __( 'Goals', 'sportspress' ), - 'post_name' => 'goals', - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Assists', 'sportspress' ), - 'post_name' => 'assists', - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Yellow Cards', 'sportspress' ), - 'post_name' => 'yellowcards', - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Red Cards', 'sportspress' ), - 'post_name' => 'redcards', - 'meta' => array( 'sp_equation' => '' ) - ) - ), - // Outcomes - 'sp_outcome' => array( - array( - 'post_title' => __( 'Win', 'sportspress' ), - 'post_name' => 'win' - ), - array( - 'post_title' => __( 'Draw', 'sportspress' ), - 'post_name' => 'draw' - ), - array( - 'post_title' => __( 'Loss', 'sportspress' ), - 'post_name' => 'loss' - ) ), // Results 'sp_result' => array( - array( - 'post_title' => __( 'Goals', 'sportspress' ), - 'post_name' => 'goals' - ), - array( - 'post_title' => __( '1st Half', 'sportspress' ), - 'post_name' => 'firsthalf' - ), - array( - 'post_title' => __( '2nd Half', 'sportspress' ), - 'post_name' => 'secondhalf' - ) ), - // Columns - 'sp_column' => array( - array( - 'post_title' => __( 'P', 'sportspress' ), - 'post_name' => 'p', - 'meta' => array( 'sp_equation' => '$eventsplayed' ) - ), - array( - 'post_title' => __( 'W', 'sportspress' ), - 'post_name' => 'w', - 'meta' => array( 'sp_equation' => '$win' ) - ), - array( - 'post_title' => __( 'D', 'sportspress' ), - 'post_name' => 'd', - 'meta' => array( 'sp_equation' => '$draw' ) - ), - array( - 'post_title' => __( 'L', 'sportspress' ), - 'post_name' => 'l', - 'meta' => array( 'sp_equation' => '$loss' ) - ), - array( - 'post_title' => __( 'F', 'sportspress' ), - 'post_name' => 'f', - 'meta' => array( 'sp_equation' => '$goalsfor', 'sp_priority' => '3', 'sp_order' => 'DESC' ) - ), - array( - 'post_title' => __( 'A', 'sportspress' ), - 'post_name' => 'a', - 'meta' => array( 'sp_equation' => '$goalsagainst' ) - ), - array( - 'post_title' => __( 'GD', 'sportspress' ), - 'post_name' => 'gd', - 'meta' => array( 'sp_equation' => '$goalsfor - $goalsagainst', 'sp_priority' => '2', 'sp_order' => 'DESC' ) - ), - array( - 'post_title' => __( 'PTS', 'sportspress' ), - 'post_name' => 'pts', - 'meta' => array( 'sp_equation' => '$win * 3 + $draw', 'sp_priority' => '1', 'sp_order' => 'DESC' ) - ) - ) - ) + // Outcomes + 'sp_outcome' => array( + ), + ), ); \ No newline at end of file diff --git a/admin/presets/football.php b/admin/presets/football.php index f4327e67..009ca158 100644 --- a/admin/presets/football.php +++ b/admin/presets/football.php @@ -4,101 +4,59 @@ global $sportspress_sports; $sportspress_sports['football'] = array( 'name' => __( 'American Football', 'sportspress' ), 'posts' => array( + // Table Columns + 'sp_column' => array( + array( + 'post_title' => 'W', + 'post_name' => 'w', + 'meta' => array( + 'sp_equation' => '$w', + ), + ), + array( + 'post_title' => 'L', + 'post_name' => 'l', + 'meta' => array( + 'sp_equation' => '$l', + ), + ), + array( + 'post_title' => 'Pct', + 'post_name' => 'pct', + 'meta' => array( + 'sp_equation' => '$w / $eventsplayed', + ), + ), + array( + 'post_title' => 'PF', + 'post_name' => 'pf', + 'meta' => array( + 'sp_equation' => '$ptsfor', + ), + ), + array( + 'post_title' => 'PA', + 'post_name' => 'pa', + 'meta' => array( + 'sp_equation' => '$ptsagainst', + ), + ), + array( + 'post_title' => 'Str', + 'post_name' => 'strk', + 'meta' => array( + 'sp_equation' => '$streak', + ), + ), + ), // Statistics 'sp_statistic' => array( - array( - 'post_title' => __( 'Appearances', 'sportspress' ), - 'post_name' => 'appearances', - 'meta' => array( 'sp_equation' => '$eventsplayed' ) - ), - array( - 'post_title' => __( 'Goals', 'sportspress' ), - 'post_name' => 'goals', - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Assists', 'sportspress' ), - 'post_name' => 'assists', - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Yellow Cards', 'sportspress' ), - 'post_name' => 'yellowcards', - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Red Cards', 'sportspress' ), - 'post_name' => 'redcards', - 'meta' => array( 'sp_equation' => '' ) - ) - ), - // Outcomes - 'sp_outcome' => array( - array( - 'post_title' => __( 'Win', 'sportspress' ), - 'post_name' => 'win' - ), - array( - 'post_title' => __( 'Draw', 'sportspress' ), - 'post_name' => 'draw' - ), - array( - 'post_title' => __( 'Loss', 'sportspress' ), - 'post_name' => 'loss' - ) ), // Results 'sp_result' => array( - array( - 'post_title' => __( 'Touchdowns', 'sportspress' ), - 'post_name' => 'touchdowns' - ), - array( - 'post_title' => __( '1st Half', 'sportspress' ), - 'post_name' => 'firsthalf' - ), - array( - 'post_title' => __( '2nd Half', 'sportspress' ), - 'post_name' => 'secondhalf' - ) ), - // Columns - 'sp_column' => array( - array( - 'post_title' => __( 'W', 'sportspress' ), - 'post_name' => 'w', - 'meta' => array( 'sp_equation' => '$win' ) - ), - array( - 'post_title' => __( 'L', 'sportspress' ), - 'post_name' => 'l', - 'meta' => array( 'sp_equation' => '$loss' ) - ), - array( - 'post_title' => __( 'T', 'sportspress' ), - 'post_name' => 'd', - 'meta' => array( 'sp_equation' => '$draw' ) - ), - array( - 'post_title' => __( 'PCT', 'sportspress' ), - 'post_name' => 'pct', - 'meta' => array( 'sp_equation' => '$win / $eventsplayed', 'sp_priority' => '1', 'sp_order' => 'DESC' ) - ), - array( - 'post_title' => __( 'PF', 'sportspress' ), - 'post_name' => 'pf', - 'meta' => array( 'sp_equation' => '$pointsfor', 'sp_priority' => '2', 'sp_order' => 'DESC' ) - ), - array( - 'post_title' => __( 'PA', 'sportspress' ), - 'post_name' => 'pa', - 'meta' => array( 'sp_equation' => '$pointsagainst' ) - ), - array( - 'post_title' => __( 'STRK', 'sportspress' ), - 'post_name' => 'strk', - 'meta' => array( 'sp_equation' => '$streak' ) - ) - ) - ) + // Outcomes + 'sp_outcome' => array( + ), + ), ); \ No newline at end of file diff --git a/admin/presets/footy.php b/admin/presets/footy.php index 2407d698..6de7e9eb 100644 --- a/admin/presets/footy.php +++ b/admin/presets/footy.php @@ -4,106 +4,73 @@ global $sportspress_sports; $sportspress_sports['footy'] = array( 'name' => __( 'Australian Rules Football', 'sportspress' ), 'posts' => array( - // Statistics - 'sp_statistic' => array( + // Table Columns + 'sp_column' => array( array( - 'post_title' => __( 'Appearances', 'sportspress' ), - 'post_name' => 'appearances', - 'meta' => array( 'sp_equation' => '$eventsplayed' ) + 'post_title' => 'P', + 'post_name' => 'p', + 'meta' => array( + 'sp_equation' => '$eventsplayed', + ) ), array( - 'post_title' => __( 'Goals', 'sportspress' ), - 'post_name' => 'goals', - 'meta' => array( 'sp_equation' => '' ) + 'post_title' => 'W', + 'post_name' => 'w', + 'meta' => array( + 'sp_equation' => '$w', + ) ), array( - 'post_title' => __( 'Assists', 'sportspress' ), - 'post_name' => 'assists', - 'meta' => array( 'sp_equation' => '' ) + 'post_title' => 'L', + 'post_name' => 'l', + 'meta' => array( + 'sp_equation' => '$l', + ) ), array( - 'post_title' => __( 'Yellow Cards', 'sportspress' ), - 'post_name' => 'yellowcards', - 'meta' => array( 'sp_equation' => '' ) + 'post_title' => 'D', + 'post_name' => 'd', + 'meta' => array( + 'sp_equation' => '$d', + ) ), array( - 'post_title' => __( 'Red Cards', 'sportspress' ), - 'post_name' => 'redcards', - 'meta' => array( 'sp_equation' => '' ) + 'post_title' => 'F', + 'post_name' => 'f', + 'meta' => array( + 'sp_equation' => '$ptsfor', + ) + ), + array( + 'post_title' => 'A', + 'post_name' => 'a', + 'meta' => array( + 'sp_equation' => '$ptsagainst', + ) + ), + array( + 'post_title' => 'Pct', + 'post_name' => 'pct', + 'meta' => array( + 'sp_equation' => '( $w / $eventsplayed ) * 10 * 10', + ) + ), + array( + 'post_title' => 'Pts', + 'post_name' => 'pts', + 'meta' => array( + 'sp_equation' => '$pts', + ) ) ), - // Outcomes - 'sp_outcome' => array( - array( - 'post_title' => __( 'Win', 'sportspress' ), - 'post_name' => 'win' - ), - array( - 'post_title' => __( 'Draw', 'sportspress' ), - 'post_name' => 'draw' - ), - array( - 'post_title' => __( 'Loss', 'sportspress' ), - 'post_name' => 'loss' - ) + // Statistics + 'sp_statistic' => array( ), // Results 'sp_result' => array( - array( - 'post_title' => __( 'Goals', 'sportspress' ), - 'post_name' => 'goals' - ), - array( - 'post_title' => __( '1st Half', 'sportspress' ), - 'post_name' => 'firsthalf' - ), - array( - 'post_title' => __( '2nd Half', 'sportspress' ), - 'post_name' => 'secondhalf' - ) ), - // Columns - 'sp_column' => array( - array( - 'post_title' => __( 'P', 'sportspress' ), - 'post_name' => 'p', - 'meta' => array( 'sp_equation' => '$eventsplayed' ) - ), - array( - 'post_title' => __( 'W', 'sportspress' ), - 'post_name' => 'w', - 'meta' => array( 'sp_equation' => '$win' ) - ), - array( - 'post_title' => __( 'D', 'sportspress' ), - 'post_name' => 'd', - 'meta' => array( 'sp_equation' => '$draw' ) - ), - array( - 'post_title' => __( 'L', 'sportspress' ), - 'post_name' => 'l', - 'meta' => array( 'sp_equation' => '$loss' ) - ), - array( - 'post_title' => __( 'F', 'sportspress' ), - 'post_name' => 'f', - 'meta' => array( 'sp_equation' => '$goalsfor', 'sp_priority' => '3', 'sp_order' => 'DESC' ) - ), - array( - 'post_title' => __( 'A', 'sportspress' ), - 'post_name' => 'a', - 'meta' => array( 'sp_equation' => '$goalsagainst' ) - ), - array( - 'post_title' => __( 'GD', 'sportspress' ), - 'post_name' => 'gd', - 'meta' => array( 'sp_equation' => '$goalsfor - $goalsagainst', 'sp_priority' => '2', 'sp_order' => 'DESC' ) - ), - array( - 'post_title' => __( 'PTS', 'sportspress' ), - 'post_name' => 'pts', - 'meta' => array( 'sp_equation' => '$win * 3 + $draw', 'sp_priority' => '1', 'sp_order' => 'DESC' ) - ) - ) - ) + // Outcomes + 'sp_outcome' => array( + ), + ), ); \ No newline at end of file diff --git a/admin/presets/gaming.php b/admin/presets/gaming.php index ff934274..c4ba85f9 100644 --- a/admin/presets/gaming.php +++ b/admin/presets/gaming.php @@ -4,106 +4,66 @@ global $sportspress_sports; $sportspress_sports['gaming'] = array( 'name' => __( 'Competitive Gaming', 'sportspress' ), 'posts' => array( + // Table Columns + 'sp_column' => array( + array( + 'post_title' => 'W', + 'post_name' => 'w', + 'meta' => array( + 'sp_equation' => '$w', + ), + ), + array( + 'post_title' => 'L', + 'post_name' => 'l', + 'meta' => array( + 'sp_equation' => '$l', + ), + ), + array( + 'post_title' => 'Pct', + 'post_name' => 'pct', + 'meta' => array( + 'sp_equation' => '$w / $eventsplayed', + ), + ), + array( + 'post_title' => 'Strk', + 'post_name' => 'strk', + 'meta' => array( + 'sp_equation' => '$strk', + ), + ), + array( + 'post_title' => 'XP', + 'post_name' => 'xp', + 'meta' => array( + 'sp_equation' => '$xp', + ), + ), + array( + 'post_title' => 'Rep', + 'post_name' => 'rep', + 'meta' => array( + 'sp_equation' => '$rep / $eventsplayed', + ), + ), + array( + 'post_title' => 'Ping', + 'post_name' => 'ping', + 'meta' => array( + 'sp_equation' => '$ping / $eventsplayed', + ), + ), + ), // Statistics 'sp_statistic' => array( - array( - 'post_title' => __( 'Appearances', 'sportspress' ), - 'post_name' => 'appearances', - 'meta' => array( 'sp_equation' => '$eventsplayed' ) - ), - array( - 'post_title' => __( 'Goals', 'sportspress' ), - 'post_name' => 'goals', - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Assists', 'sportspress' ), - 'post_name' => 'assists', - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Yellow Cards', 'sportspress' ), - 'post_name' => 'yellowcards', - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Red Cards', 'sportspress' ), - 'post_name' => 'redcards', - 'meta' => array( 'sp_equation' => '' ) - ) - ), - // Outcomes - 'sp_outcome' => array( - array( - 'post_title' => __( 'Win', 'sportspress' ), - 'post_name' => 'win' - ), - array( - 'post_title' => __( 'Draw', 'sportspress' ), - 'post_name' => 'draw' - ), - array( - 'post_title' => __( 'Loss', 'sportspress' ), - 'post_name' => 'loss' - ) ), // Results 'sp_result' => array( - array( - 'post_title' => __( 'Goals', 'sportspress' ), - 'post_name' => 'goals' - ), - array( - 'post_title' => __( '1st Half', 'sportspress' ), - 'post_name' => 'firsthalf' - ), - array( - 'post_title' => __( '2nd Half', 'sportspress' ), - 'post_name' => 'secondhalf' - ) ), - // Columns - 'sp_column' => array( - array( - 'post_title' => __( 'P', 'sportspress' ), - 'post_name' => 'p', - 'meta' => array( 'sp_equation' => '$eventsplayed' ) - ), - array( - 'post_title' => __( 'W', 'sportspress' ), - 'post_name' => 'w', - 'meta' => array( 'sp_equation' => '$win' ) - ), - array( - 'post_title' => __( 'D', 'sportspress' ), - 'post_name' => 'd', - 'meta' => array( 'sp_equation' => '$draw' ) - ), - array( - 'post_title' => __( 'L', 'sportspress' ), - 'post_name' => 'l', - 'meta' => array( 'sp_equation' => '$loss' ) - ), - array( - 'post_title' => __( 'F', 'sportspress' ), - 'post_name' => 'f', - 'meta' => array( 'sp_equation' => '$goalsfor', 'sp_priority' => '3', 'sp_order' => 'DESC' ) - ), - array( - 'post_title' => __( 'A', 'sportspress' ), - 'post_name' => 'a', - 'meta' => array( 'sp_equation' => '$goalsagainst' ) - ), - array( - 'post_title' => __( 'GD', 'sportspress' ), - 'post_name' => 'gd', - 'meta' => array( 'sp_equation' => '$goalsfor - $goalsagainst', 'sp_priority' => '2', 'sp_order' => 'DESC' ) - ), - array( - 'post_title' => __( 'PTS', 'sportspress' ), - 'post_name' => 'pts', - 'meta' => array( 'sp_equation' => '$win * 3 + $draw', 'sp_priority' => '1', 'sp_order' => 'DESC' ) - ) - ) - ) + // Outcomes + 'sp_outcome' => array( + ), + ), ); \ No newline at end of file diff --git a/admin/presets/golf.php b/admin/presets/golf.php index 1a3d964a..d045806e 100644 --- a/admin/presets/golf.php +++ b/admin/presets/golf.php @@ -4,106 +4,52 @@ global $sportspress_sports; $sportspress_sports['golf'] = array( 'name' => __( 'Golf', 'sportspress' ), 'posts' => array( + // Table Columns + 'sp_column' => array( + ), // Statistics 'sp_statistic' => array( array( - 'post_title' => __( 'Appearances', 'sportspress' ), - 'post_name' => 'appearances', - 'meta' => array( 'sp_equation' => '$eventsplayed' ) + 'post_title' => __( 'Events', 'sportspress' ), + 'post_name' => 'events', + 'meta' => array( + 'sp_equation' => '$eventsplayed', + ), ), array( - 'post_title' => __( 'Goals', 'sportspress' ), - 'post_name' => 'goals', - 'meta' => array( 'sp_equation' => '' ) + 'post_title' => 'Avg', + 'post_name' => 'avg', + 'meta' => array( + 'sp_equation' => '$ptsfor / $eventsplayed', + ), ), array( - 'post_title' => __( 'Assists', 'sportspress' ), - 'post_name' => 'assists', - 'meta' => array( 'sp_equation' => '' ) + 'post_title' => __( 'Total', 'sportspress' ), + 'post_name' => 'total', + 'meta' => array( + 'sp_equation' => '$ptsfor', + ), ), array( - 'post_title' => __( 'Yellow Cards', 'sportspress' ), - 'post_name' => 'yellowcards', - 'meta' => array( 'sp_equation' => '' ) + 'post_title' => 'PL', + 'post_name' => 'lost', + 'meta' => array( + 'sp_equation' => '$ptsagainst', + ), ), array( - 'post_title' => __( 'Red Cards', 'sportspress' ), - 'post_name' => 'redcards', - 'meta' => array( 'sp_equation' => '' ) - ) - ), - // Outcomes - 'sp_outcome' => array( - array( - 'post_title' => __( 'Win', 'sportspress' ), - 'post_name' => 'win' + 'post_title' => 'PG', + 'post_name' => 'gained', + 'meta' => array( + 'sp_equation' => '$ptsfor', + ), ), - array( - 'post_title' => __( 'Draw', 'sportspress' ), - 'post_name' => 'draw' - ), - array( - 'post_title' => __( 'Loss', 'sportspress' ), - 'post_name' => 'loss' - ) ), // Results 'sp_result' => array( - array( - 'post_title' => __( 'Goals', 'sportspress' ), - 'post_name' => 'goals' - ), - array( - 'post_title' => __( '1st Half', 'sportspress' ), - 'post_name' => 'firsthalf' - ), - array( - 'post_title' => __( '2nd Half', 'sportspress' ), - 'post_name' => 'secondhalf' - ) ), - // Columns - 'sp_column' => array( - array( - 'post_title' => __( 'P', 'sportspress' ), - 'post_name' => 'p', - 'meta' => array( 'sp_equation' => '$eventsplayed' ) - ), - array( - 'post_title' => __( 'W', 'sportspress' ), - 'post_name' => 'w', - 'meta' => array( 'sp_equation' => '$win' ) - ), - array( - 'post_title' => __( 'D', 'sportspress' ), - 'post_name' => 'd', - 'meta' => array( 'sp_equation' => '$draw' ) - ), - array( - 'post_title' => __( 'L', 'sportspress' ), - 'post_name' => 'l', - 'meta' => array( 'sp_equation' => '$loss' ) - ), - array( - 'post_title' => __( 'F', 'sportspress' ), - 'post_name' => 'f', - 'meta' => array( 'sp_equation' => '$goalsfor', 'sp_priority' => '3', 'sp_order' => 'DESC' ) - ), - array( - 'post_title' => __( 'A', 'sportspress' ), - 'post_name' => 'a', - 'meta' => array( 'sp_equation' => '$goalsagainst' ) - ), - array( - 'post_title' => __( 'GD', 'sportspress' ), - 'post_name' => 'gd', - 'meta' => array( 'sp_equation' => '$goalsfor - $goalsagainst', 'sp_priority' => '2', 'sp_order' => 'DESC' ) - ), - array( - 'post_title' => __( 'PTS', 'sportspress' ), - 'post_name' => 'pts', - 'meta' => array( 'sp_equation' => '$win * 3 + $draw', 'sp_priority' => '1', 'sp_order' => 'DESC' ) - ) - ) - ) + // Outcomes + 'sp_outcome' => array( + ), + ), ); \ No newline at end of file diff --git a/admin/presets/handball.php b/admin/presets/handball.php index 44867f2f..e69de29b 100644 --- a/admin/presets/handball.php +++ b/admin/presets/handball.php @@ -1,109 +0,0 @@ - __( 'Handball', 'sportspress' ), - 'posts' => array( - // Statistics - 'sp_statistic' => array( - array( - 'post_title' => __( 'Appearances', 'sportspress' ), - 'post_name' => 'appearances', - 'meta' => array( 'sp_equation' => '$eventsplayed' ) - ), - array( - 'post_title' => __( 'Goals', 'sportspress' ), - 'post_name' => 'goals', - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Assists', 'sportspress' ), - 'post_name' => 'assists', - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Yellow Cards', 'sportspress' ), - 'post_name' => 'yellowcards', - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Red Cards', 'sportspress' ), - 'post_name' => 'redcards', - 'meta' => array( 'sp_equation' => '' ) - ) - ), - // Outcomes - 'sp_outcome' => array( - array( - 'post_title' => __( 'Win', 'sportspress' ), - 'post_name' => 'win' - ), - array( - 'post_title' => __( 'Draw', 'sportspress' ), - 'post_name' => 'draw' - ), - array( - 'post_title' => __( 'Loss', 'sportspress' ), - 'post_name' => 'loss' - ) - ), - // Results - 'sp_result' => array( - array( - 'post_title' => __( 'Goals', 'sportspress' ), - 'post_name' => 'goals' - ), - array( - 'post_title' => __( '1st Half', 'sportspress' ), - 'post_name' => 'firsthalf' - ), - array( - 'post_title' => __( '2nd Half', 'sportspress' ), - 'post_name' => 'secondhalf' - ) - ), - // Columns - 'sp_column' => array( - array( - 'post_title' => __( 'P', 'sportspress' ), - 'post_name' => 'p', - 'meta' => array( 'sp_equation' => '$eventsplayed' ) - ), - array( - 'post_title' => __( 'W', 'sportspress' ), - 'post_name' => 'w', - 'meta' => array( 'sp_equation' => '$win' ) - ), - array( - 'post_title' => __( 'D', 'sportspress' ), - 'post_name' => 'd', - 'meta' => array( 'sp_equation' => '$draw' ) - ), - array( - 'post_title' => __( 'L', 'sportspress' ), - 'post_name' => 'l', - 'meta' => array( 'sp_equation' => '$loss' ) - ), - array( - 'post_title' => __( 'F', 'sportspress' ), - 'post_name' => 'f', - 'meta' => array( 'sp_equation' => '$goalsfor', 'sp_priority' => '3', 'sp_order' => 'DESC' ) - ), - array( - 'post_title' => __( 'A', 'sportspress' ), - 'post_name' => 'a', - 'meta' => array( 'sp_equation' => '$goalsagainst' ) - ), - array( - 'post_title' => __( 'GD', 'sportspress' ), - 'post_name' => 'gd', - 'meta' => array( 'sp_equation' => '$goalsfor - $goalsagainst', 'sp_priority' => '2', 'sp_order' => 'DESC' ) - ), - array( - 'post_title' => __( 'PTS', 'sportspress' ), - 'post_name' => 'pts', - 'meta' => array( 'sp_equation' => '$win * 3 + $draw', 'sp_priority' => '1', 'sp_order' => 'DESC' ) - ) - ) - ) -); \ No newline at end of file diff --git a/admin/presets/hockey.php b/admin/presets/hockey.php index 5767cba4..f70f94e9 100644 --- a/admin/presets/hockey.php +++ b/admin/presets/hockey.php @@ -4,106 +4,85 @@ global $sportspress_sports; $sportspress_sports['hockey'] = array( 'name' => __( 'Hockey', 'sportspress' ), 'posts' => array( + // Table Columns + 'sp_column' => array( + array( + 'post_title' => 'GP', + 'post_name' => 'gp', + 'meta' => array( + 'sp_equation' => '$eventsplayed', + ), + ), + array( + 'post_title' => 'W', + 'post_name' => 'w', + 'meta' => array( + 'sp_equation' => '$w', + ), + ), + array( + 'post_title' => 'L', + 'post_name' => 'l', + 'meta' => array( + 'sp_equation' => '$l', + ), + ), + array( + 'post_title' => 'OT', + 'post_name' => 'ot', + 'meta' => array( + 'sp_equation' => '$ot', + ), + ), + array( + 'post_title' => 'P', + 'post_name' => 'p', + 'meta' => array( + 'sp_equation' => '$w * 2 + $ot', + ), + ), + array( + 'post_title' => 'GF', + 'post_name' => 'gf', + 'meta' => array( + 'sp_equation' => '$gfor', + ), + ), + array( + 'post_title' => 'GA', + 'post_name' => 'ga', + 'meta' => array( + 'sp_equation' => '$gagainst', + ), + ), + array( + 'post_title' => 'Strk', + 'post_name' => 'strk', + 'meta' => array( + 'sp_equation' => '$streak', + ), + ), + ), // Statistics 'sp_statistic' => array( - array( - 'post_title' => __( 'Appearances', 'sportspress' ), - 'post_name' => 'appearances', - 'meta' => array( 'sp_equation' => '$eventsplayed' ) - ), - array( - 'post_title' => __( 'Goals', 'sportspress' ), - 'post_name' => 'goals', - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Assists', 'sportspress' ), - 'post_name' => 'assists', - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Yellow Cards', 'sportspress' ), - 'post_name' => 'yellowcards', - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Red Cards', 'sportspress' ), - 'post_name' => 'redcards', - 'meta' => array( 'sp_equation' => '' ) - ) + ), + // Results + 'sp_result' => array( ), // Outcomes 'sp_outcome' => array( array( - 'post_title' => __( 'Win', 'sportspress' ), - 'post_name' => 'win' + 'post_title' => 'W', + 'post_name' => 'w' ), array( - 'post_title' => __( 'Draw', 'sportspress' ), - 'post_name' => 'draw' + 'post_title' => 'L', + 'post_name' => 'l' ), array( - 'post_title' => __( 'Loss', 'sportspress' ), - 'post_name' => 'loss' - ) + 'post_title' => 'OT', + 'post_name' => 'ot' + ), ), - // Results - 'sp_result' => array( - array( - 'post_title' => __( 'Goals', 'sportspress' ), - 'post_name' => 'goals' - ), - array( - 'post_title' => __( '1st Half', 'sportspress' ), - 'post_name' => 'firsthalf' - ), - array( - 'post_title' => __( '2nd Half', 'sportspress' ), - 'post_name' => 'secondhalf' - ) - ), - // Columns - 'sp_column' => array( - array( - 'post_title' => __( 'P', 'sportspress' ), - 'post_name' => 'p', - 'meta' => array( 'sp_equation' => '$eventsplayed' ) - ), - array( - 'post_title' => __( 'W', 'sportspress' ), - 'post_name' => 'w', - 'meta' => array( 'sp_equation' => '$win' ) - ), - array( - 'post_title' => __( 'D', 'sportspress' ), - 'post_name' => 'd', - 'meta' => array( 'sp_equation' => '$draw' ) - ), - array( - 'post_title' => __( 'L', 'sportspress' ), - 'post_name' => 'l', - 'meta' => array( 'sp_equation' => '$loss' ) - ), - array( - 'post_title' => __( 'F', 'sportspress' ), - 'post_name' => 'f', - 'meta' => array( 'sp_equation' => '$goalsfor', 'sp_priority' => '3', 'sp_order' => 'DESC' ) - ), - array( - 'post_title' => __( 'A', 'sportspress' ), - 'post_name' => 'a', - 'meta' => array( 'sp_equation' => '$goalsagainst' ) - ), - array( - 'post_title' => __( 'GD', 'sportspress' ), - 'post_name' => 'gd', - 'meta' => array( 'sp_equation' => '$goalsfor - $goalsagainst', 'sp_priority' => '2', 'sp_order' => 'DESC' ) - ), - array( - 'post_title' => __( 'PTS', 'sportspress' ), - 'post_name' => 'pts', - 'meta' => array( 'sp_equation' => '$win * 3 + $draw', 'sp_priority' => '1', 'sp_order' => 'DESC' ) - ) - ) - ) + ), ); \ No newline at end of file diff --git a/admin/presets/presets.php b/admin/presets/presets.php deleted file mode 100644 index 32d231b0..00000000 --- a/admin/presets/presets.php +++ /dev/null @@ -1,21 +0,0 @@ - __( 'Custom', 'sportspress' ), 'posts' => array() ); -?> \ No newline at end of file diff --git a/admin/presets/racing.php b/admin/presets/racing.php index a99d1f9a..f06515b9 100644 --- a/admin/presets/racing.php +++ b/admin/presets/racing.php @@ -4,106 +4,54 @@ global $sportspress_sports; $sportspress_sports['racing'] = array( 'name' => __( 'Racing', 'sportspress' ), 'posts' => array( + // Table Columns + 'sp_column' => array( + ), // Statistics 'sp_statistic' => array( array( - 'post_title' => __( 'Appearances', 'sportspress' ), - 'post_name' => 'appearances', - 'meta' => array( 'sp_equation' => '$eventsplayed' ) + 'post_title' => 'Pts', + 'post_name' => 'pts', + 'meta' => array( + 'sp_equation' => '$ptsfor', + ), ), array( - 'post_title' => __( 'Goals', 'sportspress' ), - 'post_name' => 'goals', - 'meta' => array( 'sp_equation' => '' ) + 'post_title' => 'B', + 'post_name' => 'b', + 'meta' => array( + 'sp_equation' => '$ptsmax - $ptsfor', + ), ), array( - 'post_title' => __( 'Assists', 'sportspress' ), - 'post_name' => 'assists', - 'meta' => array( 'sp_equation' => '' ) + 'post_title' => 'S', + 'post_name' => 's', + 'meta' => array( + 'sp_equation' => '$eventsplayed', + ), ), array( - 'post_title' => __( 'Yellow Cards', 'sportspress' ), - 'post_name' => 'yellowcards', - 'meta' => array( 'sp_equation' => '' ) + 'post_title' => 'W', + 'post_name' => 'w', + 'meta' => array( + 'sp_equation' => '$w', + 'sp_priority' => '1', + 'sp_order' => 'DESC', + ), ), array( - 'post_title' => __( 'Red Cards', 'sportspress' ), - 'post_name' => 'redcards', - 'meta' => array( 'sp_equation' => '' ) - ) - ), - // Outcomes - 'sp_outcome' => array( - array( - 'post_title' => __( 'Win', 'sportspress' ), - 'post_name' => 'win' + 'post_title' => 'DNF', + 'post_name' => 'dnf', + 'meta' => array( + 'sp_equation' => '$dnf', + ), ), - array( - 'post_title' => __( 'Draw', 'sportspress' ), - 'post_name' => 'draw' - ), - array( - 'post_title' => __( 'Loss', 'sportspress' ), - 'post_name' => 'loss' - ) ), // Results 'sp_result' => array( - array( - 'post_title' => __( 'Goals', 'sportspress' ), - 'post_name' => 'goals' - ), - array( - 'post_title' => __( '1st Half', 'sportspress' ), - 'post_name' => 'firsthalf' - ), - array( - 'post_title' => __( '2nd Half', 'sportspress' ), - 'post_name' => 'secondhalf' - ) ), - // Columns - 'sp_column' => array( - array( - 'post_title' => __( 'P', 'sportspress' ), - 'post_name' => 'p', - 'meta' => array( 'sp_equation' => '$eventsplayed' ) - ), - array( - 'post_title' => __( 'W', 'sportspress' ), - 'post_name' => 'w', - 'meta' => array( 'sp_equation' => '$win' ) - ), - array( - 'post_title' => __( 'D', 'sportspress' ), - 'post_name' => 'd', - 'meta' => array( 'sp_equation' => '$draw' ) - ), - array( - 'post_title' => __( 'L', 'sportspress' ), - 'post_name' => 'l', - 'meta' => array( 'sp_equation' => '$loss' ) - ), - array( - 'post_title' => __( 'F', 'sportspress' ), - 'post_name' => 'f', - 'meta' => array( 'sp_equation' => '$goalsfor', 'sp_priority' => '3', 'sp_order' => 'DESC' ) - ), - array( - 'post_title' => __( 'A', 'sportspress' ), - 'post_name' => 'a', - 'meta' => array( 'sp_equation' => '$goalsagainst' ) - ), - array( - 'post_title' => __( 'GD', 'sportspress' ), - 'post_name' => 'gd', - 'meta' => array( 'sp_equation' => '$goalsfor - $goalsagainst', 'sp_priority' => '2', 'sp_order' => 'DESC' ) - ), - array( - 'post_title' => __( 'PTS', 'sportspress' ), - 'post_name' => 'pts', - 'meta' => array( 'sp_equation' => '$win * 3 + $draw', 'sp_priority' => '1', 'sp_order' => 'DESC' ) - ) - ) - ) + // Outcomes + 'sp_outcome' => array( + ), + ), ); \ No newline at end of file diff --git a/admin/presets/rugby.php b/admin/presets/rugby.php index f5530bbe..a4fa217b 100644 --- a/admin/presets/rugby.php +++ b/admin/presets/rugby.php @@ -4,106 +4,82 @@ global $sportspress_sports; $sportspress_sports['rugby'] = array( 'name' => __( 'Rugby', 'sportspress' ), 'posts' => array( + // Table Columns + 'sp_column' => array( + array( + 'post_title' => 'P', + 'post_name' => 'p', + 'meta' => array( + 'sp_equation' => '$eventsplayed', + ), + ), + array( + 'post_title' => 'W', + 'post_name' => 'w', + 'meta' => array( + 'sp_equation' => '$w', + ), + ), + array( + 'post_title' => 'D', + 'post_name' => 'd', + 'meta' => array( + 'sp_equation' => '$d', + ), + ), + array( + 'post_title' => 'L', + 'post_name' => 'l', + 'meta' => array( + 'sp_equation' => '$l', + ), + ), + array( + 'post_title' => 'B', + 'post_name' => 'b', + 'meta' => array( + 'sp_equation' => '$b', + ), + ), + array( + 'post_title' => 'F', + 'post_name' => 'f', + 'meta' => array( + 'sp_equation' => '$ptsfor', + ), + ), + array( + 'post_title' => 'A', + 'post_name' => 'a', + 'meta' => array( + 'sp_equation' => '$ptsagainst', + ), + ), + array( + 'post_title' => '+/-', + 'post_name' => 'pd', + 'meta' => array( + 'sp_equation' => '$ptsfor - $ptsagainst', + ), + ), + array( + 'post_title' => 'Pts', + 'post_name' => 'pts', + 'meta' => array( + 'sp_equation' => '( $w + $b ) * 2 + $d', + 'sp_priority' => '1', + 'sp_order' => 'DESC', + ), + ), + ), // Statistics 'sp_statistic' => array( - array( - 'post_title' => __( 'Appearances', 'sportspress' ), - 'post_name' => 'appearances', - 'meta' => array( 'sp_equation' => '$eventsplayed' ) - ), - array( - 'post_title' => __( 'Goals', 'sportspress' ), - 'post_name' => 'goals', - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Assists', 'sportspress' ), - 'post_name' => 'assists', - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Yellow Cards', 'sportspress' ), - 'post_name' => 'yellowcards', - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Red Cards', 'sportspress' ), - 'post_name' => 'redcards', - 'meta' => array( 'sp_equation' => '' ) - ) - ), - // Outcomes - 'sp_outcome' => array( - array( - 'post_title' => __( 'Win', 'sportspress' ), - 'post_name' => 'win' - ), - array( - 'post_title' => __( 'Draw', 'sportspress' ), - 'post_name' => 'draw' - ), - array( - 'post_title' => __( 'Loss', 'sportspress' ), - 'post_name' => 'loss' - ) ), // Results 'sp_result' => array( - array( - 'post_title' => __( 'Goals', 'sportspress' ), - 'post_name' => 'goals' - ), - array( - 'post_title' => __( '1st Half', 'sportspress' ), - 'post_name' => 'firsthalf' - ), - array( - 'post_title' => __( '2nd Half', 'sportspress' ), - 'post_name' => 'secondhalf' - ) ), - // Columns - 'sp_column' => array( - array( - 'post_title' => __( 'P', 'sportspress' ), - 'post_name' => 'p', - 'meta' => array( 'sp_equation' => '$eventsplayed' ) - ), - array( - 'post_title' => __( 'W', 'sportspress' ), - 'post_name' => 'w', - 'meta' => array( 'sp_equation' => '$win' ) - ), - array( - 'post_title' => __( 'D', 'sportspress' ), - 'post_name' => 'd', - 'meta' => array( 'sp_equation' => '$draw' ) - ), - array( - 'post_title' => __( 'L', 'sportspress' ), - 'post_name' => 'l', - 'meta' => array( 'sp_equation' => '$loss' ) - ), - array( - 'post_title' => __( 'F', 'sportspress' ), - 'post_name' => 'f', - 'meta' => array( 'sp_equation' => '$goalsfor', 'sp_priority' => '3', 'sp_order' => 'DESC' ) - ), - array( - 'post_title' => __( 'A', 'sportspress' ), - 'post_name' => 'a', - 'meta' => array( 'sp_equation' => '$goalsagainst' ) - ), - array( - 'post_title' => __( 'GD', 'sportspress' ), - 'post_name' => 'gd', - 'meta' => array( 'sp_equation' => '$goalsfor - $goalsagainst', 'sp_priority' => '2', 'sp_order' => 'DESC' ) - ), - array( - 'post_title' => __( 'PTS', 'sportspress' ), - 'post_name' => 'pts', - 'meta' => array( 'sp_equation' => '$win * 3 + $draw', 'sp_priority' => '1', 'sp_order' => 'DESC' ) - ) - ) - ) + // Outcomes + 'sp_outcome' => array( + ), + ), ); \ No newline at end of file diff --git a/admin/presets/soccer.php b/admin/presets/soccer.php index 4ad7f5b9..7c6d2246 100644 --- a/admin/presets/soccer.php +++ b/admin/presets/soccer.php @@ -7,116 +7,158 @@ $sportspress_sports['soccer'] = array( // Table Columns 'sp_column' => array( array( - 'post_title' => __( 'Games Played', 'sportspress' ), + 'post_title' => 'P', + 'post_name' => 'p', 'meta' => array( 'sp_equation' => '$eventsplayed', - 'sp_abbreviation' => __( 'GP', 'sportspress' ) - ) + 'sp_format' => 'integer', + 'sp_precision' => 1, + ), ), array( - 'post_title' => __( 'Wins', 'sportspress' ), + 'post_title' => 'W', + 'post_name' => 'w', 'meta' => array( - 'sp_equation' => '$win', - 'sp_abbreviation' => __( 'W', 'sportspress' ) - ) + 'sp_equation' => '$w', + 'sp_format' => 'integer', + 'sp_precision' => 1, + ), ), array( - 'post_title' => __( 'Draws', 'sportspress' ), + 'post_title' => 'D', + 'post_name' => 'd', 'meta' => array( - 'sp_equation' => '$draw', - 'sp_abbreviation' => __( 'D', 'sportspress' ) - ) + 'sp_equation' => '$d', + 'sp_format' => 'integer', + 'sp_precision' => 1, + ), ), array( - 'post_title' => __( 'Losses', 'sportspress' ), + 'post_title' => 'L', + 'post_name' => 'l', 'meta' => array( - 'sp_equation' => '$loss', - 'sp_abbreviation' => __( 'L', 'sportspress' ) - ) + 'sp_equation' => '$l', + 'sp_format' => 'integer', + 'sp_precision' => 1, + ), ), array( - 'post_title' => __( 'Goals For', 'sportspress' ), + 'post_title' => 'F', + 'post_name' => 'f', 'meta' => array( 'sp_equation' => '$goalsfor', 'sp_priority' => '3', 'sp_order' => 'DESC', - 'sp_abbreviation' => __( 'GF', 'sportspress' ) - ) + 'sp_format' => 'integer', + 'sp_precision' => 1, + ), ), array( - 'post_title' => __( 'Goals Against', 'sportspress' ), + 'post_title' => 'A', + 'post_name' => 'a', 'meta' => array( 'sp_equation' => '$goalsagainst', - 'sp_abbreviation' => __( 'GA', 'sportspress' ) - ) + 'sp_format' => 'integer', + 'sp_precision' => 1, + ), ), array( - 'post_title' => __( 'Goal Difference', 'sportspress' ), + 'post_title' => 'GD', + 'post_name' => 'gd', 'meta' => array( 'sp_equation' => '$goalsfor - $goalsagainst', 'sp_priority' => '2', 'sp_order' => 'DESC', - 'sp_abbreviation' => __( 'GD', 'sportspress' ) - ) + 'sp_format' => 'integer', + 'sp_precision' => 1, + ), ), array( - 'post_title' => __( 'Points', 'sportspress' ), + 'post_title' => 'Pts', + 'post_name' => 'pts', 'meta' => array( - 'sp_equation' => '$win * 3 + $draw', + 'sp_equation' => '$w * 3 + $d', 'sp_priority' => '1', 'sp_order' => 'DESC', - 'sp_abbreviation' => __( 'Pts', 'sportspress' ) - ) - ) + 'sp_format' => 'integer', + 'sp_precision' => 1, + ), + ), ), // Statistics 'sp_statistic' => array( array( 'post_title' => __( 'Appearances', 'sportspress' ), + 'post_name' => 'appearances', 'meta' => array( - 'sp_equation' => '$eventsplayed' - ) + 'sp_equation' => '$eventsplayed', + 'sp_format' => 'integer', + 'sp_precision' => 1, + ), ), array( 'post_title' => __( 'Goals', 'sportspress' ), + 'post_name' => 'goals', 'meta' => array( + 'sp_equation' => '', 'sp_priority' => '1', - 'sp_order' => 'DESC' - ) + 'sp_order' => 'DESC', + 'sp_format' => 'integer', + 'sp_precision' => 1, + ), ), array( - 'post_title' => __( 'Assists', 'sportspress' ) + 'post_title' => __( 'Assists', 'sportspress' ), + 'post_name' => 'assists', + 'meta' => array( + 'sp_equation' => '', + 'sp_format' => 'integer', + 'sp_precision' => 1, + ), ), array( - 'post_title' => __( 'Yellow Cards', 'sportspress' ) + 'post_title' => __( 'Yellow Cards', 'sportspress' ), + 'post_name' => 'yellowcards', + 'meta' => array( + 'sp_equation' => '', + 'sp_format' => 'integer', + 'sp_precision' => 1, + ), ), array( - 'post_title' => __( 'Red Cards', 'sportspress' ) - ) + 'post_title' => __( 'Red Cards', 'sportspress' ), + 'post_name' => 'redcards', + 'meta' => array( + 'sp_equation' => '', + 'sp_format' => 'integer', + 'sp_precision' => 1, + ), + ), ), // Results 'sp_result' => array( array( - 'post_title' => __( 'Goals', 'sportspress' ) + 'post_title' => __( 'Goals', 'sportspress' ), + 'post_name' => 'goals', + 'meta' => array( + 'sp_format' => 'integer', + ), ), - array( - 'post_title' => __( '1st Half', 'sportspress' ) - ), - array( - 'post_title' => __( '2nd Half', 'sportspress' ) - ) ), // Outcomes 'sp_outcome' => array( array( - 'post_title' => __( 'Win', 'sportspress' ) + 'post_title' => 'W', + 'post_name' => 'w', ), array( - 'post_title' => __( 'Draw', 'sportspress' ) + 'post_title' => 'D', + 'post_name' => 'd', ), array( - 'post_title' => __( 'Loss', 'sportspress' ) - ) - ) - ) + 'post_title' => 'L', + 'post_name' => 'l', + ), + ), + ), ); \ No newline at end of file diff --git a/admin/presets/swimming.php b/admin/presets/swimming.php index 9f8de4ef..e69de29b 100644 --- a/admin/presets/swimming.php +++ b/admin/presets/swimming.php @@ -1,109 +0,0 @@ - __( 'Swimming', 'sportspress' ), - 'posts' => array( - // Statistics - 'sp_statistic' => array( - array( - 'post_title' => __( 'Appearances', 'sportspress' ), - 'post_name' => 'appearances', - 'meta' => array( 'sp_equation' => '$eventsplayed' ) - ), - array( - 'post_title' => __( 'Goals', 'sportspress' ), - 'post_name' => 'goals', - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Assists', 'sportspress' ), - 'post_name' => 'assists', - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Yellow Cards', 'sportspress' ), - 'post_name' => 'yellowcards', - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Red Cards', 'sportspress' ), - 'post_name' => 'redcards', - 'meta' => array( 'sp_equation' => '' ) - ) - ), - // Outcomes - 'sp_outcome' => array( - array( - 'post_title' => __( 'Win', 'sportspress' ), - 'post_name' => 'win' - ), - array( - 'post_title' => __( 'Draw', 'sportspress' ), - 'post_name' => 'draw' - ), - array( - 'post_title' => __( 'Loss', 'sportspress' ), - 'post_name' => 'loss' - ) - ), - // Results - 'sp_result' => array( - array( - 'post_title' => __( 'Goals', 'sportspress' ), - 'post_name' => 'goals' - ), - array( - 'post_title' => __( '1st Half', 'sportspress' ), - 'post_name' => 'firsthalf' - ), - array( - 'post_title' => __( '2nd Half', 'sportspress' ), - 'post_name' => 'secondhalf' - ) - ), - // Columns - 'sp_column' => array( - array( - 'post_title' => __( 'P', 'sportspress' ), - 'post_name' => 'p', - 'meta' => array( 'sp_equation' => '$eventsplayed' ) - ), - array( - 'post_title' => __( 'W', 'sportspress' ), - 'post_name' => 'w', - 'meta' => array( 'sp_equation' => '$win' ) - ), - array( - 'post_title' => __( 'D', 'sportspress' ), - 'post_name' => 'd', - 'meta' => array( 'sp_equation' => '$draw' ) - ), - array( - 'post_title' => __( 'L', 'sportspress' ), - 'post_name' => 'l', - 'meta' => array( 'sp_equation' => '$loss' ) - ), - array( - 'post_title' => __( 'F', 'sportspress' ), - 'post_name' => 'f', - 'meta' => array( 'sp_equation' => '$goalsfor', 'sp_priority' => '3', 'sp_order' => 'DESC' ) - ), - array( - 'post_title' => __( 'A', 'sportspress' ), - 'post_name' => 'a', - 'meta' => array( 'sp_equation' => '$goalsagainst' ) - ), - array( - 'post_title' => __( 'GD', 'sportspress' ), - 'post_name' => 'gd', - 'meta' => array( 'sp_equation' => '$goalsfor - $goalsagainst', 'sp_priority' => '2', 'sp_order' => 'DESC' ) - ), - array( - 'post_title' => __( 'PTS', 'sportspress' ), - 'post_name' => 'pts', - 'meta' => array( 'sp_equation' => '$win * 3 + $draw', 'sp_priority' => '1', 'sp_order' => 'DESC' ) - ) - ) - ) -); \ No newline at end of file diff --git a/admin/presets/tennis.php b/admin/presets/tennis.php index 8cb1b44a..e69de29b 100644 --- a/admin/presets/tennis.php +++ b/admin/presets/tennis.php @@ -1,109 +0,0 @@ - __( 'Tennis', 'sportspress' ), - 'posts' => array( - // Statistics - 'sp_statistic' => array( - array( - 'post_title' => __( 'Appearances', 'sportspress' ), - 'post_name' => 'appearances', - 'meta' => array( 'sp_equation' => '$eventsplayed' ) - ), - array( - 'post_title' => __( 'Goals', 'sportspress' ), - 'post_name' => 'goals', - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Assists', 'sportspress' ), - 'post_name' => 'assists', - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Yellow Cards', 'sportspress' ), - 'post_name' => 'yellowcards', - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Red Cards', 'sportspress' ), - 'post_name' => 'redcards', - 'meta' => array( 'sp_equation' => '' ) - ) - ), - // Outcomes - 'sp_outcome' => array( - array( - 'post_title' => __( 'Win', 'sportspress' ), - 'post_name' => 'win' - ), - array( - 'post_title' => __( 'Draw', 'sportspress' ), - 'post_name' => 'draw' - ), - array( - 'post_title' => __( 'Loss', 'sportspress' ), - 'post_name' => 'loss' - ) - ), - // Results - 'sp_result' => array( - array( - 'post_title' => __( 'Goals', 'sportspress' ), - 'post_name' => 'goals' - ), - array( - 'post_title' => __( '1st Half', 'sportspress' ), - 'post_name' => 'firsthalf' - ), - array( - 'post_title' => __( '2nd Half', 'sportspress' ), - 'post_name' => 'secondhalf' - ) - ), - // Columns - 'sp_column' => array( - array( - 'post_title' => __( 'P', 'sportspress' ), - 'post_name' => 'p', - 'meta' => array( 'sp_equation' => '$eventsplayed' ) - ), - array( - 'post_title' => __( 'W', 'sportspress' ), - 'post_name' => 'w', - 'meta' => array( 'sp_equation' => '$win' ) - ), - array( - 'post_title' => __( 'D', 'sportspress' ), - 'post_name' => 'd', - 'meta' => array( 'sp_equation' => '$draw' ) - ), - array( - 'post_title' => __( 'L', 'sportspress' ), - 'post_name' => 'l', - 'meta' => array( 'sp_equation' => '$loss' ) - ), - array( - 'post_title' => __( 'F', 'sportspress' ), - 'post_name' => 'f', - 'meta' => array( 'sp_equation' => '$goalsfor', 'sp_priority' => '3', 'sp_order' => 'DESC' ) - ), - array( - 'post_title' => __( 'A', 'sportspress' ), - 'post_name' => 'a', - 'meta' => array( 'sp_equation' => '$goalsagainst' ) - ), - array( - 'post_title' => __( 'GD', 'sportspress' ), - 'post_name' => 'gd', - 'meta' => array( 'sp_equation' => '$goalsfor - $goalsagainst', 'sp_priority' => '2', 'sp_order' => 'DESC' ) - ), - array( - 'post_title' => __( 'PTS', 'sportspress' ), - 'post_name' => 'pts', - 'meta' => array( 'sp_equation' => '$win * 3 + $draw', 'sp_priority' => '1', 'sp_order' => 'DESC' ) - ) - ) - ) -); \ No newline at end of file diff --git a/admin/presets/volleyball.php b/admin/presets/volleyball.php index 3a112c46..e69de29b 100644 --- a/admin/presets/volleyball.php +++ b/admin/presets/volleyball.php @@ -1,109 +0,0 @@ - __( 'Volleyball', 'sportspress' ), - 'posts' => array( - // Statistics - 'sp_statistic' => array( - array( - 'post_title' => __( 'Appearances', 'sportspress' ), - 'post_name' => 'appearances', - 'meta' => array( 'sp_equation' => '$eventsplayed' ) - ), - array( - 'post_title' => __( 'Goals', 'sportspress' ), - 'post_name' => 'goals', - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Assists', 'sportspress' ), - 'post_name' => 'assists', - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Yellow Cards', 'sportspress' ), - 'post_name' => 'yellowcards', - 'meta' => array( 'sp_equation' => '' ) - ), - array( - 'post_title' => __( 'Red Cards', 'sportspress' ), - 'post_name' => 'redcards', - 'meta' => array( 'sp_equation' => '' ) - ) - ), - // Outcomes - 'sp_outcome' => array( - array( - 'post_title' => __( 'Win', 'sportspress' ), - 'post_name' => 'win' - ), - array( - 'post_title' => __( 'Draw', 'sportspress' ), - 'post_name' => 'draw' - ), - array( - 'post_title' => __( 'Loss', 'sportspress' ), - 'post_name' => 'loss' - ) - ), - // Results - 'sp_result' => array( - array( - 'post_title' => __( 'Goals', 'sportspress' ), - 'post_name' => 'goals' - ), - array( - 'post_title' => __( '1st Half', 'sportspress' ), - 'post_name' => 'firsthalf' - ), - array( - 'post_title' => __( '2nd Half', 'sportspress' ), - 'post_name' => 'secondhalf' - ) - ), - // Columns - 'sp_column' => array( - array( - 'post_title' => __( 'P', 'sportspress' ), - 'post_name' => 'p', - 'meta' => array( 'sp_equation' => '$eventsplayed' ) - ), - array( - 'post_title' => __( 'W', 'sportspress' ), - 'post_name' => 'w', - 'meta' => array( 'sp_equation' => '$win' ) - ), - array( - 'post_title' => __( 'D', 'sportspress' ), - 'post_name' => 'd', - 'meta' => array( 'sp_equation' => '$draw' ) - ), - array( - 'post_title' => __( 'L', 'sportspress' ), - 'post_name' => 'l', - 'meta' => array( 'sp_equation' => '$loss' ) - ), - array( - 'post_title' => __( 'F', 'sportspress' ), - 'post_name' => 'f', - 'meta' => array( 'sp_equation' => '$goalsfor', 'sp_priority' => '3', 'sp_order' => 'DESC' ) - ), - array( - 'post_title' => __( 'A', 'sportspress' ), - 'post_name' => 'a', - 'meta' => array( 'sp_equation' => '$goalsagainst' ) - ), - array( - 'post_title' => __( 'GD', 'sportspress' ), - 'post_name' => 'gd', - 'meta' => array( 'sp_equation' => '$goalsfor - $goalsagainst', 'sp_priority' => '2', 'sp_order' => 'DESC' ) - ), - array( - 'post_title' => __( 'PTS', 'sportspress' ), - 'post_name' => 'pts', - 'meta' => array( 'sp_equation' => '$win * 3 + $draw', 'sp_priority' => '1', 'sp_order' => 'DESC' ) - ) - ) - ) -); \ No newline at end of file diff --git a/admin/settings/config.php b/admin/settings/config.php index 2919dbe8..7d39a98d 100644 --- a/admin/settings/config.php +++ b/admin/settings/config.php @@ -13,57 +13,26 @@