From f49ec03546f0e4c79d52c5fcc3c4145b1eed4b49 Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Sun, 5 Jan 2014 20:37:08 +1100 Subject: [PATCH] Fix presets, config post types and Japanese translations --- admin/post-types/column.php | 35 +- admin/post-types/outcome.php | 8 +- admin/post-types/result.php | 18 +- admin/post-types/statistic.php | 35 +- admin/post-types/team.php | 3 +- admin/presets/baseball.php | 178 ++++---- admin/presets/basketball.php | 124 ++---- admin/presets/cricket.php | 154 +++---- admin/presets/football.php | 140 +++--- admin/presets/footy.php | 141 +++--- admin/presets/gaming.php | 152 +++---- admin/presets/golf.php | 118 ++--- admin/presets/handball.php | 109 ----- admin/presets/hockey.php | 161 +++---- admin/presets/presets.php | 21 - admin/presets/racing.php | 120 ++--- admin/presets/rugby.php | 168 +++---- admin/presets/soccer.php | 142 +++--- admin/presets/swimming.php | 109 ----- admin/presets/tennis.php | 109 ----- admin/presets/volleyball.php | 109 ----- admin/settings/config.php | 132 ++---- admin/settings/settings.php | 79 +++- admin/terms/position.php | 3 +- admin/terms/season.php | 4 + assets/js/admin.js | 41 +- install.php | 44 -- languages/sportspress-ja.mo | Bin 3594 -> 5211 bytes languages/sportspress-ja.po | 782 +++++++++++++++++++++++---------- sportspress-actions.php | 92 ++-- sportspress-filters.php | 6 +- sportspress-functions.php | 56 ++- sportspress-globals.php | 11 + sportspress.php | 17 +- 34 files changed, 1507 insertions(+), 1914 deletions(-) delete mode 100644 admin/presets/presets.php 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; ?> +

+

+ +

+

+

+ +

+

+

+ +

