Fix presets, config post types and Japanese translations
This commit is contained in:
@@ -23,9 +23,11 @@ function sp_column_edit_columns() {
|
||||
$columns = array(
|
||||
'cb' => '<input type="checkbox" />',
|
||||
'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;
|
||||
?>
|
||||
<p><strong><?php _e( 'Key', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<input name="sp_key" type="text" id="sp_key" value="<?php echo $post->post_name; ?>">
|
||||
</p>
|
||||
<p><strong><?php _e( 'Format', 'sportspress' ); ?></strong></p>
|
||||
<p class="sp-format-selector">
|
||||
<select name="sp_format">
|
||||
<?php
|
||||
foreach ( $sportspress_config_formats as $key => $value ):
|
||||
printf( '<option value="%s" %s>%s</option>', $key, selected( true, $key == $priority, false ), $value );
|
||||
endforeach;
|
||||
?>
|
||||
</select>
|
||||
</p>
|
||||
<p><strong><?php _e( 'Precision', 'sportspress' ); ?></strong></p>
|
||||
<p class="sp-precision-selector">
|
||||
<input name="sp_precision" type="text" size="4" id="sp_precision" value="<?php echo $precision; ?>" placeholder="1">
|
||||
</p>
|
||||
<p><strong><?php _e( 'Equation', 'sportspress' ); ?></strong></p>
|
||||
<p class="sp-equation-selector">
|
||||
<?php
|
||||
@@ -63,7 +84,7 @@ function sp_column_details_meta( $post ) {
|
||||
endforeach;
|
||||
?>
|
||||
</select>
|
||||
<select name="sp_order"<?php if ( ! $priority ): ?> disabled="disabled;"<?php endif; ?>>
|
||||
<select name="sp_order">
|
||||
<?php
|
||||
$options = array( 'DESC' => __( 'Descending', 'sportspress' ), 'ASC' => __( 'Ascending', 'sportspress' ) );
|
||||
foreach ( $options as $key => $value ):
|
||||
@@ -72,14 +93,6 @@ function sp_column_details_meta( $post ) {
|
||||
?>
|
||||
</select>
|
||||
</p>
|
||||
<p><strong><?php _e( 'Precision', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<input name="sp_precision" type="text" size="4" id="sp_precision" value="<?php echo $precision; ?>">
|
||||
</p>
|
||||
<p><strong><?php _e( 'Abbreviation', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<input name="sp_abbreviation" type="text" size="4" id="sp_abbreviation" value="<?php echo $abbreviation; ?>">
|
||||
</p>
|
||||
<?php
|
||||
sp_nonce();
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ function sp_outcome_edit_columns() {
|
||||
'cb' => '<input type="checkbox" />',
|
||||
'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 );
|
||||
?>
|
||||
<p><strong><?php _e( 'Abbreviation', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php _e( 'Key', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<input name="sp_abbreviation" type="text" size="4" id="sp_abbreviation" value="<?php echo $abbreviation; ?>">
|
||||
<input name="sp_key" type="text" id="sp_key" value="<?php echo $post->post_name; ?>">
|
||||
</p>
|
||||
<?php
|
||||
sp_nonce();
|
||||
|
||||
@@ -24,7 +24,7 @@ function sp_result_edit_columns() {
|
||||
'cb' => '<input type="checkbox" />',
|
||||
'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;
|
||||
?>
|
||||
<p><strong><?php _e( 'Abbreviation', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php _e( 'Key', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<input name="sp_abbreviation" type="text" size="4" id="sp_abbreviation" value="<?php echo $abbreviation; ?>">
|
||||
<input name="sp_key" type="text" id="sp_key" value="<?php echo $post->post_name; ?>">
|
||||
</p>
|
||||
<p><strong><?php _e( 'Format', 'sportspress' ); ?></strong></p>
|
||||
<p class="sp-format-selector">
|
||||
<select name="sp_format">
|
||||
<?php
|
||||
foreach ( $sportspress_config_formats as $key => $value ):
|
||||
printf( '<option value="%s" %s>%s</option>', $key, selected( true, $key == $priority, false ), $value );
|
||||
endforeach;
|
||||
?>
|
||||
</select>
|
||||
</p>
|
||||
<?php
|
||||
sp_nonce();
|
||||
|
||||
@@ -23,28 +23,50 @@ function sp_statistic_edit_columns() {
|
||||
$columns = array(
|
||||
'cb' => '<input type="checkbox" />',
|
||||
'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;
|
||||
?>
|
||||
<p><strong><?php _e( 'Key', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<input name="sp_key" type="text" id="sp_key" value="<?php echo $post->post_name; ?>">
|
||||
</p>
|
||||
<p><strong><?php _e( 'Format', 'sportspress' ); ?></strong></p>
|
||||
<p class="sp-format-selector">
|
||||
<select name="sp_format">
|
||||
<?php
|
||||
foreach ( $sportspress_config_formats as $key => $value ):
|
||||
printf( '<option value="%s" %s>%s</option>', $key, selected( true, $key == $priority, false ), $value );
|
||||
endforeach;
|
||||
?>
|
||||
</select>
|
||||
</p>
|
||||
<p><strong><?php _e( 'Precision', 'sportspress' ); ?></strong></p>
|
||||
<p class="sp-precision-selector">
|
||||
<input name="sp_precision" type="text" size="4" id="sp_precision" value="<?php echo $precision; ?>" placeholder="1">
|
||||
</p>
|
||||
<p><strong><?php _e( 'Equation', 'sportspress' ); ?></strong></p>
|
||||
<p class="sp-equation-selector">
|
||||
<?php
|
||||
foreach ( $equation as $piece ):
|
||||
@@ -70,13 +92,6 @@ function sp_statistic_equation_meta( $post ) {
|
||||
endforeach;
|
||||
?>
|
||||
</select>
|
||||
<p><strong><?php _e( 'Precision', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<input name="sp_precision" type="text" size="4" id="sp_precision" value="<?php echo $precision; ?>">
|
||||
</p>
|
||||
<p><strong><?php _e( 'Abbreviation', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<input name="sp_abbreviation" type="text" size="4" id="sp_abbreviation" value="<?php echo $abbreviation; ?>">
|
||||
</p>
|
||||
<?php
|
||||
sp_nonce();
|
||||
|
||||
@@ -154,8 +154,7 @@ function sp_team_columns_meta( $post ) {
|
||||
|
||||
if ( $outcomes ):
|
||||
$outcome = $outcomes[0];
|
||||
$abbreviation = get_post_meta( $outcome->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
|
||||
|
||||
@@ -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' )
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -1,127 +1,87 @@
|
||||
<?php
|
||||
global $sportspress_sports;
|
||||
|
||||
$sportspress_sports['baseball'] = array(
|
||||
'name' => __( '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'
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -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'
|
||||
// Outcomes
|
||||
'sp_outcome' => array(
|
||||
),
|
||||
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' )
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -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'
|
||||
// Outcomes
|
||||
'sp_outcome' => array(
|
||||
),
|
||||
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' )
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -4,106 +4,73 @@ global $sportspress_sports;
|
||||
$sportspress_sports['footy'] = array(
|
||||
'name' => __( 'Australian Rules Football', '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' => 'L',
|
||||
'post_name' => 'l',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$l',
|
||||
)
|
||||
),
|
||||
array(
|
||||
'post_title' => 'D',
|
||||
'post_name' => 'd',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$d',
|
||||
)
|
||||
),
|
||||
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' => 'Pct',
|
||||
'post_name' => 'pct',
|
||||
'meta' => array(
|
||||
'sp_equation' => '( $w / $eventsplayed ) * 10 * 10',
|
||||
)
|
||||
),
|
||||
array(
|
||||
'post_title' => 'Pts',
|
||||
'post_name' => 'pts',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$pts',
|
||||
)
|
||||
)
|
||||
),
|
||||
// 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'
|
||||
// Outcomes
|
||||
'sp_outcome' => array(
|
||||
),
|
||||
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' )
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -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'
|
||||
// Outcomes
|
||||
'sp_outcome' => array(
|
||||
),
|
||||
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' )
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -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' => '' )
|
||||
)
|
||||
'post_title' => 'PG',
|
||||
'post_name' => 'gained',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$ptsfor',
|
||||
),
|
||||
// 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'
|
||||
// Outcomes
|
||||
'sp_outcome' => array(
|
||||
),
|
||||
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' )
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -1,109 +0,0 @@
|
||||
<?php
|
||||
global $sportspress_sports;
|
||||
|
||||
$sportspress_sports['handball'] = array(
|
||||
'name' => __( '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' )
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -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' )
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
$sportspress_sports = array();
|
||||
|
||||
include_once dirname( __FILE__ ) . '/soccer.php';
|
||||
include_once dirname( __FILE__ ) . '/football.php';
|
||||
include_once dirname( __FILE__ ) . '/footy.php';
|
||||
include_once dirname( __FILE__ ) . '/baseball.php';
|
||||
include_once dirname( __FILE__ ) . '/basketball.php';
|
||||
include_once dirname( __FILE__ ) . '/gaming.php';
|
||||
include_once dirname( __FILE__ ) . '/cricket.php';
|
||||
include_once dirname( __FILE__ ) . '/golf.php';
|
||||
include_once dirname( __FILE__ ) . '/handball.php';
|
||||
include_once dirname( __FILE__ ) . '/hockey.php';
|
||||
include_once dirname( __FILE__ ) . '/racing.php';
|
||||
include_once dirname( __FILE__ ) . '/rugby.php';
|
||||
include_once dirname( __FILE__ ) . '/swimming.php';
|
||||
include_once dirname( __FILE__ ) . '/tennis.php';
|
||||
include_once dirname( __FILE__ ) . '/volleyball.php';
|
||||
|
||||
$sportspress_sports[] = array( 'name' => __( 'Custom', 'sportspress' ), 'posts' => array() );
|
||||
?>
|
||||
@@ -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' => '' )
|
||||
)
|
||||
'post_title' => 'DNF',
|
||||
'post_name' => 'dnf',
|
||||
'meta' => array(
|
||||
'sp_equation' => '$dnf',
|
||||
),
|
||||
// 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'
|
||||
// Outcomes
|
||||
'sp_outcome' => array(
|
||||
),
|
||||
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' )
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -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'
|
||||
// Outcomes
|
||||
'sp_outcome' => array(
|
||||
),
|
||||
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' )
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -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',
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -1,109 +0,0 @@
|
||||
<?php
|
||||
global $sportspress_sports;
|
||||
|
||||
$sportspress_sports['swimming'] = array(
|
||||
'name' => __( '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' )
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -1,109 +0,0 @@
|
||||
<?php
|
||||
global $sportspress_sports;
|
||||
|
||||
$sportspress_sports['tennis'] = array(
|
||||
'name' => __( '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' )
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -1,109 +0,0 @@
|
||||
<?php
|
||||
global $sportspress_sports;
|
||||
|
||||
$sportspress_sports['volleyball'] = array(
|
||||
'name' => __( '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' )
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -13,57 +13,26 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php _e( 'Label', 'sportspress' ); ?></th>
|
||||
<th><?php _e( 'Key', 'sportspress' ); ?></th>
|
||||
<th><?php _e( 'Format', 'sportspress' ); ?></th>
|
||||
<th><?php _e( 'Precision', 'sportspress' ); ?></th>
|
||||
<th><?php _e( 'Equation', 'sportspress' ); ?></th>
|
||||
<th><?php _e( 'Sort Order', 'sportspress' ); ?></th>
|
||||
<th><?php _e( 'Abbreviation', 'sportspress' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php $i = 0; foreach ( $data as $row ): ?>
|
||||
<tr>
|
||||
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
|
||||
<td class="row-title"><?php echo $row->post_title; ?></td>
|
||||
<td>
|
||||
<?php
|
||||
$equation = get_post_meta ( $row->ID, 'sp_equation', true );
|
||||
if ( $equation ):
|
||||
echo str_replace(
|
||||
array( '$', '+', '-', '*', '/' ),
|
||||
array( '', '+', '−', '×', '÷' ),
|
||||
$equation
|
||||
);
|
||||
else:
|
||||
echo '—';
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
$priority = get_post_meta ( $row->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;
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
$abbreviation = get_post_meta ( $row->ID, 'sp_abbreviation', true );
|
||||
if ( $abbreviation ):
|
||||
echo $abbreviation;
|
||||
else:
|
||||
echo $row->post_title;
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo $row->post_name; ?></td>
|
||||
<td><?php echo sp_get_post_format( $row->ID ); ?></td>
|
||||
<td><?php echo sp_get_post_precision( $row->ID ); ?></td>
|
||||
<td><?php echo sp_get_post_equation( $row->ID ); ?></td>
|
||||
<td><?php echo sp_get_post_order( $row->ID ); ?></td>
|
||||
</tr>
|
||||
<?php $i++; endforeach; ?>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th colspan="4"><a href="<?php echo admin_url( 'edit.php?post_type=sp_column' ); ?>"><?php printf( __( 'Edit %s', 'sportspress' ), __( 'Table Columns', 'sportspress' ) ); ?></a></th>
|
||||
<th colspan="7"><a href="<?php echo admin_url( 'edit.php?post_type=sp_column' ); ?>"><?php printf( __( 'Edit %s', 'sportspress' ), __( 'Table Columns', 'sportspress' ) ); ?></a></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
@@ -83,57 +52,26 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php _e( 'Label', 'sportspress' ); ?></th>
|
||||
<th><?php _e( 'Key', 'sportspress' ); ?></th>
|
||||
<th><?php _e( 'Format', 'sportspress' ); ?></th>
|
||||
<th><?php _e( 'Precision', 'sportspress' ); ?></th>
|
||||
<th><?php _e( 'Equation', 'sportspress' ); ?></th>
|
||||
<th><?php _e( 'Sort Order', 'sportspress' ); ?></th>
|
||||
<th><?php _e( 'Abbreviation', 'sportspress' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php $i = 0; foreach ( $data as $row ): ?>
|
||||
<tr>
|
||||
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
|
||||
<td class="row-title"><?php echo $row->post_title; ?></td>
|
||||
<td>
|
||||
<?php
|
||||
$equation = get_post_meta ( $row->ID, 'sp_equation', true );
|
||||
if ( $equation ):
|
||||
echo str_replace(
|
||||
array( '$', '+', '-', '*', '/' ),
|
||||
array( '', '+', '−', '×', '÷' ),
|
||||
$equation
|
||||
);
|
||||
else:
|
||||
echo '—';
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
$priority = get_post_meta ( $row->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;
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
$abbreviation = get_post_meta ( $row->ID, 'sp_abbreviation', true );
|
||||
if ( $abbreviation ):
|
||||
echo $abbreviation;
|
||||
else:
|
||||
echo $row->post_title;
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo $row->post_name; ?></td>
|
||||
<td><?php echo sp_get_post_format( $row->ID ); ?></td>
|
||||
<td><?php echo sp_get_post_precision( $row->ID ); ?></td>
|
||||
<td><?php echo sp_get_post_equation( $row->ID ); ?></td>
|
||||
<td><?php echo sp_get_post_order( $row->ID ); ?></td>
|
||||
</tr>
|
||||
<?php $i++; endforeach; ?>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th colspan="4"><a href="<?php echo admin_url( 'edit.php?post_type=sp_statistic' ); ?>"><?php printf( __( 'Edit %s', 'sportspress' ), __( 'Statistics', 'sportspress' ) ); ?></a></th>
|
||||
<th colspan="7"><a href="<?php echo admin_url( 'edit.php?post_type=sp_statistic' ); ?>"><?php printf( __( 'Edit %s', 'sportspress' ), __( 'Statistics', 'sportspress' ) ); ?></a></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
@@ -154,28 +92,19 @@
|
||||
<tr>
|
||||
<th><?php _e( 'Label', 'sportspress' ); ?></th>
|
||||
<th><?php _e( 'Key', 'sportspress' ); ?></th>
|
||||
<th><?php _e( 'Abbreviation', 'sportspress' ); ?></th>
|
||||
<th><?php _e( 'Format', 'sportspress' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php $i = 0; foreach ( $data as $row ): ?>
|
||||
<tr<?php if ( $i % 2 ) echo ' class="alternate"'; ?>>
|
||||
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
|
||||
<td class="row-title"><?php echo $row->post_title; ?></td>
|
||||
<td><?php echo $row->post_name; ?></td>
|
||||
<td>
|
||||
<?php
|
||||
$abbreviation = get_post_meta ( $row->ID, 'sp_abbreviation', true );
|
||||
if ( $abbreviation ):
|
||||
echo $abbreviation;
|
||||
else:
|
||||
echo $row->post_title;
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo sp_get_post_format( $row->ID ); ?></td>
|
||||
</tr>
|
||||
<?php $i++; endforeach; ?>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th colspan="3"><a href="<?php echo admin_url( 'edit.php?post_type=sp_result' ); ?>"><?php printf( __( 'Edit %s', 'sportspress' ), __( 'Results', 'sportspress' ) ); ?></a></th>
|
||||
<th colspan="4"><a href="<?php echo admin_url( 'edit.php?post_type=sp_result' ); ?>"><?php printf( __( 'Edit %s', 'sportspress' ), __( 'Results', 'sportspress' ) ); ?></a></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
@@ -196,23 +125,12 @@
|
||||
<tr>
|
||||
<th><?php _e( 'Label', 'sportspress' ); ?></th>
|
||||
<th><?php _e( 'Key', 'sportspress' ); ?></th>
|
||||
<th><?php _e( 'Abbreviation', 'sportspress' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php $i = 0; foreach ( $data as $row ): ?>
|
||||
<tr<?php if ( $i % 2 ) echo ' class="alternate"'; ?>>
|
||||
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
|
||||
<td class="row-title"><?php echo $row->post_title; ?></td>
|
||||
<td><?php echo $row->post_name; ?></td>
|
||||
<td>
|
||||
<?php
|
||||
$abbreviation = get_post_meta ( $row->ID, 'sp_abbreviation', true );
|
||||
if ( $abbreviation ):
|
||||
echo $abbreviation;
|
||||
else:
|
||||
echo $row->post_title;
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i++; endforeach; ?>
|
||||
<tfoot>
|
||||
|
||||
@@ -44,40 +44,73 @@ 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 ) )
|
||||
|
||||
return $input;
|
||||
|
||||
// Get sports presets
|
||||
global $sportspress_sports;
|
||||
|
||||
// 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() );
|
||||
|
||||
// Loop through each post type
|
||||
foreach( $post_groups as $post_type => $posts ):
|
||||
|
||||
$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( array( 'post_type' => $post_type, 'numberposts' => -1, 'posts_per_page' => -1 ) );
|
||||
$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'] ) ):
|
||||
|
||||
// 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;
|
||||
endif;
|
||||
endforeach;
|
||||
|
||||
endforeach;
|
||||
|
||||
endif;
|
||||
|
||||
endif;
|
||||
|
||||
endforeach;
|
||||
|
||||
endforeach;
|
||||
|
||||
return $input;
|
||||
}
|
||||
|
||||
|
||||
@@ -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' );
|
||||
?>
|
||||
@@ -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' );
|
||||
?>
|
||||
@@ -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();
|
||||
|
||||
44
install.php
44
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;
|
||||
|
||||
|
||||
Binary file not shown.
@@ -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 <translate@themeboy.com>\n"
|
||||
"POT-Creation-Date: 2014-01-05 20:10+1000\n"
|
||||
"PO-Revision-Date: 2014-01-05 20:12+1000\n"
|
||||
"Last-Translator: Takumi <takumi@themeboy.com>\n"
|
||||
"Language-Team: ThemeBoy <translate@themeboy.com>\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 "リーグ"
|
||||
|
||||
|
||||
@@ -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' ):
|
||||
|
||||
@@ -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' ):
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
<?php
|
||||
|
||||
// Sports array to be populated with presets
|
||||
$sportspress_sports = array();
|
||||
|
||||
$sportspress_texts = array(
|
||||
'sp_team' => 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' ),
|
||||
);
|
||||
?>
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user