League => Competition

This commit is contained in:
Brian Miyaji
2014-10-21 02:28:12 +11:00
parent 1229c7367f
commit cf17257881
30 changed files with 43 additions and 47 deletions

View File

@@ -67,7 +67,7 @@ class SP_Admin_Menus {
* Add menu item
*/
public function leagues_menu() {
add_submenu_page( 'sportspress', __( 'Leagues', 'sportspress' ), __( 'Leagues', 'sportspress' ), 'manage_sportspress', 'edit-tags.php?taxonomy=sp_league');
add_submenu_page( 'sportspress', __( 'Competitions', 'sportspress' ), __( 'Competitions', 'sportspress' ), 'manage_sportspress', 'edit-tags.php?taxonomy=sp_league');
}
/**
@@ -271,7 +271,7 @@ class SP_Admin_Menus {
}
public function remove_leagues( $arr = array() ) {
return $arr[0] != __( 'Leagues', 'sportspress' );
return $arr[0] != __( 'Competitions', 'sportspress' );
}
public function remove_positions( $arr = array() ) {

View File

@@ -26,7 +26,7 @@ class SP_Admin_Permalink_Settings {
array( 'venue', __( 'Venues', 'sportspress' ) ),
array( 'calendar', __( 'Calendars', 'sportspress' ) ),
array( 'team', __( 'Teams', 'sportspress' ) ),
array( 'league', __( 'Leagues', 'sportspress' ) ),
array( 'league', __( 'Competitions', 'sportspress' ) ),
array( 'season', __( 'Seasons', 'sportspress' ) ),
array( 'table', __( 'League Tables', 'sportspress' ) ),
array( 'player', __( 'Players', 'sportspress' ) ),

View File

@@ -40,7 +40,7 @@ class SP_Admin_Sample_Data {
// Terms to insert
$taxonomies = array();
// Leagues
// Competitions
$taxonomies['sp_league'] = array( _x( 'Primary League', 'example', 'sportspress' ), _x( 'Secondary League', 'example', 'sportspress' ) );
// Seasons

View File

@@ -475,7 +475,7 @@ if ( class_exists( 'WP_Importer' ) ) {
</td>
</tr>
<tr>
<th scope="row"><label><?php _e( 'League', 'sportspress' ); ?></label><br/></th>
<th scope="row"><label><?php _e( 'Competition', 'sportspress' ); ?></label><br/></th>
<td><?php
$args = array(
'taxonomy' => 'sp_league',

View File

@@ -27,7 +27,7 @@ if ( class_exists( 'WP_Importer' ) ) {
'post_title' => __( 'Name', 'sportspress' ),
'sp_position' => __( 'Positions', 'sportspress' ),
'sp_team' => __( 'Teams', 'sportspress' ),
'sp_league' => __( 'Leagues', 'sportspress' ),
'sp_league' => __( 'Competitions', 'sportspress' ),
'sp_season' => __( 'Seasons', 'sportspress' ),
'sp_nationality' => __( 'Nationality', 'sportspress' ),
);

View File

@@ -26,7 +26,7 @@ if ( class_exists( 'WP_Importer' ) ) {
'post_title' => __( 'Name', 'sportspress' ),
'sp_role' => __( 'Roles', 'sportspress' ),
'sp_team' => __( 'Teams', 'sportspress' ),
'sp_league' => __( 'Leagues', 'sportspress' ),
'sp_league' => __( 'Competitions', 'sportspress' ),
'sp_season' => __( 'Seasons', 'sportspress' ),
'sp_nationality' => __( 'Nationality', 'sportspress' ),
);

View File

@@ -24,7 +24,7 @@ if ( class_exists( 'WP_Importer' ) ) {
$this->import_label = __( 'Import Teams', 'sportspress' );
$this->columns = array(
'post_title' => __( 'Name', 'sportspress' ),
'sp_league' => __( 'Leagues', 'sportspress' ),
'sp_league' => __( 'Competitions', 'sportspress' ),
'sp_season' => __( 'Seasons', 'sportspress' ),
'sp_url' => __( 'Site URL', 'sportspress' ),
'sp_abbreviation' => __( 'Abbreviation', 'sportspress' ),

View File

@@ -46,7 +46,7 @@ class SP_Admin_CPT_Calendar extends SP_Admin_CPT {
$columns = array_merge( array(
'cb' => '<input type="checkbox" />',
'title' => __( 'Title', 'sportspress' ),
'sp_league' => __( 'League', 'sportspress' ),
'sp_league' => __( 'Competition', 'sportspress' ),
'sp_season' => __( 'Season', 'sportspress' ),
'sp_venue' => __( 'Venue', 'sportspress' ),
'sp_team' => __( 'Team', 'sportspress' ),

View File

@@ -92,7 +92,7 @@ class SP_Admin_CPT_Event extends SP_Admin_CPT {
'date' => __( 'Date', 'sportspress' ),
'sp_time' => __( 'Time', 'sportspress' ),
'sp_team' => __( 'Teams', 'sportspress' ),
'sp_league' => __( 'League', 'sportspress' ),
'sp_league' => __( 'Competition', 'sportspress' ),
'sp_season' => __( 'Season', 'sportspress' ),
'sp_venue' => __( 'Venue', 'sportspress' ),
), $existing_columns, array(
@@ -109,14 +109,11 @@ class SP_Admin_CPT_Event extends SP_Admin_CPT {
switch ( $column ):
case 'sp_format':
$format = get_post_meta( $post_id, 'sp_format', true );
switch ( $format ):
case 'league':
echo '<span class="dashicons sp-icon-crown tips" title="' . __( 'League', 'sportspress' ) . '"></span>';
break;
case 'friendly':
echo '<span class="dashicons sp-icon-smile tips" title="' . __( 'Friendly', 'sportspress' ) . '"></span>';
break;
endswitch;
$formats = new SP_Formats();
$event_formats = $formats->event;
if ( array_key_exists( $format, $event_formats ) ):
echo '<span class="dashicons sp-icon-' . $format . ' tips" title="' . $event_formats[ $format ] . '"></span>';
endif;
break;
case 'sp_time':
echo get_post_time( 'H:i', false, $post_id, true );

View File

@@ -46,7 +46,7 @@ class SP_Admin_CPT_List extends SP_Admin_CPT {
$columns = array_merge( array(
'cb' => '<input type="checkbox" />',
'title' => __( 'Title', 'sportspress' ),
'sp_league' => __( 'League', 'sportspress' ),
'sp_league' => __( 'Competition', 'sportspress' ),
'sp_season' => __( 'Season', 'sportspress' ),
'sp_team' => __( 'Team', 'sportspress' ),
'sp_player' => __( 'Players', 'sportspress' ),

View File

@@ -65,7 +65,7 @@ class SP_Admin_CPT_Player extends SP_Admin_CPT {
'title' => null,
'sp_position' => __( 'Positions', 'sportspress' ),
'sp_team' => __( 'Teams', 'sportspress' ),
'sp_league' => __( 'Leagues', 'sportspress' ),
'sp_league' => __( 'Competitions', 'sportspress' ),
'sp_season' => __( 'Seasons', 'sportspress' ),
), $existing_columns, array(
'title' => __( 'Name', 'sportspress' )

View File

@@ -64,7 +64,7 @@ class SP_Admin_CPT_Staff extends SP_Admin_CPT {
'title' => null,
'sp_role' => __( 'Role', 'sportspress' ),
'sp_team' => __( 'Teams', 'sportspress' ),
'sp_league' => __( 'Leagues', 'sportspress' ),
'sp_league' => __( 'Competitions', 'sportspress' ),
'sp_season' => __( 'Seasons', 'sportspress' ),
), $existing_columns, array(
'title' => __( 'Name', 'sportspress' )

View File

@@ -46,7 +46,7 @@ class SP_Admin_CPT_Table extends SP_Admin_CPT {
$columns = array_merge( array(
'cb' => '<input type="checkbox" />',
'title' => __( 'Title', 'sportspress' ),
'sp_league' => __( 'League', 'sportspress' ),
'sp_league' => __( 'Competition', 'sportspress' ),
'sp_season' => __( 'Season', 'sportspress' ),
'sp_team' => __( 'Teams', 'sportspress' ),
), $existing_columns );

View File

@@ -64,7 +64,7 @@ class SP_Admin_CPT_Team extends SP_Admin_CPT {
'title' => null,
'sp_url' => __( 'URL', 'sportspress' ),
'sp_abbreviation' => __( 'Abbreviation', 'sportspress' ),
'sp_league' => __( 'Leagues', 'sportspress' ),
'sp_league' => __( 'Competitions', 'sportspress' ),
'sp_season' => __( 'Seasons', 'sportspress' ),
), $existing_columns, array(
'title' => __( 'Team', 'sportspress' ),

View File

@@ -67,7 +67,7 @@ class SP_Meta_Box_Calendar_Data {
<th class="column-league">
<label for="sp_columns_league">
<input type="checkbox" name="sp_columns[]" value="league" id="sp_columns_league" <?php checked( ! is_array( $usecolumns ) || in_array( 'league', $usecolumns ) ); ?>>
<?php _e( 'League', 'sportspress' ); ?>
<?php _e( 'Competition', 'sportspress' ); ?>
</label>
</th>
<th class="column-season">

View File

@@ -50,7 +50,7 @@ class SP_Meta_Box_Calendar_Details {
sp_dropdown_dates( $args );
?>
</p>
<p><strong><?php _e( 'League', 'sportspress' ); ?></strong></p>
<p><strong><?php _e( 'Competition', 'sportspress' ); ?></strong></p>
<p>
<?php
$args = array(

View File

@@ -27,7 +27,7 @@ class SP_Meta_Box_List_Details {
$order = get_post_meta( $post->ID, 'sp_order', true );
?>
<div>
<p><strong><?php _e( 'League', 'sportspress' ); ?></strong></p>
<p><strong><?php _e( 'Competition', 'sportspress' ); ?></strong></p>
<p class="sp-tab-select">
<?php
$args = array(

View File

@@ -113,14 +113,14 @@ class SP_Meta_Box_Player_Details {
sp_dropdown_pages( $args );
?></p>
<p><strong><?php _e( 'Leagues', 'sportspress' ); ?></strong></p>
<p><strong><?php _e( 'Competitions', 'sportspress' ); ?></strong></p>
<p><?php
$args = array(
'taxonomy' => 'sp_league',
'name' => 'tax_input[sp_league][]',
'selected' => $league_ids,
'values' => 'term_id',
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Leagues', 'sportspress' ) ),
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Competitions', 'sportspress' ) ),
'class' => 'widefat',
'property' => 'multiple',
'chosen' => true,

View File

@@ -111,14 +111,14 @@ class SP_Meta_Box_Staff_Details {
sp_dropdown_pages( $args );
?></p>
<p><strong><?php _e( 'Leagues', 'sportspress' ); ?></strong></p>
<p><strong><?php _e( 'Competitions', 'sportspress' ); ?></strong></p>
<p><?php
$args = array(
'taxonomy' => 'sp_league',
'name' => 'tax_input[sp_league][]',
'selected' => $league_ids,
'values' => 'term_id',
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Leagues', 'sportspress' ) ),
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Competitions', 'sportspress' ) ),
'class' => 'widefat',
'property' => 'multiple',
'chosen' => true,

View File

@@ -24,7 +24,7 @@ class SP_Meta_Box_Table_Details {
$season_id = sp_get_the_term_id( $post->ID, 'sp_season', 0 );
?>
<div>
<p><strong><?php _e( 'League', 'sportspress' ); ?></strong></p>
<p><strong><?php _e( 'Competition', 'sportspress' ); ?></strong></p>
<p class="sp-tab-select">
<?php
$args = array(

View File

@@ -47,14 +47,14 @@ class SP_Meta_Box_Team_Details {
$abbreviation = get_post_meta( $post->ID, 'sp_abbreviation', true );
$url = get_post_meta( $post->ID, 'sp_url', true );
?>
<p><strong><?php _e( 'Leagues', 'sportspress' ); ?></strong></p>
<p><strong><?php _e( 'Competitions', 'sportspress' ); ?></strong></p>
<p><?php
$args = array(
'taxonomy' => 'sp_league',
'name' => 'tax_input[sp_league][]',
'selected' => $league_ids,
'values' => 'term_id',
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Leagues', 'sportspress' ) ),
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Competitions', 'sportspress' ) ),
'class' => 'widefat',
'property' => 'multiple',
'chosen' => true,
@@ -69,7 +69,7 @@ class SP_Meta_Box_Team_Details {
'name' => 'tax_input[sp_season][]',
'selected' => $season_ids,
'values' => 'term_id',
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Leagues', 'sportspress' ) ),
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Competitions', 'sportspress' ) ),
'class' => 'widefat',
'property' => 'multiple',
'chosen' => true,
@@ -100,7 +100,6 @@ class SP_Meta_Box_Team_Details {
<p><strong><?php _e( 'Abbreviation', 'sportspress' ); ?></strong></p>
<p><input type="text" id="sp_abbreviation" name="sp_abbreviation" value="<?php echo $abbreviation; ?>"></p>
<p class="description"><?php _e( 'The abbreviation is not prominent by default; however, some themes may show it', 'sportspress' ); ?></p>
<?php
}

View File

@@ -58,7 +58,7 @@ class SP_Meta_Box_Team_Lists {
<?php _e( 'Players', 'sportspress' ); ?>
</th>
<th class="column-league">
<?php _e( 'League', 'sportspress' ); ?>
<?php _e( 'Competition', 'sportspress' ); ?>
</th>
<th class="column-season">
<?php _e( 'Season', 'sportspress' ); ?>

View File

@@ -58,7 +58,7 @@ class SP_Meta_Box_Team_Tables {
<?php _e( 'Teams', 'sportspress' ); ?>
</th>
<th class="column-league">
<?php _e( 'League', 'sportspress' ); ?>
<?php _e( 'Competition', 'sportspress' ); ?>
</th>
<th class="column-season">
<?php _e( 'Season', 'sportspress' ); ?>

View File

@@ -329,7 +329,7 @@ class SP_Settings_Status extends SP_Settings_Page {
<tbody>
<tr>
<td><?php _e( 'Leagues', 'sportspress' ); ?>:</td>
<td><?php _e( 'Competitions', 'sportspress' ); ?>:</td>
<td><?php
$display_terms = array();
$terms = get_terms( 'sp_league', array( 'hide_empty' => 0 ) );

View File

@@ -293,7 +293,7 @@
<tbody>
<tr>
<td><?php _e( 'Leagues', 'sportspress' ); ?>:</td>
<td><?php _e( 'Competitions', 'sportspress' ); ?>:</td>
<td><?php
$display_terms = array();
$terms = get_terms( 'sp_league', array( 'hide_empty' => 0 ) );

View File

@@ -24,7 +24,7 @@ class SP_Formats {
public function __construct() {
$this->data = apply_filters( 'sportspress_formats', array(
'event' => array(
'league' => __( 'League', 'sportspress' ),
'league' => __( 'Competition', 'sportspress' ),
'friendly' => __( 'Friendly', 'sportspress' ),
),
'calendar' => array(

View File

@@ -33,10 +33,10 @@ class SP_Post_types {
do_action( 'sportspress_register_taxonomy' );
$labels = array(
'name' => __( 'Leagues', 'sportspress' ),
'singular_name' => __( 'League', 'sportspress' ),
'name' => __( 'Competitions', 'sportspress' ),
'singular_name' => __( 'Competition', 'sportspress' ),
'all_items' => __( 'All', 'sportspress' ),
'edit_item' => __( 'Edit League', 'sportspress' ),
'edit_item' => __( 'Edit Competition', 'sportspress' ),
'view_item' => __( 'View', 'sportspress' ),
'update_item' => __( 'Update', 'sportspress' ),
'add_new_item' => __( 'Add New', 'sportspress' ),
@@ -47,7 +47,7 @@ class SP_Post_types {
'not_found' => __( 'No results found.', 'sportspress' ),
);
$args = array(
'label' => __( 'Leagues', 'sportspress' ),
'label' => __( 'Competitions', 'sportspress' ),
'labels' => $labels,
'public' => true,
'show_in_nav_menus' => false,

View File

@@ -1089,7 +1089,7 @@ function sp_get_text_options() {
__( 'Date', 'sportspress' ),
__( 'Details', 'sportspress' ),
__( 'Event', 'sportspress' ),
__( 'League', 'sportspress' ),
__( 'Competition', 'sportspress' ),
__( 'Nationality', 'sportspress' ),
__( 'Outcome', 'sportspress' ),
__( 'Past Teams', 'sportspress' ),

View File

@@ -77,7 +77,7 @@ endif;
echo '<th class="data-away">' . __( 'Away', 'sportspress' ) . '</th>';
if ( $usecolumns == null || in_array( 'league', $usecolumns ) )
echo '<th class="data-league">' . __( 'League', 'sportspress' ) . '</th>';
echo '<th class="data-league">' . __( 'Competition', 'sportspress' ) . '</th>';
if ( $usecolumns == null || in_array( 'season', $usecolumns ) )
echo '<th class="data-season">' . __( 'Season', 'sportspress' ) . '</th>';

View File

@@ -2,12 +2,12 @@
<admin-texts>
<key name="sportspress_text">
<key name="Article"/>
<key name="Competition"/>
<key name="Current Team"/>
<key name="Current Teams"/>
<key name="Date"/>
<key name="Details"/>
<key name="Event"/>
<key name="League"/>
<key name="Nationality"/>
<key name="Outcome"/>
<key name="Past Teams"/>