- __( 'Descending', 'sportspress' ), 'ASC' => __( 'Ascending', 'sportspress' ) ); foreach ( $options as $key => $value ): @@ -72,14 +93,6 @@ function sp_column_details_meta( $post ) { ?>

-

-

- -

-

-

- -

'', '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; ?> -

+

- + +

+

+

+

'', '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; } add_filter( 'manage_edit-sp_statistic_columns', 'sp_statistic_edit_columns' ); function sp_statistic_meta_init() { - add_meta_box( 'sp_equationdiv', __( 'Equation', 'sportspress' ), 'sp_statistic_equation_meta', 'sp_statistic', 'normal', 'high' ); + add_meta_box( 'sp_equationdiv', __( 'Details', 'sportspress' ), 'sp_statistic_equation_meta', 'sp_statistic', 'normal', 'high' ); } function sp_statistic_equation_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; ?> +

+

+ +

+

+

+ +

+

+

+ +

+

-

-

- -

-

-

-

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 @@ + + + - - + > post_title; ?> - - ID, 'sp_equation', true ); - if ( $equation ): - echo str_replace( - array( '$', '+', '-', '*', '/' ), - array( '', '+', '−', '×', '÷' ), - $equation - ); - else: - echo '—'; - endif; - ?> - - - ID, 'sp_priority', true ); - if ( $priority ): - echo $priority . ' ' . str_replace( - array( 'DESC', 'ASC' ), - array( '↓', '↑' ), - get_post_meta ( $row->ID, 'sp_order', true ) - ); - else: - echo '—'; - endif; - ?> - - - ID, 'sp_abbreviation', true ); - if ( $abbreviation ): - echo $abbreviation; - else: - echo $row->post_title; - endif; - ?> - + post_name; ?> + ID ); ?> + ID ); ?> + ID ); ?> + ID ); ?> - + @@ -83,57 +52,26 @@ + + + - - + > post_title; ?> - - ID, 'sp_equation', true ); - if ( $equation ): - echo str_replace( - array( '$', '+', '-', '*', '/' ), - array( '', '+', '−', '×', '÷' ), - $equation - ); - else: - echo '—'; - endif; - ?> - - - ID, 'sp_priority', true ); - if ( $priority ): - echo $priority . ' ' . str_replace( - array( 'DESC', 'ASC' ), - array( '↓', '↑' ), - get_post_meta ( $row->ID, 'sp_order', true ) - ); - else: - echo '—'; - endif; - ?> - - - ID, 'sp_abbreviation', true ); - if ( $abbreviation ): - echo $abbreviation; - else: - echo $row->post_title; - endif; - ?> - + post_name; ?> + ID ); ?> + ID ); ?> + ID ); ?> + ID ); ?> - + @@ -154,28 +92,19 @@ - + - > + > post_title; ?> post_name; ?> - - ID, 'sp_abbreviation', true ); - if ( $abbreviation ): - echo $abbreviation; - else: - echo $row->post_title; - endif; - ?> - + ID ); ?> - + @@ -196,23 +125,12 @@ - - > + > post_title; ?> post_name; ?> - - ID, 'sp_abbreviation', true ); - if ( $abbreviation ): - echo $abbreviation; - else: - echo $row->post_title; - endif; - ?> - diff --git a/admin/settings/settings.php b/admin/settings/settings.php index 5dce590d..7424d586 100644 --- a/admin/settings/settings.php +++ b/admin/settings/settings.php @@ -44,39 +44,72 @@ function sportspress_validate( $input ) { $options = get_option( 'sportspress' ); - if ( sp_array_value( $options, 'sport', null ) != sp_array_value( $input, 'sport', null ) ): + // Do nothing if sport is the same as currently selected + if ( sp_array_value( $options, 'sport', null ) == sp_array_value( $input, 'sport', null ) ) - global $sportspress_sports; + return $input; - $post_groups = sp_array_value( sp_array_value( $sportspress_sports, sp_array_value( $input, 'sport', null ), array() ), 'posts', array() ); + // Get sports presets + global $sportspress_sports; - foreach( $post_groups as $post_type => $posts ): + // Get array of post types to insert + $post_groups = sp_array_value( sp_array_value( $sportspress_sports, sp_array_value( $input, 'sport', null ), array() ), 'posts', array() ); - // Delete posts - $old_posts = get_posts( array( 'post_type' => $post_type, 'numberposts' => -1, 'posts_per_page' => -1 ) ); - foreach( $old_posts as $post ): - wp_delete_post( $post->ID, true); - endforeach; + // Loop through each post type + foreach( $post_groups as $post_type => $posts ): - // Add posts - foreach( $posts as $index => $post ): + $args = array( + 'post_type' => $post_type, + 'numberposts' => -1, + 'posts_per_page' => -1, + 'meta_query' => array( + array( + 'key' => 'sp_preset', + 'value' => 1 + ) + ) + ); + + // Delete posts + $old_posts = get_posts( $args ); + + foreach( $old_posts as $post ): + wp_delete_post( $post->ID, true); + endforeach; + + // Add posts + foreach( $posts as $index => $post ): + + // Make sure post doesn't overlap + if ( ! get_page_by_path( $post['post_name'], OBJECT, $post_type ) ): + + // Set post type $post['post_type'] = $post_type; - $post['post_name'] = sp_get_eos_safe_slug( $post['post_title'], $index ); - if ( ! get_page_by_path( $post['post_name'], OBJECT, $post['post_type'] ) ): - $post['menu_order'] = $index * 2 + 2; - $post['post_status'] = 'publish'; - $id = wp_insert_post( $post ); - if ( array_key_exists( 'meta', $post ) ): - foreach ( $post['meta'] as $key => $value ): - update_post_meta( $id, $key, $value ); - endforeach; - endif; + + // Increment menu order by 2 and publish post + $post['menu_order'] = $index * 2 + 2; + $post['post_status'] = 'publish'; + $id = wp_insert_post( $post ); + + // Flag as preset + update_post_meta( $id, 'sp_preset', 1 ); + + // Update meta + if ( array_key_exists( 'meta', $post ) ): + + foreach ( $post['meta'] as $key => $value ): + + update_post_meta( $id, $key, $value ); + + endforeach; + endif; - endforeach; + + endif; endforeach; - endif; + endforeach; return $input; } diff --git a/admin/terms/position.php b/admin/terms/position.php index 46ea12e5..eb9d59ab 100644 --- a/admin/terms/position.php +++ b/admin/terms/position.php @@ -3,7 +3,7 @@ function sp_position_term_init() { $name = __( 'Positions', 'sportspress' ); $singular_name = __( 'Position', 'sportspress' ); $lowercase_name = __( 'position', 'sportspress' ); - $object_type = array( 'sp_player', 'sp_staff' ); + $object_type = array( 'sp_player' ); $labels = sp_tax_labels( $name, $singular_name, $lowercase_name ); $args = array( 'label' => $name, @@ -14,7 +14,6 @@ function sp_position_term_init() { ); register_taxonomy( 'sp_position', $object_type, $args ); register_taxonomy_for_object_type( 'sp_position', 'sp_player' ); - register_taxonomy_for_object_type( 'sp_position', 'sp_staff' ); } add_action( 'init', 'sp_position_term_init' ); ?> \ No newline at end of file diff --git a/admin/terms/season.php b/admin/terms/season.php index 24e39871..92c98309 100644 --- a/admin/terms/season.php +++ b/admin/terms/season.php @@ -13,6 +13,10 @@ function sp_season_term_init() { 'rewrite' => array( 'slug' => 'league' ) ); register_taxonomy( 'sp_season', $object_type, $args ); + register_taxonomy_for_object_type( 'sp_season', 'sp_team' ); + register_taxonomy_for_object_type( 'sp_season', 'sp_event' ); + register_taxonomy_for_object_type( 'sp_season', 'sp_player' ); + register_taxonomy_for_object_type( 'sp_season', 'sp_staff' ); } add_action( 'init', 'sp_season_term_init' ); ?> \ No newline at end of file diff --git a/assets/js/admin.js b/assets/js/admin.js index 6ca76b6f..25bf58e9 100644 --- a/assets/js/admin.js +++ b/assets/js/admin.js @@ -1,5 +1,13 @@ jQuery(document).ready(function($){ + // Auto key placeholder + $('#poststuff #title').on('keyup', function() { + $('#sp_key').attr('placeholder', $(this).val().replace(/[^a-z]/gi,'').toLowerCase()); + }); + + // Activate auto key placeholder + $('#poststuff #title').keyup(); + // Tab switcher $('.sp-tab-panel').siblings('.sp-tab-bar').find('a').click(function() { $(this).closest('li').removeClass('wp-tab').addClass('wp-tab-active').siblings().removeClass('wp-tab-active').addClass('wp-tab').closest('.wp-tab-bar').siblings($(this).attr('href')).show().siblings('.wp-tab-panel').hide(); @@ -74,7 +82,10 @@ jQuery(document).ready(function($){ } }); - // Equation selector + // Trigger equation selector + $('.sp-equation-selector select:last').change().siblings().change(); + + // Order selector $('.sp-order-selector select:first').change(function() { if($(this).val() == '0') { $(this).siblings().prop( 'disabled', true ); @@ -83,8 +94,32 @@ jQuery(document).ready(function($){ } }); - // Trigger equation selector - $('.sp-equation-selector select:last').change().siblings().change(); + // Trigger order selector + $('.sp-order-selector select:first').change(); + + // Format selector + $('.sp-format-selector select:first').change(function() { + + $precisionselector = $('.sp-precision-selector input:first'); + $equationselector = $('.sp-equation-selector select'); + + // Precision settings + if($(this).val() == 'decimal' || $(this).val() == 'time') { + $precisionselector.prop( 'disabled', false ); + } else { + $precisionselector.prop( 'disabled', true ) + } + + // Equation settings + if($(this).val() == 'custom') { + $equationselector.prop( 'disabled', true ); + } else { + $equationselector.prop( 'disabled', false ) + } + }); + + // Trigger format selector + $('.sp-format-selector select:first').change(); // Remove slug editor in quick edit for slug-sensitive post types $('.inline-edit-sp_result, .inline-edit-sp_outcome, .inline-edit-sp_column, .inline-edit-sp_statistic').find('input[name=post_name]').closest('label').remove(); diff --git a/install.php b/install.php index 0941d9f4..eee16200 100644 --- a/install.php +++ b/install.php @@ -126,50 +126,6 @@ if ( !function_exists( 'sportspress_install' ) ) { ) ); - $pages = array( - - // Results - array( 'post_title' => 'Goals', 'post_name' => 'goals', 'post_status' => 'publish', 'post_type' => 'sp_result' ), - array( 'post_title' => '1st Half', 'post_name' => 'firsthalf', 'post_status' => 'publish', 'post_type' => 'sp_result' ), - array( 'post_title' => '2nd Half', 'post_name' => 'secondhalf', 'post_status' => 'publish', 'post_type' => 'sp_result' ), - - // Outcomes - array( 'post_title' => 'Win', 'post_name' => 'win', 'post_status' => 'publish', 'post_type' => 'sp_outcome' ), - array( 'post_title' => 'Draw', 'post_name' => 'draw', 'post_status' => 'publish', 'post_type' => 'sp_outcome' ), - array( 'post_title' => 'Loss', 'post_name' => 'loss', 'post_status' => 'publish', 'post_type' => 'sp_outcome' ), - - // Columns - array( 'post_title' => 'P', 'post_name' => 'p', 'post_status' => 'publish', 'post_type' => 'sp_column', 'meta' => array( 'sp_equation' => '$eventsplayed' ) ), - array( 'post_title' => 'W', 'post_name' => 'w', 'post_status' => 'publish', 'post_type' => 'sp_column', 'meta' => array( 'sp_equation' => '$win' ) ), - array( 'post_title' => 'D', 'post_name' => 'd', 'post_status' => 'publish', 'post_type' => 'sp_column', 'meta' => array( 'sp_equation' => '$draw' ) ), - array( 'post_title' => 'L', 'post_name' => 'l', 'post_status' => 'publish', 'post_type' => 'sp_column', 'meta' => array( 'sp_equation' => '$loss' ) ), - array( 'post_title' => 'F', 'post_name' => 'f', 'post_status' => 'publish', 'post_type' => 'sp_column', 'meta' => array( 'sp_equation' => '$goalsfor', 'sp_priority' => '3', 'sp_order' => 'DESC' ) ), - array( 'post_title' => 'A', 'post_name' => 'a', 'post_status' => 'publish', 'post_type' => 'sp_column', 'meta' => array( 'sp_equation' => '$goalsagainst' ) ), - array( 'post_title' => 'GD', 'post_name' => 'gd', 'post_status' => 'publish', 'post_type' => 'sp_column', 'meta' => array( 'sp_equation' => '$goalsfor - $goalsagainst', 'sp_priority' => '2', 'sp_order' => 'DESC' ) ), - array( 'post_title' => 'PTS', 'post_name' => 'pts', 'post_status' => 'publish', 'post_type' => 'sp_column', 'meta' => array( 'sp_equation' => '$win * 3 + $draw', 'sp_priority' => '1', 'sp_order' => 'DESC' ) ), - - // Statistics - array( 'post_title' => 'Appearances', 'post_name' => 'appearances', 'post_status' => 'publish', 'post_type' => 'sp_statistic', 'meta' => array( 'sp_equation' => '$eventsplayed' ) ), - array( 'post_title' => 'Goals', 'post_name' => 'goals', 'post_status' => 'publish', 'post_type' => 'sp_statistic', 'meta' => array( 'sp_equation' => '' ) ), - array( 'post_title' => 'Assists', 'post_name' => 'assists', 'post_status' => 'publish', 'post_type' => 'sp_statistic', 'meta' => array( 'sp_equation' => '' ) ), - array( 'post_title' => 'Yellow Cards', 'post_name' => 'yellowcards', 'post_status' => 'publish', 'post_type' => 'sp_statistic', 'meta' => array( 'sp_equation' => '' ) ), - array( 'post_title' => 'Red Cards', 'post_name' => 'redcards', 'post_status' => 'publish', 'post_type' => 'sp_statistic', 'meta' => array( 'sp_equation' => '' ) ) - ); - - $i = 1; - foreach( $pages as $args ): - if ( ! get_page_by_path( $args['post_name'], OBJECT, $args['post_type'] ) ): - $args['menu_order'] = $i; - $id = wp_insert_post( $args ); - if ( array_key_exists( 'meta', $args ) ): - foreach ( $args['meta'] as $key => $value ): - update_post_meta( $id, $key, $value ); - endforeach; - endif; - $i++; - endif; - endforeach; - update_option( 'sportspress_installed', 1 ); endif; diff --git a/languages/sportspress-ja.mo b/languages/sportspress-ja.mo index 897cd948de6d3223555caeb99a48b9296c8a6b3b..e66938c22d4969875e07002115558d179b34d9dc 100644 GIT binary patch literal 5211 zcma)-YitzP6~}J_d6_0nC~cC`lu1((D6CmSNa#8t7-NisU$qUzX%lz6d)FQ_yW{T6 z8Z5O6yUWAap_owPxR|FM12zT|OtBG|enC~MenM50d`P5fm|eR?sj4<Omhpl3w#hf0OBXQSnmO!hCTp31pXd;3cShsZII%92GV>|<^m6aFp2rhg&_4W z11X=Ez^{U<*}f6PPgJu0CNs>8f)u|AydQiEBtN^DZ-b9PKgj*P;B4sq+WhweKAPuUky^+4IsrS zXL~hB@q!@v(U^@OeqtM5lt&7r`RyRhe-|XbCzu1=e~EbwB!4%!|BtMH!1~9mXF&4% zDM)#I&i!99A3$*O^B73uo?v|eNb#QoQ3~M)X?`w)a_QXOYw z5RHF?IS-_`^Fhk@84y3QlGL9|h^$J`bWxECI=HE^{s0i$L;Q4bBI{ z+@ECbWwwJ<&rXo`?*!|E+<%!l2GYI00g~Sj+3tWe|2Eq{XZtJ^gX~!#zYJ2G zG3FoG{sHr2kmB89{Zo+Uf5!TKxExfUhe7iH6iEFF)5rDz>v)AumIgKs3lg2;IMY z$YMx2Bmkj1m<@RjLJ$2HKH;`-_rbN?j)3(4JoBl9LTjV%%S({05PE(Jse`BxdNx27 zxh?Ot8mNV=f}p(a^D6Tv%tCMtP>=LvkVXZ9<7fF=Rbt=0o>w z^2tNvN347wTnc#;@!py5tkXT$Aum8)W7|6BcflM;h;^|jYABXw>2k5~ z`IJ(_QcP(nKA*@7g_MP+i&DAGZR)yU4LHL9#P469bvb&=QDDAkx64N8oUSz1t+ zBF_xUXh@6Jp=D~Og&xy1f|_b+#`IKWQKbev50Dk zLK&4Fce zmmwUHkf_A*3)a&>v`j?xK&mc-7Q^i~VwO@C3!(Uxjc9vs6SD*ye+It3r@GF zD<;*g!rc$WJ9Kv_rl^u?#C<6xYE-4&B@65t%34J?OjH>b&ex{KkZMUvX0zs9tZJ$2 z#x`ENq$6bt-8%pl9RO1pygiL>c@6X6nGaVxR?w*O`yWMHY z%XV@UL!n%vN#x+_R6F@dUbri0ODEjE?@m5Oc_oL0 zw@!hzraOkvd*02Or$QfaU0t_R$L~;RNy#496B67joS_3Wf1+z2EoA)6#mw-K$m~4f zw2nG&9};f$GM7(J9NvxUjb=`_Ial{%SfA70G6~n^8Q0}eFLQBgWXE{R*~t{gIy1>p zWHC&emFmDc57RhW=T(vJ7^VcAUGF)Ed(xfnVca0uU0~38w{|oMA-ZS_km#*z`^Hb4 zp3$;XgYYk^ozdZFy1S(Tj`-ijY2WAU-8Z%MQw`W@b&2!ieQkE4*G{zA$yPftW+x8Y z$%A&{6wZ{LIOe5&EOYLHvwN4F82CS?*gKLUef3wFbDhp$yKvf$q&qq%G2YjYW9IDc z%5)#&`eiO9Z(Z3fCK4m*y=@F6H*w&=y%f~p2%RGwx6~;dg}e0hrE^YOhcmPvRYlp| z!;$Kw`pnpQl>6+&p*BoDOZ!I7+(R|7V+WmXXK(97SFgAE+|FETPao|T4BCw3kexb6 zJ9Xi%1Ib(%Kiz`6*q#{~bI-$$9xnIP8F6rR?ojMh!u5-5G1;6~}L(yi7wOK%r1zXfY(T4`&AJJ3Y{z*x?qY8nBBEI1-Rt!@;~8sa zHi=PHWoN0iaR@jGY2?~%LgTt_9&Rg~r}998N(faIqC!YjRUzH%!yiDE_yPhU{%7XI z-co;nt9$P6KF>Yp+%xm;@;i?Ul&z5aAl8S3kl?jD(V!$hDnuRleemPpE~W(Uz}N;+ z#Sj|Ww~xmG_%VzRGLL|?e;gz|6W}MnDPEriKZ5Z^5LH}5L;HUX!X)uJNbA1^QN^2R zNY5WZ+V?Ja7x-sz8Tc2FT=*x?lQA@224YGq2R{kk%d7`KhjAQ46`RnI-cIntU=k#I zQy|%~8zem$<{psrxggo`6o@Jgp&>hufpmV7=ck#oJb#h-E1v%ykN?1Yhgs(J_dwG7 zcaZMA0|T;u8A$fs57K+A0LkywJm1J%&uj(BuB{+ci4;hF?*hq>-MqdBB!6=t#rH{G z9|h^$2@qABWX^zO$7{?>;6I@FI!Jb2f^nqp4dz=Q-TOB98SowEU%^jdOit4NyFs$+ z9+37w04@jXnT;T-*oKDo?_ll*X}<(1pRyqNJ;3zAyD@$WqAtf( zz5&7|@j8eq-bC{N_%^r}{5MGF*1%}e+XPZRtph1O%^|*ZX z^*)gN@IX5MBjyN5ejnxapM#`#g2%HU>Ae8bJvVv&4Up`5i>Y}1Zy@cbq#(Ui5)s6w z!7Y$AkVhaf$R@}tNE3wgeFf40X@gMt5=4jGPXjJr1L;lao^?EjG+Zbx-1{n%^7$K( zt&nEOmm%$t??I?M7-6BM|16b9A+2FA%9+oiuR$JyP>xceZ0QV&l0|$SYbPwZ~B&8DdL{5Z8oevvC7Uwoo3OT$!PUnh)%gL>{?a`*EiFa z6wRJzdcKFiw3>TO&vfjCjwjkOrcayO_Db82S`Sa$-YVK1!}7#d$FyZeY%|k)bf>RR zbchaVWOGtW8NJY5JMct@lXb*)ZQvnor?x?BPne?97?gs|il9YP4ldRDoSdBzor`_V zv^C!~yngZ6Ug;W^C6XeU>J~}Eg?VIWvfuF?k+h6qSQWx$XdUpfwvWxU%>^CL^vUnr z9Zb1Sp9u$&xn9e}eO)r6wHR*3LvPU8E9tH->E$d0t~=c?GdT+vc1y!e_tRRpv}8K8 zsC&qk+k#c;)5|0mM z3_rBw2{U@x9b%`nEN35^n&J2Kgrw*5gcZGwPjBOiq0oH|{$VK^fVX4eMRt3_3(fIi zLl~9;_@!^j=uaSWh*?6b@kfg_#Ot~wIjC>q{-X)_%TzX$T+Sg%tzMgUo+p`ScaT8jqUk=KR z&an05Yr~$gV!=>TPz~$>6aQT4S&2*Zn|GIuc)+ zzD*AAbC6|}s|l^ADT|zd*4yl{9cQSir>Ch$HudaByMOWMM#GashTosi8Zg-|ZG0eM zSR&P0ykTv_Ba7R+ot&GNEs>cCEwXdLjwq3nP^ZVBu%S+@P{Bh^xuU4mjR`03cX!Yjx(&(urW>kJ$<*%sxw93!oLn#-ht1llH zDtJK!msD^C7vN8%3TIT|nhIW3g>$Mfjw_d%3NNZ$nwg&%5!IKcOJl{`2>(zjm?I@P zTYCD%(!}ZVi5GFtc~vN=;1w0%hU55O&7T^%b^UPl7c(_IRXC5sVrS{foL!zQ4&WsJ zuu5Zx;q-!A3mwc0n3I2{I(7FWG-nUoIa!#DGQfM~*BtKq#M6 z!DWhf;U!i0gtf(uamfpN{Rr1m$dRcFqZW}gkWBMb3< zc)4lMYd{U4p|!Yakw&dRqPPe^V6jxqd5M7tmCw* XNs=(e?+Y%@{Z~AfaC5=#MQi^9-d);Z diff --git a/languages/sportspress-ja.po b/languages/sportspress-ja.po index 7b4e5bc6..90383365 100644 --- a/languages/sportspress-ja.po +++ b/languages/sportspress-ja.po @@ -2,9 +2,9 @@ msgid "" msgstr "" "Project-Id-Version: SportsPress 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-08-25 13:40+1000\n" -"PO-Revision-Date: 2013-08-25 13:41+1000\n" -"Last-Translator: ThemeBoy \n" +"POT-Creation-Date: 2014-01-05 20:10+1000\n" +"PO-Revision-Date: 2014-01-05 20:12+1000\n" +"Last-Translator: Takumi \n" "Language-Team: ThemeBoy \n" "Language: ja\n" "MIME-Version: 1.0\n" @@ -12,332 +12,672 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e;_x;_ex\n" "X-Poedit-Basepath: .\n" -"X-Generator: Poedit 1.5.7\n" +"X-Generator: Poedit 1.6.3\n" "X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-SearchPath-0: ..\n" -#: ../actions.php:39 +#: ../install.php:81 +msgid "Team Manager" +msgstr "チームマネージャー" + +#: ../install.php:103 ../admin/post-types/event.php:65 +#: ../admin/post-types/staff.php:3 ../admin/post-types/staff.php:4 +msgid "Staff" +msgstr "スタッフ" + +#: ../install.php:118 ../sportspress-functions.php:530 +#: ../sportspress-functions.php:720 ../sportspress-functions.php:1315 +#: ../admin/post-types/player.php:4 +msgid "Player" +msgstr "選手" + +#: ../sportspress-actions.php:98 msgid "Scheduled" msgstr "予約済み" -#: ../actions.php:39 +#: ../sportspress-actions.php:98 ../sportspress-functions.php:377 +#: ../sportspress-functions.php:380 msgid "Played" msgstr "試合終了" -#: ../actions.php:39 +#: ../sportspress-actions.php:98 msgid "M j, Y @ G:i" msgstr "Y年n月j日 @ G:i" -#: ../actions.php:54 ../actions.php:64 ../actions.php:74 ../helpers.php:73 -#: ../helpers.php:93 ../list.php:46 ../list.php:57 ../table.php:44 +#: ../sportspress-actions.php:119 ../sportspress-actions.php:129 +#: ../sportspress-actions.php:139 ../sportspress-functions.php:74 #, php-format msgid "All %s" msgstr "すべての%s" -#: ../actions.php:54 ../event.php:32 ../event.php:133 ../list.php:26 -#: ../list.php:57 ../player.php:25 ../player.php:140 ../settings.php:78 -#: ../staff.php:25 ../staff.php:43 ../table.php:25 ../table.php:33 -#: ../team.php:3 +#: ../sportspress-actions.php:119 ../admin/post-types/event.php:36 +#: ../admin/post-types/event.php:143 ../admin/post-types/list.php:27 +#: ../admin/post-types/player.php:30 ../admin/post-types/player.php:67 +#: ../admin/post-types/player.php:184 ../admin/post-types/staff.php:27 +#: ../admin/post-types/staff.php:45 ../admin/post-types/table.php:26 +#: ../admin/post-types/table.php:36 ../admin/post-types/team.php:3 msgid "Teams" msgstr "チーム" -#: ../actions.php:64 ../player.php:139 ../position.php:3 ../staff.php:42 +#: ../sportspress-actions.php:129 ../admin/post-types/player.php:183 +#: ../admin/post-types/staff.php:44 ../admin/terms/position.php:3 msgid "Positions" msgstr "ポジション" -#: ../actions.php:74 ../division.php:3 ../event.php:134 ../list.php:27 -#: ../list.php:46 ../player.php:141 ../staff.php:44 ../table.php:26 -#: ../table.php:44 ../team.php:33 -msgid "Divisions" -msgstr "リーグレベル" +#: ../sportspress-actions.php:139 ../admin/post-types/event.php:144 +#: ../admin/post-types/list.php:28 ../admin/post-types/player.php:185 +#: ../admin/post-types/staff.php:46 ../admin/post-types/table.php:27 +#: ../admin/post-types/team.php:40 ../admin/terms/season.php:3 +msgid "Seasons" +msgstr "シーズン" -#: ../division.php:4 ../player.php:46 ../team.php:80 -msgid "Division" -msgstr "リーグレベル" +#: ../sportspress-filters.php:96 +msgid "vs" +msgstr "vs" -#: ../division.php:5 -msgid "divisions" -msgstr "リーグレベル" - -#: ../event.php:3 ../settings.php:86 -msgid "Events" -msgstr "試合" - -#: ../event.php:4 ../event.php:31 ../event.php:132 -msgid "Event" -msgstr "試合" - -#: ../event.php:5 -msgid "events" -msgstr "試合" - -#: ../event.php:33 -msgid "Article" -msgstr "戦評" - -#: ../event.php:34 -msgid "Results" -msgstr "結果" - -#: ../event.php:35 ../player.php:26 ../team.php:25 -msgid "Statistics" -msgstr "成績表" - -#: ../event.php:51 ../event.php:120 -#, php-format -msgid "Select %s" -msgstr "%sを選択" - -#: ../event.php:59 ../list.php:25 ../list.php:34 ../player.php:3 -#: ../settings.php:94 -msgid "Players" -msgstr "選手" - -#: ../event.php:60 ../staff.php:3 ../staff.php:4 -msgid "Staff" -msgstr "スタッフ" - -#: ../event.php:90 ../globals.php:4 ../globals.php:7 ../table.php:94 -#: ../team.php:4 ../team.php:32 -msgid "Team" -msgstr "チーム" - -#: ../event.php:109 ../list.php:109 ../player.php:4 -msgid "Player" -msgstr "選手" - -#: ../event.php:135 ../globals.php:12 ../globals.php:13 ../globals.php:14 -msgid "Kick-off" -msgstr "キックオフ" - -#: ../globals.php:5 ../globals.php:6 ../globals.php:18 ../globals.php:19 -#: ../globals.php:27 ../globals.php:28 ../globals.php:41 ../globals.php:45 -#: ../globals.php:49 +#: ../sportspress-functions.php:54 #, php-format msgid "Add %s" msgstr "新規%sを追加" -#: ../globals.php:5 ../globals.php:6 ../globals.php:8 ../globals.php:41 -#: ../globals.php:42 ../team.php:24 -msgid "Logo" -msgstr "ロゴ" - -#: ../globals.php:7 ../helpers.php:81 ../helpers.php:99 ../helpers.php:100 -#, php-format -msgid "Parent %s" -msgstr "親%s" - -#: ../globals.php:8 ../globals.php:20 ../globals.php:29 ../globals.php:42 -#: ../globals.php:46 ../globals.php:50 -#, php-format -msgid "Remove %s" -msgstr "%sを削除" - -#: ../globals.php:17 ../globals.php:26 ../helpers.php:426 ../player.php:138 -#: ../staff.php:41 -msgid "Name" -msgstr "名前" - -#: ../globals.php:18 ../globals.php:19 ../globals.php:20 ../globals.php:27 -#: ../globals.php:28 ../globals.php:29 ../globals.php:45 ../globals.php:46 -#: ../globals.php:49 ../globals.php:50 ../player.php:24 ../staff.php:24 -msgid "Photo" -msgstr "写真" - -#: ../globals.php:21 ../globals.php:22 ../globals.php:23 ../globals.php:30 -#: ../globals.php:31 ../globals.php:32 -msgid "Joined" -msgstr "入団日" - -#: ../helpers.php:74 ../helpers.php:97 ../helpers.php:509 +#: ../sportspress-functions.php:55 ../sportspress-functions.php:78 +#: ../sportspress-functions.php:769 #, php-format msgid "Add New %s" msgstr "新規%sを追加" -#: ../helpers.php:75 ../helpers.php:94 +#: ../sportspress-functions.php:56 ../sportspress-functions.php:75 +#: ../admin/settings/config.php:35 ../admin/settings/config.php:74 +#: ../admin/settings/config.php:107 ../admin/settings/config.php:138 #, php-format msgid "Edit %s" msgstr "%sを編集" -#: ../helpers.php:76 +#: ../sportspress-functions.php:57 #, php-format msgid "New %s" msgstr "新規%s" -#: ../helpers.php:77 ../helpers.php:95 +#: ../sportspress-functions.php:58 ../sportspress-functions.php:76 #, php-format msgid "View %s" msgstr "%sを表示" -#: ../helpers.php:78 ../helpers.php:101 +#: ../sportspress-functions.php:59 ../sportspress-functions.php:82 #, php-format msgid "Search %s" msgstr "%sを検索" -#: ../helpers.php:79 ../helpers.php:102 +#: ../sportspress-functions.php:60 ../sportspress-functions.php:83 #, php-format msgid "No %s found" msgstr "%sは見つかりませんでした" -#: ../helpers.php:80 +#: ../sportspress-functions.php:61 #, php-format msgid "No %s found in trash" msgstr "ゴミ箱内に%sは見つかりませんでした。" -#: ../helpers.php:96 +#: ../sportspress-functions.php:62 ../sportspress-functions.php:80 +#: ../sportspress-functions.php:81 ../sportspress-globals.php:7 +#, php-format +msgid "Parent %s" +msgstr "親%s" + +#: ../sportspress-functions.php:77 #, php-format msgid "Update %s" msgstr "%sを更新" -#: ../helpers.php:98 +#: ../sportspress-functions.php:79 #, php-format msgid "New %s Name" msgstr "新規%s名" -#: ../helpers.php:178 ../helpers.php:234 ../helpers.php:455 +#: ../sportspress-functions.php:251 ../sportspress-functions.php:309 +#: ../sportspress-globals.php:11 msgid "(no title)" msgstr "(タイトルなし)" -#: ../helpers.php:473 +#: ../sportspress-functions.php:377 ../sportspress-functions.php:380 +#: ../admin/post-types/event.php:3 ../admin/presets/golf.php:13 +msgid "Events" +msgstr "試合" + +#: ../sportspress-functions.php:377 +msgid "Attended" +msgstr "出場" + +#: ../sportspress-functions.php:383 ../admin/post-types/event.php:39 +#: ../admin/post-types/result.php:3 ../admin/settings/config.php:89 +#: ../admin/settings/config.php:107 +msgid "Results" +msgstr "結果" + +#: ../sportspress-functions.php:386 ../sportspress-functions.php:387 +#: ../admin/post-types/outcome.php:3 ../admin/settings/config.php:122 +#: ../admin/settings/config.php:138 +msgid "Outcomes" +msgstr "勝敗" + +#: ../sportspress-functions.php:387 +msgid "Streak" +msgstr "連勝敗" + +#: ../sportspress-functions.php:390 +msgid "Columns" +msgstr "列" + +#: ../sportspress-functions.php:393 ../admin/post-types/player.php:33 +#: ../admin/post-types/statistic.php:3 ../admin/settings/config.php:50 +#: ../admin/settings/config.php:74 +msgid "Statistics" +msgstr "成績表" + +#: ../sportspress-functions.php:402 +msgid "Operators" +msgstr "演算子" + +#: ../sportspress-functions.php:412 +msgid "Constants" +msgstr "定数" + +#: ../sportspress-functions.php:415 ../admin/post-types/event.php:56 +#: ../admin/post-types/event.php:73 +msgid "Remove" +msgstr "削除" + +#: ../sportspress-functions.php:416 ../admin/post-types/event.php:80 +msgid "Select" +msgstr "選択" + +#: ../sportspress-functions.php:490 ../sportspress-functions.php:630 +#: ../sportspress-functions.php:666 ../sportspress-functions.php:1099 +#: ../sportspress-globals.php:4 ../sportspress-globals.php:7 +#: ../admin/post-types/team.php:4 ../admin/post-types/team.php:39 +msgid "Team" +msgstr "チーム" + +#: ../sportspress-functions.php:570 ../sportspress-functions.php:582 +#: ../sportspress-functions.php:618 ../admin/terms/season.php:4 +msgid "Season" +msgstr "シーズン" + +#: ../sportspress-functions.php:582 ../sportspress-functions.php:630 +#: ../sportspress-globals.php:5 ../sportspress-globals.php:6 +#: ../sportspress-globals.php:18 ../sportspress-globals.php:19 +#: ../sportspress-globals.php:27 ../sportspress-globals.php:28 +#: ../sportspress-globals.php:42 ../sportspress-globals.php:46 +#: ../sportspress-globals.php:50 ../admin/post-types/player.php:67 +#, php-format +msgid "Select %s" +msgstr "%sを選択" + +#: ../sportspress-functions.php:670 ../admin/post-types/outcome.php:4 +msgid "Outcome" +msgstr "勝敗" + +#: ../sportspress-functions.php:694 +msgid "-- Not set --" +msgstr "-- 未設定 --" + +#: ../sportspress-functions.php:747 ../admin/presets/golf.php:27 msgid "Total" msgstr "合計" -#: ../list.php:3 +#: ../sportspress-globals.php:5 ../sportspress-globals.php:6 +#: ../sportspress-globals.php:8 ../sportspress-globals.php:42 +#: ../sportspress-globals.php:43 ../admin/post-types/team.php:28 +msgid "Logo" +msgstr "ロゴ" + +#: ../sportspress-globals.php:8 ../sportspress-globals.php:20 +#: ../sportspress-globals.php:29 ../sportspress-globals.php:43 +#: ../sportspress-globals.php:47 ../sportspress-globals.php:51 +#, php-format +msgid "Remove %s" +msgstr "%sを削除" + +#: ../sportspress-globals.php:12 ../sportspress-globals.php:13 +#: ../sportspress-globals.php:14 ../admin/post-types/event.php:145 +msgid "Kick-off" +msgstr "キックオフ" + +#: ../sportspress-globals.php:17 ../sportspress-globals.php:26 +#: ../admin/post-types/player.php:182 ../admin/post-types/staff.php:43 +msgid "Name" +msgstr "名前" + +#: ../sportspress-globals.php:18 ../sportspress-globals.php:19 +#: ../sportspress-globals.php:20 ../sportspress-globals.php:27 +#: ../sportspress-globals.php:28 ../sportspress-globals.php:29 +#: ../sportspress-globals.php:46 ../sportspress-globals.php:47 +#: ../sportspress-globals.php:50 ../sportspress-globals.php:51 +#: ../admin/post-types/player.php:29 ../admin/post-types/staff.php:26 +msgid "Photo" +msgstr "写真" + +#: ../sportspress-globals.php:21 ../sportspress-globals.php:22 +#: ../sportspress-globals.php:23 ../sportspress-globals.php:30 +#: ../sportspress-globals.php:31 ../sportspress-globals.php:32 +msgid "Joined" +msgstr "入団日" + +#: ../sportspress-globals.php:56 +msgid "Integer" +msgstr "整数" + +#: ../sportspress-globals.php:57 +msgid "Decimal" +msgstr "少数" + +#: ../sportspress-globals.php:58 +msgid "Time" +msgstr "時間" + +#: ../sportspress-globals.php:59 +msgid "Custom Field" +msgstr "カスタムフィールド" + +#: ../admin/post-types/column.php:3 ../admin/post-types/team.php:31 +#: ../admin/settings/config.php:11 ../admin/settings/config.php:35 +msgid "Table Columns" +msgstr "順位表列" + +#: ../admin/post-types/column.php:4 +msgid "Table Column" +msgstr "順位表列" + +#: ../admin/post-types/column.php:5 +msgid "table columns" +msgstr "順位表列" + +#: ../admin/post-types/column.php:25 ../admin/post-types/outcome.php:25 +#: ../admin/post-types/result.php:25 ../admin/post-types/statistic.php:25 +#: ../admin/settings/config.php:15 ../admin/settings/config.php:54 +#: ../admin/settings/config.php:93 ../admin/settings/config.php:126 +msgid "Label" +msgstr "ラベル" + +#: ../admin/post-types/column.php:26 ../admin/post-types/column.php:51 +#: ../admin/post-types/outcome.php:26 ../admin/post-types/outcome.php:38 +#: ../admin/post-types/result.php:26 ../admin/post-types/result.php:40 +#: ../admin/post-types/statistic.php:26 ../admin/post-types/statistic.php:51 +#: ../admin/settings/config.php:16 ../admin/settings/config.php:55 +#: ../admin/settings/config.php:94 ../admin/settings/config.php:127 +msgid "Key" +msgstr "キー" + +#: ../admin/post-types/column.php:27 ../admin/post-types/column.php:55 +#: ../admin/post-types/result.php:27 ../admin/post-types/result.php:44 +#: ../admin/post-types/statistic.php:27 ../admin/post-types/statistic.php:55 +#: ../admin/settings/config.php:17 ../admin/settings/config.php:56 +#: ../admin/settings/config.php:95 +msgid "Format" +msgstr "フォーマット" + +#: ../admin/post-types/column.php:28 ../admin/post-types/column.php:65 +#: ../admin/post-types/statistic.php:28 ../admin/post-types/statistic.php:65 +#: ../admin/settings/config.php:18 ../admin/settings/config.php:57 +msgid "Precision" +msgstr "浮動小数点数" + +#: ../admin/post-types/column.php:29 ../admin/post-types/column.php:69 +#: ../admin/post-types/statistic.php:29 ../admin/post-types/statistic.php:69 +#: ../admin/settings/config.php:19 ../admin/settings/config.php:58 +msgid "Equation" +msgstr "方程式" + +#: ../admin/post-types/column.php:30 ../admin/post-types/column.php:77 +#: ../admin/post-types/statistic.php:30 ../admin/post-types/statistic.php:77 +#: ../admin/settings/config.php:20 ../admin/settings/config.php:59 +msgid "Sort Order" +msgstr "ソート順" + +#: ../admin/post-types/column.php:37 ../admin/post-types/outcome.php:33 +#: ../admin/post-types/result.php:34 ../admin/post-types/statistic.php:37 +msgid "Details" +msgstr "詳細" + +#: ../admin/post-types/column.php:81 ../admin/post-types/statistic.php:81 +msgid "Disable" +msgstr "無効化" + +#: ../admin/post-types/column.php:89 ../admin/post-types/statistic.php:89 +msgid "Descending" +msgstr "降順" + +#: ../admin/post-types/column.php:89 ../admin/post-types/statistic.php:89 +msgid "Ascending" +msgstr "昇順" + +#: ../admin/post-types/event.php:4 ../admin/post-types/event.php:35 +#: ../admin/post-types/event.php:142 +msgid "Event" +msgstr "試合" + +#: ../admin/post-types/event.php:5 +msgid "events" +msgstr "試合" + +#: ../admin/post-types/event.php:38 ../admin/post-types/event.php:64 +#: ../admin/post-types/list.php:26 ../admin/post-types/list.php:37 +#: ../admin/post-types/player.php:3 +msgid "Players" +msgstr "選手" + +#: ../admin/post-types/event.php:41 +msgid "Article" +msgstr "戦評" + +#: ../admin/post-types/list.php:3 msgid "Player Lists" msgstr "選手名鑑" -#: ../list.php:4 ../list.php:35 +#: ../admin/post-types/list.php:4 ../admin/post-types/list.php:40 msgid "Player List" msgstr "選手名鑑" -#: ../list.php:5 +#: ../admin/post-types/list.php:5 msgid "player lists" msgstr "選手名鑑" -#: ../list.php:24 ../table.php:24 +#: ../admin/post-types/list.php:25 ../admin/post-types/table.php:25 msgid "Title" msgstr "タイトル" -#: ../player.php:5 +#: ../admin/post-types/outcome.php:5 +msgid "outcome" +msgstr "勝敗" + +#: ../admin/post-types/player.php:5 msgid "players" msgstr "選手" -#: ../player.php:22 ../staff.php:22 ../team.php:22 +#: ../admin/post-types/player.php:27 ../admin/post-types/staff.php:24 +#: ../admin/post-types/team.php:26 msgid "Publish" msgstr "公開" -#: ../player.php:27 ../staff.php:26 +#: ../admin/post-types/player.php:36 ../admin/post-types/staff.php:28 msgid "Profile" msgstr "プロフィール" -#: ../player.php:82 -msgid "Overall" -msgstr "全般" +#: ../admin/post-types/result.php:4 +msgid "Result" +msgstr "結果" -#: ../position.php:4 -msgid "Position" -msgstr "ポジション" +#: ../admin/post-types/result.php:5 +msgid "result" +msgstr "結果" -#: ../position.php:5 -msgid "position" -msgstr "ポジション" - -#: ../settings.php:5 ../settings.php:20 -msgid "SportsPress Settings" -msgstr "SportsPress 設定" - -#: ../settings.php:6 -msgid "SportsPress" -msgstr "SportsPress" - -#: ../settings.php:39 -msgid "P" -msgstr "P" - -#: ../settings.php:40 -msgid "W" -msgstr "W" - -#: ../settings.php:41 -msgid "D" -msgstr "D" - -#: ../settings.php:42 -msgid "L" -msgstr "L" - -#: ../settings.php:43 -msgid "F" -msgstr "F" - -#: ../settings.php:44 -msgid "A" -msgstr "A" - -#: ../settings.php:45 -msgid "GD" -msgstr "GD" - -#: ../settings.php:46 -msgid "PTS" -msgstr "PTS" - -#: ../settings.php:48 ../settings.php:52 -msgid "Goals" -msgstr "ゴール" - -#: ../settings.php:49 -msgid "1st Half" -msgstr "前半" - -#: ../settings.php:50 -msgid "2nd Half" -msgstr "後半" - -#: ../settings.php:53 -msgid "Assists" -msgstr "アシスト" - -#: ../settings.php:54 -msgid "Yellow Cards" -msgstr "警告" - -#: ../settings.php:55 -msgid "Red Cards" -msgstr "退場" - -#: ../sponsor.php:3 -msgid "Sponsors" -msgstr "スポンサー" - -#: ../sponsor.php:4 -msgid "Sponsor" -msgstr "スポンサー" - -#: ../sponsor.php:5 -msgid "sponsors" -msgstr "スポンサー" - -#: ../staff.php:5 +#: ../admin/post-types/staff.php:5 msgid "staff" msgstr "スタッフ" -#: ../table.php:3 +#: ../admin/post-types/statistic.php:4 +msgid "Statistic" +msgstr "統計" + +#: ../admin/post-types/statistic.php:5 +msgid "statistics" +msgstr "統計" + +#: ../admin/post-types/table.php:3 msgid "League Tables" msgstr "順位表" -#: ../table.php:4 ../table.php:34 +#: ../admin/post-types/table.php:4 ../admin/post-types/table.php:39 msgid "League Table" msgstr "順位表" -#: ../table.php:5 +#: ../admin/post-types/table.php:5 msgid "league tables" msgstr "順位表" -#: ../team.php:5 +#: ../admin/post-types/team.php:5 msgid "teams" msgstr "チーム" +#: ../admin/presets/baseball.php:5 +msgid "Baseball" +msgstr "野球" + +#: ../admin/presets/basketball.php:5 +msgid "Basketball" +msgstr "バスケットボール" + +#: ../admin/presets/cricket.php:5 +msgid "Cricket" +msgstr "クリケット" + +#: ../admin/presets/football.php:5 +msgid "American Football" +msgstr "アメリカンフットボール" + +#: ../admin/presets/footy.php:5 +msgid "Australian Rules Football" +msgstr "オージーフットボール" + +#: ../admin/presets/gaming.php:5 +msgid "Competitive Gaming" +msgstr "ゲーミング" + +#: ../admin/presets/golf.php:5 +msgid "Golf" +msgstr "ゴルフ" + +#: ../admin/presets/hockey.php:5 +msgid "Hockey" +msgstr "ホッケー" + +#: ../admin/presets/presets.php:20 +msgid "Custom" +msgstr "カスタム" + +#: ../admin/presets/racing.php:5 +msgid "Racing" +msgstr "レーシング" + +#: ../admin/presets/rugby.php:5 +msgid "Rugby" +msgstr "ラグビー" + +#: ../admin/presets/soccer.php:5 +msgid "Association Football (Soccer)" +msgstr "サッカー" + +#: ../admin/presets/soccer.php:91 +msgid "Appearances" +msgstr "出場" + +#: ../admin/presets/soccer.php:100 ../admin/presets/soccer.php:141 +msgid "Goals" +msgstr "得点" + +#: ../admin/presets/soccer.php:111 +msgid "Assists" +msgstr "アシスト" + +#: ../admin/presets/soccer.php:120 +msgid "Yellow Cards" +msgstr "警告" + +#: ../admin/presets/soccer.php:129 +msgid "Red Cards" +msgstr "退場" + +#: ../admin/settings/general.php:1 +msgid "General Settings" +msgstr "一般設定" + +#: ../admin/settings/settings.php:5 ../admin/settings/settings.php:6 +#: ../admin/settings/settings.php:23 +msgid "SportsPress" +msgstr "SportsPress" + +#: ../admin/settings/settings.php:24 +msgid "Configure" +msgstr "設定" + +#: ../admin/settings/settings.php:134 +msgid "Sport" +msgstr "スポーツ" + +#: ../admin/terms/position.php:4 +msgid "Position" +msgstr "ポジション" + +#: ../admin/terms/position.php:5 +msgid "position" +msgstr "ポジション" + +#: ../admin/terms/season.php:5 +msgid "season" +msgstr "シーズン" + +#~ msgid "W" +#~ msgstr "W" + +#~ msgid "L" +#~ msgstr "L" + +#~ msgid "Abbreviation" +#~ msgstr "略語" + +#~ msgid "Wins" +#~ msgstr "勝" + +#~ msgid "Losses" +#~ msgstr "敗" + +#~ msgid "Win Percentage" +#~ msgstr "勝率" + +#~ msgid "1st Inning" +#~ msgstr "1回" + +#~ msgid "2nd Inning" +#~ msgstr "2回" + +#~ msgid "3rd Inning" +#~ msgstr "3回" + +#~ msgid "4th Inning" +#~ msgstr "4回" + +#~ msgid "5th Inning" +#~ msgstr "5回" + +#~ msgid "6th Inning" +#~ msgstr "6回" + +#~ msgid "7th Inning" +#~ msgstr "7回" + +#~ msgid "8th Inning" +#~ msgstr "8回" + +#~ msgid "9th Inning" +#~ msgstr "9回" + +#~ msgid "Extra Innings" +#~ msgstr "延長" + +#~ msgid "Runs" +#~ msgstr "ラン" + +#~ msgid "Hits" +#~ msgstr "ヒット" + +#~ msgid "Errors" +#~ msgstr "エラー" + +#~ msgid "Win" +#~ msgstr "勝" + +#~ msgid "Loss" +#~ msgstr "敗" + +#~ msgid "Overtime" +#~ msgstr "延長" + +#~ msgid "Pct" +#~ msgstr "勝率" + +#~ msgid "PF" +#~ msgstr "PF" + +#~ msgid "PA" +#~ msgstr "PA" + +#, fuzzy +#~ msgid "Goals For" +#~ msgstr "ゴール" + +#~ msgid "1st Half" +#~ msgstr "前半" + +#~ msgid "2nd Half" +#~ msgstr "後半" + +#~ msgid "RA" +#~ msgstr "RA" + +#~ msgid "P" +#~ msgstr "P" + +#~ msgid "D" +#~ msgstr "D" + +#~ msgid "F" +#~ msgstr "F" + +#~ msgid "A" +#~ msgstr "A" + +#~ msgid "XP" +#~ msgstr "XP" + +#~ msgid "GP" +#~ msgstr "GP" + +#~ msgid "GF" +#~ msgstr "GF" + +#~ msgid "GA" +#~ msgstr "GA" + +#~ msgid "GD" +#~ msgstr "GD" + +#~ msgid "Divisions" +#~ msgstr "リーグレベル" + +#~ msgid "Division" +#~ msgstr "リーグレベル" + +#~ msgid "divisions" +#~ msgstr "リーグレベル" + +#~ msgid "Overall" +#~ msgstr "全般" + +#~ msgid "SportsPress Settings" +#~ msgstr "SportsPress 設定" + +#~ msgid "PTS" +#~ msgstr "PTS" + +#~ msgid "Sponsors" +#~ msgstr "スポンサー" + +#~ msgid "Sponsor" +#~ msgstr "スポンサー" + +#~ msgid "sponsors" +#~ msgstr "スポンサー" + #~ msgid "Leagues" #~ msgstr "リーグ" diff --git a/sportspress-actions.php b/sportspress-actions.php index d4c9fc94..2694b55e 100644 --- a/sportspress-actions.php +++ b/sportspress-actions.php @@ -68,40 +68,20 @@ function sp_manage_posts_custom_column( $column, $post_id ) { endforeach; break; case 'sp_equation': - $equation = get_post_meta ( $post_id, 'sp_equation', true ); - if ( $equation ): - echo str_replace( - array( '$', '+', '-', '*', '/' ), - array( '', '+', '−', '×', '÷' ), - $equation - ); - else: - echo '—'; - endif; + echo sp_get_post_equation( $post_id ); break; case 'sp_order': - $priority = get_post_meta ( $post_id, 'sp_priority', true ); - if ( $priority ): - echo $priority . ' ' . str_replace( - array( 'DESC', 'ASC' ), - array( '↓', '↑' ), - get_post_meta ( $post_id, 'sp_order', true ) - ); - else: - echo '—'; - endif; - break; - case 'sp_abbreviation': - $abbreviation = get_post_meta ( $post_id, 'sp_abbreviation', true ); - if ( $abbreviation ): - echo $abbreviation; - else: - echo get_the_title( $post_id ); - endif; + echo sp_get_post_order( $post_id ); break; case 'sp_key': echo $post->post_name; break; + case 'sp_format': + echo sp_get_post_format( $post_id ); + break; + case 'sp_precision': + echo sp_get_post_precision( $post_id ); + break; case 'sp_player': echo sp_the_posts( $post_id, 'sp_player' ); break; @@ -205,29 +185,14 @@ function sp_save_post( $post_id ) { break; - case ( 'sp_result' ): - - // Update abbreviation as string - update_post_meta( $post_id, 'sp_abbreviation', sp_array_value( $_POST, 'sp_abbreviation', '' ) ); - - break; - - case ( 'sp_outcome' ): - - // Update abbreviation as string - update_post_meta( $post_id, 'sp_abbreviation', sp_array_value( $_POST, 'sp_abbreviation', '' ) ); - - break; - - case ( 'sp_result' ): - - // Update abbreviation as string - update_post_meta( $post_id, 'sp_abbreviation', sp_array_value( $_POST, 'sp_abbreviation', '' ) ); - - break; - case ( 'sp_column' ): + // Update format as string + update_post_meta( $post_id, 'sp_format', sp_array_value( $_POST, 'sp_format', 'integer' ) ); + + // Update precision as integer + update_post_meta( $post_id, 'sp_precision', (int) sp_array_value( $_POST, 'sp_precision', 1 ) ); + // Update equation as string update_post_meta( $post_id, 'sp_equation', implode( ' ', sp_array_value( $_POST, 'sp_equation', array() ) ) ); @@ -237,25 +202,32 @@ function sp_save_post( $post_id ) { // Update sort order as string update_post_meta( $post_id, 'sp_order', sp_array_value( $_POST, 'sp_order', 'DESC' ) ); - // Update abbreviation as string - update_post_meta( $post_id, 'sp_abbreviation', sp_array_value( $_POST, 'sp_abbreviation', '' ) ); - - // Update precision as integer - update_post_meta( $post_id, 'sp_precision', (int) sp_array_value( $_POST, 'sp_precision', 1 ) ); - break; case ( 'sp_statistic' ): - // Update equation as string - update_post_meta( $post_id, 'sp_equation', implode( ' ', sp_array_value( $_POST, 'sp_equation', array() ) ) ); - - // Update abbreviation as string - update_post_meta( $post_id, 'sp_abbreviation', sp_array_value( $_POST, 'sp_abbreviation', '' ) ); + // Update format as string + update_post_meta( $post_id, 'sp_format', sp_array_value( $_POST, 'sp_format', 'integer' ) ); // Update precision as integer update_post_meta( $post_id, 'sp_precision', (int) sp_array_value( $_POST, 'sp_precision', 1 ) ); + // Update equation as string + update_post_meta( $post_id, 'sp_equation', implode( ' ', sp_array_value( $_POST, 'sp_equation', array() ) ) ); + + // Update sort order as string + update_post_meta( $post_id, 'sp_priority', sp_array_value( $_POST, 'sp_priority', '0' ) ); + + // Update sort order as string + update_post_meta( $post_id, 'sp_order', sp_array_value( $_POST, 'sp_order', 'DESC' ) ); + + break; + + case ( 'sp_result' ): + + // Update format as string + update_post_meta( $post_id, 'sp_format', sp_array_value( $_POST, 'sp_format', 'integer' ) ); + break; case ( 'sp_player' ): diff --git a/sportspress-filters.php b/sportspress-filters.php index fe2a08ba..9b96013e 100644 --- a/sportspress-filters.php +++ b/sportspress-filters.php @@ -61,7 +61,11 @@ function sp_sanitize_title( $title ) { if ( isset( $_POST ) && array_key_exists( 'post_type', $_POST ) && in_array( $_POST['post_type'], array( 'sp_result', 'sp_outcome', 'sp_column', 'sp_statistic' ) ) ): - $title = sp_get_eos_safe_slug( $_POST['post_title'], $_POST['ID'] ); + $key = $_POST['sp_key']; + + if ( ! $key ) $key = $_POST['post_title']; + + $title = sp_get_eos_safe_slug( $key, $_POST['ID'] ); elseif ( isset( $_POST ) && array_key_exists( 'post_type', $_POST ) && $_POST['post_type'] == 'sp_event' ): diff --git a/sportspress-functions.php b/sportspress-functions.php index 4c56c40d..289a7d47 100644 --- a/sportspress-functions.php +++ b/sportspress-functions.php @@ -101,6 +101,59 @@ if ( !function_exists( 'sp_get_the_term_id' ) ) { } } +if ( !function_exists( 'sp_get_post_format' ) ) { + function sp_get_post_format( $post_id ) { + $format = get_post_meta ( $post_id, 'sp_format', true ); + if ( $format ): + global $sportspress_config_formats; + return sp_array_value( $sportspress_config_formats, $format, '—' ); + else: + return '—'; + endif; + } +} + +if ( !function_exists( 'sp_get_post_precision' ) ) { + function sp_get_post_precision( $post_id ) { + $precision = get_post_meta ( $post_id, 'sp_precision', true ); + if ( $precision ): + return $precision; + else: + return '1'; + endif; + } +} + +if ( !function_exists( 'sp_get_post_equation' ) ) { + function sp_get_post_equation( $post_id ) { + $equation = get_post_meta ( $post_id, 'sp_equation', true ); + if ( $equation ): + return str_replace( + array( '$', '+', '-', '*', '/' ), + array( '', '+', '−', '×', '÷' ), + $equation + ); + else: + return '—'; + endif; + } +} + +if ( !function_exists( 'sp_get_post_order' ) ) { + function sp_get_post_order( $post_id ) { + $priority = get_post_meta ( $post_id, 'sp_priority', true ); + if ( $priority ): + return $priority . ' ' . str_replace( + array( 'DESC', 'ASC' ), + array( '↓', '↑' ), + get_post_meta ( $post_id, 'sp_order', true ) + ); + else: + return '—'; + endif; + } +} + if ( !function_exists( 'sp_dropdown_taxonomies' ) ) { function sp_dropdown_taxonomies( $args = array() ) { $defaults = array( @@ -933,8 +986,7 @@ if ( !function_exists( 'sp_get_table' ) ) { if ( $outcomes ): $outcome = $outcomes[0]; - $abbreviation = get_post_meta( $outcome->ID, 'sp_abbreviation', true ); - $totals[ $team_id ]['streak'] = ( $abbreviation ? $abbreviation : $outcome->post_title ) . $streak['count']; + $totals[ $team_id ]['streak'] = $outcome->post_title . $streak['count']; endif; endforeach; diff --git a/sportspress-globals.php b/sportspress-globals.php index 83b7d1be..6a8d0dc9 100644 --- a/sportspress-globals.php +++ b/sportspress-globals.php @@ -1,4 +1,8 @@ array( 'Enter title here' => __( 'Team', 'sportspress' ), @@ -51,4 +55,11 @@ $sportspress_thumbnail_texts = array( 'Remove featured image' => sprintf( __( 'Remove %s', 'sportspress' ), __( 'Photo', 'sportspress' ) ) ) ); + +$sportspress_config_formats = array( + 'integer' => __( 'Integer', 'sportspress' ), + 'decimal' => __( 'Decimal', 'sportspress' ), + 'time' => __( 'Time', 'sportspress' ), + 'custom' => __( 'Custom Field', 'sportspress' ), +); ?> \ No newline at end of file diff --git a/sportspress.php b/sportspress.php index 4c7211f4..95578ead 100644 --- a/sportspress.php +++ b/sportspress.php @@ -20,6 +20,7 @@ if ( !function_exists( 'add_action' ) ) { define( 'SPORTSPRESS_VERSION', '0.1' ); define( 'SPORTSPRESS_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); +define( 'SPORTSPRESS_PLUGIN_DIRNAME', dirname( __FILE__ ) ); // Libraries include dirname( __FILE__ ) . '/lib/eos/eos.class.php' ; @@ -51,7 +52,21 @@ require_once dirname( __FILE__ ) . '/admin/terms/season.php'; require_once dirname( __FILE__ ) . '/admin/terms/position.php'; // Presets -include dirname( __FILE__ ) . '/admin/presets/presets.php' ; +include_once dirname( __FILE__ ) . '/admin/presets/soccer.php'; +include_once dirname( __FILE__ ) . '/admin/presets/football.php'; +include_once dirname( __FILE__ ) . '/admin/presets/footy.php'; +include_once dirname( __FILE__ ) . '/admin/presets/baseball.php'; +include_once dirname( __FILE__ ) . '/admin/presets/basketball.php'; +include_once dirname( __FILE__ ) . '/admin/presets/gaming.php'; +include_once dirname( __FILE__ ) . '/admin/presets/cricket.php'; +include_once dirname( __FILE__ ) . '/admin/presets/golf.php'; +include_once dirname( __FILE__ ) . '/admin/presets/handball.php'; +include_once dirname( __FILE__ ) . '/admin/presets/hockey.php'; +include_once dirname( __FILE__ ) . '/admin/presets/racing.php'; +include_once dirname( __FILE__ ) . '/admin/presets/rugby.php'; +include_once dirname( __FILE__ ) . '/admin/presets/swimming.php'; +include_once dirname( __FILE__ ) . '/admin/presets/tennis.php'; +include_once dirname( __FILE__ ) . '/admin/presets/volleyball.php'; // Install include dirname( __FILE__ ) . '/install.php';