From 38e53ac37c3d912481c016f3745ba18598781441 Mon Sep 17 00:00:00 2001
From: Brian Miyaji
Date: Fri, 21 Feb 2014 08:35:46 +1100
Subject: [PATCH] Replace dynamic strings with static ones
---
admin/hooks/admin-post-thumbnail-html.php | 12 ++---
admin/hooks/gettext.php | 12 ++---
admin/hooks/media-buttons.php | 4 +-
admin/hooks/post-updated-messages.php | 23 +++++----
admin/hooks/restrict-manage-posts.php | 8 +--
admin/post-types/column.php | 17 +++++--
admin/post-types/event.php | 23 ++++-----
admin/post-types/list.php | 29 ++++++-----
admin/post-types/metric.php | 17 +++++--
admin/post-types/outcome.php | 17 +++++--
admin/post-types/player.php | 19 ++++---
admin/post-types/result.php | 17 +++++--
admin/post-types/staff.php | 19 ++++---
admin/post-types/statistic.php | 17 +++++--
admin/post-types/table.php | 23 ++++++---
admin/post-types/team.php | 18 +++++--
admin/settings/events.php | 4 +-
admin/settings/players.php | 4 +-
admin/settings/tables.php | 2 +-
admin/templates/events-calendar.php | 2 +-
admin/terms/league.php | 33 ++++++++-----
admin/terms/position.php | 31 +++++++-----
admin/terms/season.php | 33 ++++++++-----
admin/terms/venue.php | 29 +++++++----
admin/tools/player-importer.php | 4 +-
admin/tools/team-importer.php | 4 +-
admin/widgets/countdown.php | 6 +--
admin/widgets/future-events.php | 12 ++---
admin/widgets/league-table.php | 4 +-
admin/widgets/player-list.php | 6 +--
admin/widgets/recent-events.php | 12 ++---
functions.php | 60 +++++------------------
32 files changed, 294 insertions(+), 227 deletions(-)
diff --git a/admin/hooks/admin-post-thumbnail-html.php b/admin/hooks/admin-post-thumbnail-html.php
index 78848273..6f3d6939 100644
--- a/admin/hooks/admin-post-thumbnail-html.php
+++ b/admin/hooks/admin-post-thumbnail-html.php
@@ -2,16 +2,16 @@
function sportspress_admin_post_thumbnail_html( $translated_text, $post_id ) {
$texts = array(
'sp_team' => array(
- 'Set featured image' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Logo', 'sportspress' ) ),
- 'Remove featured image' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Logo', 'sportspress' ) ),
+ 'Set featured image' => __( 'Select Logo', 'sportspress' ),
+ 'Remove featured image' => __( 'Remove Logo', 'sportspress' ),
),
'sp_player' => array(
- 'Set featured image' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Photo', 'sportspress' ) ),
- 'Remove featured image' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Photo', 'sportspress' ) ),
+ 'Set featured image' => __( 'Select Photo', 'sportspress' ),
+ 'Remove featured image' => __( 'Remove Photo', 'sportspress' ),
),
'sp_staff' => array(
- 'Set featured image' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Photo', 'sportspress' ) ),
- 'Remove featured image' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Photo', 'sportspress' ) ),
+ 'Set featured image' => __( 'Select Photo', 'sportspress' ),
+ 'Remove featured image' => __( 'Remove Photo', 'sportspress' ),
),
);
diff --git a/admin/hooks/gettext.php b/admin/hooks/gettext.php
index fc1b54c3..99a77de3 100644
--- a/admin/hooks/gettext.php
+++ b/admin/hooks/gettext.php
@@ -9,13 +9,13 @@ function sportspress_gettext( $translated_text, $untranslated_text, $domain ) {
$translated_text = __( 'Team', 'sportspress' );
break;
case 'Set featured image':
- $translated_text = sprintf( __( 'Select %s', 'sportspress' ), __( 'Logo', 'sportspress' ) );
+ $translated_text = __( 'Select Logo', 'sportspress' );
break;
case 'Set Featured Image':
- $translated_text = sprintf( __( 'Select %s', 'sportspress' ), __( 'Logo', 'sportspress' ) );
+ $translated_text = __( 'Select Logo', 'sportspress' );
break;
case 'Remove featured image':
- $translated_text = sprintf( __( 'Remove %s', 'sportspress' ), __( 'Logo', 'sportspress' ) );
+ $translated_text = __( 'Remove Logo', 'sportspress' );
break;
endswitch;
elseif ( in_array( $typenow, array( 'sp_event', 'sp_player', 'sp_staff' ) ) ):
@@ -24,13 +24,13 @@ function sportspress_gettext( $translated_text, $untranslated_text, $domain ) {
$translated_text = __( '(Auto)', 'sportspress' );
break;
case 'Set featured image':
- $translated_text = sprintf( __( 'Select %s', 'sportspress' ), __( 'Photo', 'sportspress' ) );
+ $translated_text = __( 'Select Photo', 'sportspress' );
break;
case 'Set Featured Image':
- $translated_text = sprintf( __( 'Select %s', 'sportspress' ), __( 'Photo', 'sportspress' ) );
+ $translated_text = __( 'Select Photo', 'sportspress' );
break;
case 'Remove featured image':
- $translated_text = sprintf( __( 'Remove %s', 'sportspress' ), __( 'Photo', 'sportspress' ) );
+ $translated_text = __( 'Remove Photo', 'sportspress' );
break;
case 'Scheduled for: %1$s':
$translated_text = __( 'Date/Time: %1$s', 'sportspress' );
diff --git a/admin/hooks/media-buttons.php b/admin/hooks/media-buttons.php
index e4a34198..f8c0060f 100644
--- a/admin/hooks/media-buttons.php
+++ b/admin/hooks/media-buttons.php
@@ -4,8 +4,8 @@ function sportspress_media_buttons() {
//if ( ! in_array( array('post.php', 'page.php', 'page-new.php', 'post-new.php')
?>
-
-
+
+
labels->singular_name ) .
- ' ' .
- sprintf( __( 'Edit %s', 'sportspress' ), $obj->labels->name ) . '';
+ for ( $i = 0; $i <= 10; $i++ ):
+ $messages['post'][ $i ] = __( 'Settings saved.', 'sportspress' ) .
+ ' ' .
+ __( 'View all', 'sportspress' ) . '';
+ endfor;
elseif ( in_array( $typenow, array( 'sp_event', 'sp_team', 'sp_table', 'sp_player', 'sp_list', 'sp_staff' ) ) ):
$obj = get_post_type_object( $typenow );
- $messages['post'][1] = sprintf( __( '%s updated.', 'sportspress' ), $obj->labels->singular_name ) .
+ $messages['post'][1] = __( 'Changes saved.', 'sportspress' ) .
' ' . $obj->labels->view_item . '';
- $messages['post'][4] = sprintf( __( '%s updated.', 'sportspress' ), $obj->labels->singular_name );
+ $messages['post'][4] = __( 'Changes saved.', 'sportspress' );
- $messages['post'][6] = sprintf( __( '%s published.', 'sportspress' ), $obj->labels->singular_name ) .
+ $messages['post'][6] = __( 'Success!', 'sportspress' ) .
' ' . $obj->labels->view_item . '';
- $messages['post'][7] = sprintf( __( '%s saved.', 'sportspress' ), $obj->labels->singular_name );
+ $messages['post'][7] = __( 'Changes saved.', 'sportspress' );
- $messages['post'][8] = sprintf( __( '%s submitted.', 'sportspress' ), $obj->labels->singular_name ) .
+ $messages['post'][8] = __( 'Success!', 'sportspress' ) .
' ' .
sprintf( __( 'Preview %s', 'sportspress' ), $obj->labels->singular_name ) . '';
$messages['post'][9] = sprintf(
- __( '%s scheduled for: %s.', 'sportspress' ),
+ __( 'Scheduled for: %1$s.', 'sportspress' ),
date_i18n( __( 'M j, Y @ G:i', 'sportspress' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post->ID) ) ) .
' ' .
sprintf( __( 'Preview %s', 'sportspress' ), $obj->labels->singular_name ) . '';
- $messages['post'][8] = sprintf( __( '%s draft updated.', 'sportspress' ), $obj->labels->singular_name ) .
+ $messages['post'][10] = __( 'Success!', 'sportspress' ) .
' ' .
sprintf( __( 'Preview %s', 'sportspress' ), $obj->labels->singular_name ) . '';
diff --git a/admin/hooks/restrict-manage-posts.php b/admin/hooks/restrict-manage-posts.php
index c08d8159..270108c2 100644
--- a/admin/hooks/restrict-manage-posts.php
+++ b/admin/hooks/restrict-manage-posts.php
@@ -5,7 +5,7 @@ function sportspress_restrict_manage_posts() {
if ( in_array( $typenow, array( 'sp_event', 'sp_player', 'sp_staff', 'sp_table', 'sp_list' ) ) ):
$selected = isset( $_REQUEST['sp_team'] ) ? $_REQUEST['sp_team'] : null;
$args = array(
- 'show_option_none' => sprintf( __( 'All %s', 'sportspress' ), __( 'Teams', 'sportspress' ) ),
+ 'show_option_none' => __( 'All Teams', 'sportspress' ),
'post_type' => 'sp_team',
'name' => 'sp_team',
'selected' => $selected
@@ -15,7 +15,7 @@ function sportspress_restrict_manage_posts() {
if ( in_array( $typenow, array( 'sp_player' ) ) ):
$selected = isset( $_REQUEST['sp_position'] ) ? $_REQUEST['sp_position'] : null;
$args = array(
- 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Positions', 'sportspress' ) ),
+ 'show_option_all' => __( 'All Positions', 'sportspress' ),
'taxonomy' => 'sp_position',
'name' => 'sp_position',
'selected' => $selected
@@ -25,7 +25,7 @@ function sportspress_restrict_manage_posts() {
if ( in_array( $typenow, array( 'sp_team', 'sp_event', 'sp_player', 'sp_staff', 'sp_table', 'sp_list' ) ) ):
$selected = isset( $_REQUEST['sp_season'] ) ? $_REQUEST['sp_season'] : null;
$args = array(
- 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Seasons', 'sportspress' ) ),
+ 'show_option_all' => __( 'All Seasons', 'sportspress' ),
'taxonomy' => 'sp_season',
'name' => 'sp_season',
'selected' => $selected
@@ -37,7 +37,7 @@ function sportspress_restrict_manage_posts() {
$args = array(
'post_type' => 'sp_team',
'name' => 'team',
- 'show_option_none' => sprintf( __( 'All %s', 'sportspress' ), __( 'Teams', 'sportspress' ) ),
+ 'show_option_none' => __( 'All Teams', 'sportspress' ),
'selected' => $selected,
'values' => 'ID',
);
diff --git a/admin/post-types/column.php b/admin/post-types/column.php
index 58ff84c2..9e26a410 100644
--- a/admin/post-types/column.php
+++ b/admin/post-types/column.php
@@ -1,11 +1,18 @@
__( 'Columns', 'sportspress' ),
+ 'singular_name' => __( 'Column', 'sportspress' ),
+ 'add_new_item' => __( 'Add New Column', 'sportspress' ),
+ 'edit_item' => __( 'Edit Column', 'sportspress' ),
+ 'new_item' => __( 'New Column', 'sportspress' ),
+ 'view_item' => __( 'View Column', 'sportspress' ),
+ 'search_items' => __( 'Search Columns', 'sportspress' ),
+ 'not_found' => __( 'No columns found.', 'sportspress' ),
+ 'not_found_in_trash' => __( 'No columns found in trash.', 'sportspress' ),
+ );
$args = array(
- 'label' => $name,
+ 'label' => __( 'Columns', 'sportspress' ),
'labels' => $labels,
'public' => false,
'show_ui' => true,
diff --git a/admin/post-types/event.php b/admin/post-types/event.php
index 52b7e7bc..d93b7a5e 100644
--- a/admin/post-types/event.php
+++ b/admin/post-types/event.php
@@ -3,17 +3,14 @@ function sportspress_event_post_init() {
$labels = array(
'name' => __( 'Schedule', 'sportspress' ),
'singular_name' => __( 'Event', 'sportspress' ),
- 'menu_name' => __( 'Schedule', 'sportspress' ),
'all_items' => __( 'Events', 'sportspress' ),
- 'add_new' => sprintf( __( 'Add Event', 'sportspress' ), __( 'Event', 'sportspress' ) ),
- 'add_new_item' => sprintf( __( 'Add New %s', 'sportspress' ), __( 'Event', 'sportspress' ) ),
- 'edit_item' => sprintf( __( 'Edit %s', 'sportspress' ), __( 'Event', 'sportspress' ) ),
- 'new_item' => sprintf( __( 'New %s', 'sportspress' ), __( 'Event', 'sportspress' ) ),
- 'view_item' => sprintf( __( 'View %s', 'sportspress' ), __( 'Event', 'sportspress' ) ),
- 'search_items' => sprintf( __( 'Search %s', 'sportspress' ), __( 'Events', 'sportspress' ) ),
- 'not_found' => sprintf( __( 'No %s found.', 'sportspress' ), __( 'events', 'sportspress' ) ),
- 'not_found_in_trash' => sprintf( __( 'No %s found in trash.', 'sportspress' ), __( 'events', 'sportspress' ) ),
- 'parent_item_colon' => sprintf( __( 'Parent %s', 'sportspress' ), __( 'Event', 'sportspress' ) ) . ':'
+ 'add_new_item' => __( 'Add New Event', 'sportspress' ),
+ 'edit_item' => __( 'Edit Event', 'sportspress' ),
+ 'new_item' => __( 'New Event', 'sportspress' ),
+ 'view_item' => __( 'View Event', 'sportspress' ),
+ 'search_items' => __( 'Search Events', 'sportspress' ),
+ 'not_found' => __( 'No events found.', 'sportspress' ),
+ 'not_found_in_trash' => __( 'No events found in trash.', 'sportspress' ),
);
$args = array(
'label' => __( 'Events', 'sportspress' ),
@@ -79,7 +76,7 @@ function sportspress_event_details_meta( $post ) {
'show_option_none' => __( '-- Not set --', 'sportspress' ),
);
if ( ! sportspress_dropdown_taxonomies( $args ) ):
- sportspress_taxonomy_adder( 'sp_league', 'sp_team' );
+ sportspress_taxonomy_adder( 'sp_league', 'sp_team', __( 'Add New League', 'sportspress' ) );
endif;
?>
@@ -94,7 +91,7 @@ function sportspress_event_details_meta( $post ) {
'show_option_none' => __( '-- Not set --', 'sportspress' ),
);
if ( ! sportspress_dropdown_taxonomies( $args ) ):
- sportspress_taxonomy_adder( 'sp_season', 'sp_team' );
+ sportspress_taxonomy_adder( 'sp_season', 'sp_team', __( 'Add New Season', 'sportspress' ) );
endif;
?>
@@ -109,7 +106,7 @@ function sportspress_event_details_meta( $post ) {
'show_option_none' => __( '-- Not set --', 'sportspress' ),
);
if ( ! sportspress_dropdown_taxonomies( $args ) ):
- sportspress_taxonomy_adder( 'sp_venue', 'sp_event' );
+ sportspress_taxonomy_adder( 'sp_venue', 'sp_event', __( 'Add New Venue', 'sportspress' ) );
endif;
?>
diff --git a/admin/post-types/list.php b/admin/post-types/list.php
index 436f7822..8d94d684 100644
--- a/admin/post-types/list.php
+++ b/admin/post-types/list.php
@@ -1,11 +1,18 @@
__( 'Player Lists', 'sportspress' ),
+ 'singular_name' => __( 'Player List', 'sportspress' ),
+ 'add_new_item' => __( 'Add New Player List', 'sportspress' ),
+ 'edit_item' => __( 'Edit Player List', 'sportspress' ),
+ 'new_item' => __( 'New Player List', 'sportspress' ),
+ 'view_item' => __( 'View Player List', 'sportspress' ),
+ 'search_items' => __( 'Search Player Lists', 'sportspress' ),
+ 'not_found' => __( 'No player lists found.', 'sportspress' ),
+ 'not_found_in_trash' => __( 'No player lists found in trash.', 'sportspress' ),
+ );
$args = array(
- 'label' => $name,
+ 'label' => __( 'Player Lists', 'sportspress' ),
'labels' => $labels,
'public' => true,
'has_archive' => false,
@@ -67,7 +74,7 @@ function sportspress_list_player_meta( $post ) {
'values' => 'term_id',
);
if ( ! sportspress_dropdown_taxonomies( $args ) ):
- sportspress_taxonomy_adder( 'sp_league', 'sp_team' );
+ sportspress_taxonomy_adder( 'sp_league', 'sp_team', __( 'Add New League', 'sportspress' ) );
endif;
?>
@@ -81,7 +88,7 @@ function sportspress_list_player_meta( $post ) {
'values' => 'term_id',
);
if ( ! sportspress_dropdown_taxonomies( $args ) ):
- sportspress_taxonomy_adder( 'sp_season', 'sp_team' );
+ sportspress_taxonomy_adder( 'sp_season', 'sp_team', __( 'Add New Season', 'sportspress' ) );
endif;
?>
@@ -91,12 +98,12 @@ function sportspress_list_player_meta( $post ) {
$args = array(
'post_type' => 'sp_team',
'name' => 'sp_team',
- 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Teams', 'sportspress' ) ),
+ 'show_option_all' => __( 'All Teams', 'sportspress' ),
'selected' => $team_id,
'values' => 'ID',
);
if ( ! sportspress_dropdown_pages( $args ) ):
- sportspress_post_adder( 'sp_team' );
+ sportspress_post_adder( 'sp_team', __( 'Add New Team', 'sportspress' ) );
endif;
?>
@@ -115,7 +122,7 @@ function sportspress_list_player_meta( $post ) {
'values' => 'slug',
);
if ( ! sportspress_dropdown_pages( $args ) ):
- sportspress_post_adder( 'sp_list' );
+ sportspress_post_adder( 'sp_list', __( 'Add New Player List', 'sportspress' ) );
endif;
?>
@@ -129,7 +136,7 @@ function sportspress_list_player_meta( $post ) {
ID, 'sp_player', 'block', 'sp_team' );
- sportspress_post_adder( 'sp_player' );
+ sportspress_post_adder( 'sp_player', __( 'Add New Player', 'sportspress' ) );
?>
__( 'Metrics', 'sportspress' ),
+ 'singular_name' => __( 'Metric', 'sportspress' ),
+ 'add_new_item' => __( 'Add New Metric', 'sportspress' ),
+ 'edit_item' => __( 'Edit Metric', 'sportspress' ),
+ 'new_item' => __( 'New Metric', 'sportspress' ),
+ 'view_item' => __( 'View Metric', 'sportspress' ),
+ 'search_items' => __( 'Search Metrics', 'sportspress' ),
+ 'not_found' => __( 'No metrics found.', 'sportspress' ),
+ 'not_found_in_trash' => __( 'No metrics found in trash.', 'sportspress' ),
+ );
$args = array(
- 'label' => $name,
+ 'label' => __( 'Metrics', 'sportspress' ),
'labels' => $labels,
'public' => false,
'show_ui' => true,
diff --git a/admin/post-types/outcome.php b/admin/post-types/outcome.php
index d43f581e..acd99040 100644
--- a/admin/post-types/outcome.php
+++ b/admin/post-types/outcome.php
@@ -1,11 +1,18 @@
__( 'Outcomes', 'sportspress' ),
+ 'singular_name' => __( 'Outcome', 'sportspress' ),
+ 'add_new_item' => __( 'Add New Outcome', 'sportspress' ),
+ 'edit_item' => __( 'Edit Outcome', 'sportspress' ),
+ 'new_item' => __( 'New Outcome', 'sportspress' ),
+ 'view_item' => __( 'View Outcome', 'sportspress' ),
+ 'search_items' => __( 'Search Outcomes', 'sportspress' ),
+ 'not_found' => __( 'No outcomes found.', 'sportspress' ),
+ 'not_found_in_trash' => __( 'No outcomes found in trash.', 'sportspress' ),
+ );
$args = array(
- 'label' => $name,
+ 'label' => __( 'Outcomes', 'sportspress' ),
'labels' => $labels,
'public' => false,
'show_ui' => true,
diff --git a/admin/post-types/player.php b/admin/post-types/player.php
index 110d151e..3d42d77e 100644
--- a/admin/post-types/player.php
+++ b/admin/post-types/player.php
@@ -1,11 +1,18 @@
__( 'Players', 'sportspress' ),
+ 'singular_name' => __( 'Player', 'sportspress' ),
+ 'add_new_item' => __( 'Add New Player', 'sportspress' ),
+ 'edit_item' => __( 'Edit Player', 'sportspress' ),
+ 'new_item' => __( 'New Player', 'sportspress' ),
+ 'view_item' => __( 'View Player', 'sportspress' ),
+ 'search_items' => __( 'Search Players', 'sportspress' ),
+ 'not_found' => __( 'No players found.', 'sportspress' ),
+ 'not_found_in_trash' => __( 'No players found in trash.', 'sportspress' ),
+ );
$args = array(
- 'label' => $name,
+ 'label' => __( 'Players', 'sportspress' ),
'labels' => $labels,
'public' => true,
'has_archive' => false,
@@ -227,7 +234,7 @@ function sportspress_player_metrics_meta( $post ) {
__( 'Results', 'sportspress' ),
+ 'singular_name' => __( 'Result', 'sportspress' ),
+ 'add_new_item' => __( 'Add New Result', 'sportspress' ),
+ 'edit_item' => __( 'Edit Result', 'sportspress' ),
+ 'new_item' => __( 'New Result', 'sportspress' ),
+ 'view_item' => __( 'View Result', 'sportspress' ),
+ 'search_items' => __( 'Search Results', 'sportspress' ),
+ 'not_found' => __( 'No results found.', 'sportspress' ),
+ 'not_found_in_trash' => __( 'No results found in trash.', 'sportspress' ),
+ );
$args = array(
- 'label' => $name,
+ 'label' => __( 'Results', 'sportspress' ),
'labels' => $labels,
'public' => false,
'show_ui' => true,
diff --git a/admin/post-types/staff.php b/admin/post-types/staff.php
index aca7752d..7f8cedd5 100644
--- a/admin/post-types/staff.php
+++ b/admin/post-types/staff.php
@@ -1,11 +1,18 @@
__( 'Staff', 'sportspress' ),
+ 'singular_name' => __( 'Staff', 'sportspress' ),
+ 'add_new_item' => __( 'Add New Staff', 'sportspress' ),
+ 'edit_item' => __( 'Edit Staff', 'sportspress' ),
+ 'new_item' => __( 'New Staff', 'sportspress' ),
+ 'view_item' => __( 'View Staff', 'sportspress' ),
+ 'search_items' => __( 'Search Staff', 'sportspress' ),
+ 'not_found' => __( 'No staff found.', 'sportspress' ),
+ 'not_found_in_trash' => __( 'No staff found in trash.', 'sportspress' ),
+ );
$args = array(
- 'label' => $name,
+ 'label' => __( 'Staff', 'sportspress' ),
'labels' => $labels,
'public' => true,
'has_archive' => false,
@@ -30,7 +37,7 @@ function sportspress_staff_meta_init() {
}
function sportspress_staff_team_meta( $post ) {
sportspress_post_checklist( $post->ID, 'sp_team' );
- sportspress_post_adder( 'sp_team' );
+ sportspress_post_adder( 'sp_team', __( 'Add New Team', 'sportspress' ) );
sportspress_nonce();
}
diff --git a/admin/post-types/statistic.php b/admin/post-types/statistic.php
index a45f951a..37caff21 100644
--- a/admin/post-types/statistic.php
+++ b/admin/post-types/statistic.php
@@ -1,11 +1,18 @@
__( 'Statistics', 'sportspress' ),
+ 'singular_name' => __( 'Statistic', 'sportspress' ),
+ 'add_new_item' => __( 'Add New Statistic', 'sportspress' ),
+ 'edit_item' => __( 'Edit Statistic', 'sportspress' ),
+ 'new_item' => __( 'New Statistic', 'sportspress' ),
+ 'view_item' => __( 'View Statistic', 'sportspress' ),
+ 'search_items' => __( 'Search Statistics', 'sportspress' ),
+ 'not_found' => __( 'No statistics found.', 'sportspress' ),
+ 'not_found_in_trash' => __( 'No statistics found in trash.', 'sportspress' ),
+ );
$args = array(
- 'label' => $name,
+ 'label' => __( 'Statistics', 'sportspress' ),
'labels' => $labels,
'public' => false,
'show_ui' => true,
diff --git a/admin/post-types/table.php b/admin/post-types/table.php
index 0a211822..c80a47ad 100644
--- a/admin/post-types/table.php
+++ b/admin/post-types/table.php
@@ -1,11 +1,18 @@
__( 'League Tables', 'sportspress' ),
+ 'singular_name' => __( 'League Table', 'sportspress' ),
+ 'add_new_item' => __( 'Add New League Table', 'sportspress' ),
+ 'edit_item' => __( 'Edit League Table', 'sportspress' ),
+ 'new_item' => __( 'New League Table', 'sportspress' ),
+ 'view_item' => __( 'View League Table', 'sportspress' ),
+ 'search_items' => __( 'Search League Tables', 'sportspress' ),
+ 'not_found' => __( 'No league tables found.', 'sportspress' ),
+ 'not_found_in_trash' => __( 'No league tables found in trash.', 'sportspress' ),
+ );
$args = array(
- 'label' => $name,
+ 'label' => __( 'League Tables', 'sportspress' ),
'labels' => $labels,
'public' => true,
'has_archive' => false,
@@ -63,7 +70,7 @@ function sportspress_table_team_meta( $post, $test ) {
'values' => 'term_id'
);
if ( ! sportspress_dropdown_taxonomies( $args ) ):
- sportspress_taxonomy_adder( 'sp_league', 'sp_team' );
+ sportspress_taxonomy_adder( 'sp_league', 'sp_team', __( 'Add New League', 'sportspress' ) );
endif;
?>
@@ -77,14 +84,14 @@ function sportspress_table_team_meta( $post, $test ) {
'values' => 'term_id'
);
if ( ! sportspress_dropdown_taxonomies( $args ) ):
- sportspress_taxonomy_adder( 'sp_season', 'sp_team' );
+ sportspress_taxonomy_adder( 'sp_season', 'sp_team', __( 'Add New Season', 'sportspress' ) );
endif;
?>
ID, 'sp_team', 'block', 'sp_season' );
- sportspress_post_adder( 'sp_team' );
+ sportspress_post_adder( 'sp_team', __( 'Add New Team', 'sportspress' ) );
?>
__( 'Teams', 'sportspress' ),
+ 'singular_name' => __( 'Team', 'sportspress' ),
+ 'add_new_item' => __( 'Add New Team', 'sportspress' ),
+ 'edit_item' => __( 'Edit Team', 'sportspress' ),
+ 'new_item' => __( 'New Team', 'sportspress' ),
+ 'view_item' => __( 'View Team', 'sportspress' ),
+ 'search_items' => __( 'Search Teams', 'sportspress' ),
+ 'not_found' => __( 'No teams found.', 'sportspress' ),
+ 'not_found_in_trash' => __( 'No teams found in trash.', 'sportspress' ),
+ 'parent_item_colon' => __( 'Parent Team:', 'sportspress' ),
+ );
$args = array(
- 'label' => $name,
+ 'label' => __( 'Teams', 'sportspress' ),
'labels' => $labels,
'public' => true,
'has_archive' => false,
diff --git a/admin/settings/events.php b/admin/settings/events.php
index 7f956c80..cd9dbcad 100644
--- a/admin/settings/events.php
+++ b/admin/settings/events.php
@@ -29,7 +29,7 @@ $data = get_posts( $args );
- |
+ |
@@ -60,7 +60,7 @@ $data = get_posts( $args );
- |
+ |
\ No newline at end of file
diff --git a/admin/settings/players.php b/admin/settings/players.php
index 64b641ef..4c7158ca 100644
--- a/admin/settings/players.php
+++ b/admin/settings/players.php
@@ -26,7 +26,7 @@ $data = get_posts( $args );
- |
+ |
@@ -58,7 +58,7 @@ $data = get_posts( $args );
- |
+ |
\ No newline at end of file
diff --git a/admin/settings/tables.php b/admin/settings/tables.php
index aa7bacd2..f420dafc 100644
--- a/admin/settings/tables.php
+++ b/admin/settings/tables.php
@@ -30,7 +30,7 @@ $data = get_posts( $args );
- |
+ |
\ No newline at end of file
diff --git a/admin/templates/events-calendar.php b/admin/templates/events-calendar.php
index f5500bf2..89dea273 100644
--- a/admin/templates/events-calendar.php
+++ b/admin/templates/events-calendar.php
@@ -157,7 +157,7 @@ if ( !function_exists( 'sportspress_events_calendar' ) ) {
$calendar_output .= '';
if ( array_key_exists($day, $daywithpost) ) // any posts today?
- $calendar_output .= '$day";
+ $calendar_output .= '$day";
else
$calendar_output .= $day;
$calendar_output .= ' | ';
diff --git a/admin/terms/league.php b/admin/terms/league.php
index 3271d5b5..8a9b9ed4 100644
--- a/admin/terms/league.php
+++ b/admin/terms/league.php
@@ -1,12 +1,21 @@
__( 'Leagues', 'sportspress' ),
+ 'singular_name' => __( 'League', 'sportspress' ),
+ 'all_items' => __( 'All Leagues', 'sportspress' ),
+ 'edit_item' => __( 'Edit League', 'sportspress' ),
+ 'view_item' => __( 'View League', 'sportspress' ),
+ 'update_item' => __( 'Update League', 'sportspress' ),
+ 'add_new_item' => __( 'Add New League', 'sportspress' ),
+ 'new_item_name' => __( 'New League Name', 'sportspress' ),
+ 'parent_item' => __( 'Parent League', 'sportspress' ),
+ 'parent_item_colon' => __( 'Parent League:', 'sportspress' ),
+ 'search_items' => __( 'Search Leagues', 'sportspress' ),
+ 'not_found' => __( 'No leagues found.', 'sportspress' ),
+ );
$args = array(
- 'label' => $name,
+ 'label' => __( 'Leagues', 'sportspress' ),
'labels' => $labels,
'public' => true,
'show_in_nav_menus' => false,
@@ -14,12 +23,10 @@ function sportspress_league_term_init() {
'hierarchical' => true,
'rewrite' => array( 'slug' => 'league' ),
);
- register_taxonomy( 'sp_league', $object_type, $args );
- register_taxonomy_for_object_type( 'sp_league', 'sp_event' );
- register_taxonomy_for_object_type( 'sp_league', 'sp_team' );
- register_taxonomy_for_object_type( 'sp_league', 'sp_table' );
- register_taxonomy_for_object_type( 'sp_league', 'sp_player' );
- register_taxonomy_for_object_type( 'sp_league', 'sp_list' );
- register_taxonomy_for_object_type( 'sp_league', 'sp_staff' );
+ $object_types = array( 'sp_event', 'sp_team', 'sp_table', 'sp_player', 'sp_list', 'sp_staff' );
+ register_taxonomy( 'sp_league', $object_types, $args );
+ foreach ( $object_types as $object_type ):
+ register_taxonomy_for_object_type( 'sp_league', $object_type );
+ endforeach;
}
add_action( 'init', 'sportspress_league_term_init' );
diff --git a/admin/terms/position.php b/admin/terms/position.php
index d8c5e5ef..4fa67007 100644
--- a/admin/terms/position.php
+++ b/admin/terms/position.php
@@ -1,12 +1,21 @@
__( 'Positions', 'sportspress' ),
+ 'singular_name' => __( 'Position', 'sportspress' ),
+ 'all_items' => __( 'All Positions', 'sportspress' ),
+ 'edit_item' => __( 'Edit Position', 'sportspress' ),
+ 'view_item' => __( 'View Position', 'sportspress' ),
+ 'update_item' => __( 'Update Position', 'sportspress' ),
+ 'add_new_item' => __( 'Add New Position', 'sportspress' ),
+ 'new_item_name' => __( 'New Position Name', 'sportspress' ),
+ 'parent_item' => __( 'Parent Position', 'sportspress' ),
+ 'parent_item_colon' => __( 'Parent Position:', 'sportspress' ),
+ 'search_items' => __( 'Search Positions', 'sportspress' ),
+ 'not_found' => __( 'No positions found.', 'sportspress' ),
+ );
$args = array(
- 'label' => $name,
+ 'label' => __( 'Positions', 'sportspress' ),
'labels' => $labels,
'public' => true,
'show_in_nav_menus' => false,
@@ -14,10 +23,10 @@ function sportspress_position_term_init() {
'hierarchical' => true,
'rewrite' => array( 'slug' => 'position' ),
);
- register_taxonomy( 'sp_position', $object_type, $args );
- register_taxonomy_for_object_type( 'sp_position', 'sp_player' );
- register_taxonomy_for_object_type( 'sp_position', 'sp_statistic' );
- register_taxonomy_for_object_type( 'sp_position', 'sp_metric' );
- register_taxonomy_for_object_type( 'sp_position', 'attachment' );
+ $object_types = array( 'sp_player', 'sp_statistic', 'sp_metric', 'attachment' );
+ register_taxonomy( 'sp_position', $object_types, $args );
+ foreach ( $object_types as $object_type ):
+ register_taxonomy_for_object_type( 'sp_league', $object_type );
+ endforeach;
}
add_action( 'init', 'sportspress_position_term_init' );
diff --git a/admin/terms/season.php b/admin/terms/season.php
index 5895d54e..677e2404 100644
--- a/admin/terms/season.php
+++ b/admin/terms/season.php
@@ -1,12 +1,21 @@
__( 'Seasons', 'sportspress' ),
+ 'singular_name' => __( 'Season', 'sportspress' ),
+ 'all_items' => __( 'All Seasons', 'sportspress' ),
+ 'edit_item' => __( 'Edit Season', 'sportspress' ),
+ 'view_item' => __( 'View Season', 'sportspress' ),
+ 'update_item' => __( 'Update Season', 'sportspress' ),
+ 'add_new_item' => __( 'Add New Season', 'sportspress' ),
+ 'new_item_name' => __( 'New Season Name', 'sportspress' ),
+ 'parent_item' => __( 'Parent Season', 'sportspress' ),
+ 'parent_item_colon' => __( 'Parent Season:', 'sportspress' ),
+ 'search_items' => __( 'Search Seasons', 'sportspress' ),
+ 'not_found' => __( 'No seasons found.', 'sportspress' ),
+ );
$args = array(
- 'label' => $name,
+ 'label' => __( 'Seasons', 'sportspress' ),
'labels' => $labels,
'public' => true,
'show_in_nav_menus' => false,
@@ -14,12 +23,10 @@ function sportspress_season_term_init() {
'hierarchical' => true,
'rewrite' => array( 'slug' => 'season' ),
);
- register_taxonomy( 'sp_season', $object_type, $args );
- register_taxonomy_for_object_type( 'sp_season', 'sp_event' );
- register_taxonomy_for_object_type( 'sp_season', 'sp_team' );
- register_taxonomy_for_object_type( 'sp_season', 'sp_table' );
- register_taxonomy_for_object_type( 'sp_season', 'sp_player' );
- register_taxonomy_for_object_type( 'sp_season', 'sp_list' );
- register_taxonomy_for_object_type( 'sp_season', 'sp_staff' );
+ $object_types = array( 'sp_event', 'sp_team', 'sp_table', 'sp_player', 'sp_list', 'sp_staff' );
+ register_taxonomy( 'sp_season', $object_types, $args );
+ foreach ( $object_types as $object_type ):
+ register_taxonomy_for_object_type( 'sp_league', $object_type );
+ endforeach;
}
add_action( 'init', 'sportspress_season_term_init' );
diff --git a/admin/terms/venue.php b/admin/terms/venue.php
index 72f4714e..5f0e0d2a 100644
--- a/admin/terms/venue.php
+++ b/admin/terms/venue.php
@@ -1,12 +1,21 @@
__( 'Venues', 'sportspress' ),
+ 'singular_name' => __( 'Venue', 'sportspress' ),
+ 'all_items' => __( 'All Venues', 'sportspress' ),
+ 'edit_item' => __( 'Edit Venue', 'sportspress' ),
+ 'view_item' => __( 'View Venue', 'sportspress' ),
+ 'update_item' => __( 'Update Venue', 'sportspress' ),
+ 'add_new_item' => __( 'Add New Venue', 'sportspress' ),
+ 'new_item_name' => __( 'New Venue Name', 'sportspress' ),
+ 'parent_item' => __( 'Parent Venue', 'sportspress' ),
+ 'parent_item_colon' => __( 'Parent Venue:', 'sportspress' ),
+ 'search_items' => __( 'Search Venues', 'sportspress' ),
+ 'not_found' => __( 'No venues found.', 'sportspress' ),
+ );
$args = array(
- 'label' => $name,
+ 'label' => __( 'Venues', 'sportspress' ),
'labels' => $labels,
'public' => true,
'show_in_nav_menus' => false,
@@ -14,9 +23,11 @@ function sportspress_venue_term_init() {
'hierarchical' => true,
'rewrite' => array( 'slug' => 'venue' ),
);
- register_taxonomy( 'sp_venue', $object_type, $args );
- register_taxonomy_for_object_type( 'sp_venue', 'sp_event' );
- register_taxonomy_for_object_type( 'sp_venue', 'attachment' );
+ $object_types = array( 'sp_event', 'attachment' );
+ register_taxonomy( 'sp_venue', $object_types, $args );
+ foreach ( $object_types as $object_type ):
+ register_taxonomy_for_object_type( 'sp_league', $object_type );
+ endforeach;
}
add_action( 'init', 'sportspress_venue_term_init' );
diff --git a/admin/tools/player-importer.php b/admin/tools/player-importer.php
index ed9651ff..7df473e2 100644
--- a/admin/tools/player-importer.php
+++ b/admin/tools/player-importer.php
@@ -211,7 +211,7 @@ if ( class_exists( 'WP_Importer' ) ) {
* Performs post-import cleanup of files and the cache
*/
function import_end() {
- echo '' . __( 'All done!', 'sportspress' ) . ' ' . sprintf( __( 'View %s', 'sportspress' ), __( 'Players', 'sportspress' ) ) . '' . '
';
+ echo '' . __( 'All done!', 'sportspress' ) . ' ' . __( 'View Players', 'sportspress' ) . '' . '
';
do_action( 'import_end' );
}
@@ -261,7 +261,7 @@ if ( class_exists( 'WP_Importer' ) ) {
* @return void
*/
function header() {
- echo '' . sprintf( __( 'Import %s', 'sportspress' ), __( 'Players', 'sportspress' ) ) . '
';
+ echo '
' . __( 'Import Players', 'sportspress' ) . '
';
}
/**
diff --git a/admin/tools/team-importer.php b/admin/tools/team-importer.php
index 78bc7c45..a1660220 100644
--- a/admin/tools/team-importer.php
+++ b/admin/tools/team-importer.php
@@ -170,7 +170,7 @@ if ( class_exists( 'WP_Importer' ) ) {
* Performs post-import cleanup of files and the cache
*/
function import_end() {
- echo '
' . __( 'All done!', 'sportspress' ) . ' ' . sprintf( __( 'View %s', 'sportspress' ), __( 'Teams', 'sportspress' ) ) . '' . '
';
+ echo '
' . __( 'All done!', 'sportspress' ) . ' ' . __( 'View Teams', 'sportspress' ) . '' . '
';
do_action( 'import_end' );
}
@@ -220,7 +220,7 @@ if ( class_exists( 'WP_Importer' ) ) {
* @return void
*/
function header() {
- echo '
' . sprintf( __( 'Import %s', 'sportspress' ), __( 'Teams', 'sportspress' ) ) . '
';
+ echo '
' . __( 'Import Teams', 'sportspress' ) . '
';
}
/**
diff --git a/admin/widgets/countdown.php b/admin/widgets/countdown.php
index 643379ce..496b49c2 100644
--- a/admin/widgets/countdown.php
+++ b/admin/widgets/countdown.php
@@ -34,7 +34,7 @@ class SP_Widget_Countdown extends WP_Widget {
-
+
'sp_event',
@@ -48,13 +48,13 @@ class SP_Widget_Countdown extends WP_Widget {
'post_status' => 'future',
);
if ( ! sportspress_dropdown_pages( $args ) ):
- sportspress_post_adder( 'sp_event' );
+ sportspress_post_adder( 'sp_event', __( 'Add New Event', 'sportspress' ) );
endif;
?>
>
-
+
$this->get_field_name('league'),
'id' => $this->get_field_id('league'),
'selected' => $league,
- 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Leagues', 'sportspress' ) ),
+ 'show_option_all' => __( 'All Leagues', 'sportspress' ),
'hide_empty' => 0,
'values' => 'term_id',
'class' => 'widefat',
@@ -78,7 +78,7 @@ class SportsPress_Widget_Future_Events extends WP_Widget {
'name' => $this->get_field_name('season'),
'id' => $this->get_field_id('season'),
'selected' => $season,
- 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Seasons', 'sportspress' ) ),
+ 'show_option_all' => __( 'All Seasons', 'sportspress' ),
'hide_empty' => 0,
'values' => 'term_id',
'class' => 'widefat',
@@ -94,7 +94,7 @@ class SportsPress_Widget_Future_Events extends WP_Widget {
'name' => $this->get_field_name('venue'),
'id' => $this->get_field_id('venue'),
'selected' => $venue,
- 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Venues', 'sportspress' ) ),
+ 'show_option_all' => __( 'All Venues', 'sportspress' ),
'hide_empty' => 0,
'values' => 'term_id',
'class' => 'widefat',
@@ -110,17 +110,17 @@ class SportsPress_Widget_Future_Events extends WP_Widget {
'name' => $this->get_field_name('team'),
'id' => $this->get_field_id('team'),
'selected' => $team,
- 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Teams', 'sportspress' ) ),
+ 'show_option_all' => __( 'All Teams', 'sportspress' ),
'values' => 'ID',
'class' => 'widefat',
);
if ( ! sportspress_dropdown_pages( $args ) ):
- sportspress_post_adder( 'sp_table' );
+ sportspress_post_adder( 'sp_table', __( 'Add New League Table', 'sportspress' ) );
endif;
?>
-
+
-
+
'sp_table',
@@ -49,7 +49,7 @@ class SportsPress_Widget_League_Table extends WP_Widget {
'class' => 'widefat',
);
if ( ! sportspress_dropdown_pages( $args ) ):
- sportspress_post_adder( 'sp_table' );
+ sportspress_post_adder( 'sp_table', __( 'Add New League Table', 'sportspress' ) );
endif;
?>
diff --git a/admin/widgets/player-list.php b/admin/widgets/player-list.php
index c5fbf850..cc5ae278 100644
--- a/admin/widgets/player-list.php
+++ b/admin/widgets/player-list.php
@@ -44,7 +44,7 @@ class SportsPress_Widget_Player_list extends WP_Widget {
-
+
'sp_list',
@@ -55,7 +55,7 @@ class SportsPress_Widget_Player_list extends WP_Widget {
'class' => 'widefat',
);
if ( ! sportspress_dropdown_pages( $args ) ):
- sportspress_post_adder( 'sp_list' );
+ sportspress_post_adder( 'sp_list', __( 'Add New Player List', 'sportspress' ) );
endif;
?>
@@ -98,7 +98,7 @@ class SportsPress_Widget_Player_list extends WP_Widget {
'class' => 'sp-select-orderby widefat',
);
if ( ! sportspress_dropdown_pages( $args ) ):
- sportspress_post_adder( 'sp_list' );
+ sportspress_post_adder( 'sp_list', __( 'Add New Player List', 'sportspress' ) );
endif;
?>
diff --git a/admin/widgets/recent-events.php b/admin/widgets/recent-events.php
index 832a86ba..5c8f5451 100644
--- a/admin/widgets/recent-events.php
+++ b/admin/widgets/recent-events.php
@@ -62,7 +62,7 @@ class SportsPress_Widget_Recent_Events extends WP_Widget {
'name' => $this->get_field_name('league'),
'id' => $this->get_field_id('league'),
'selected' => $league,
- 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Leagues', 'sportspress' ) ),
+ 'show_option_all' => __( 'All Leagues', 'sportspress' ),
'hide_empty' => 0,
'values' => 'term_id',
'class' => 'widefat',
@@ -78,7 +78,7 @@ class SportsPress_Widget_Recent_Events extends WP_Widget {
'name' => $this->get_field_name('season'),
'id' => $this->get_field_id('season'),
'selected' => $season,
- 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Seasons', 'sportspress' ) ),
+ 'show_option_all' => __( 'All Seasons', 'sportspress' ),
'hide_empty' => 0,
'values' => 'term_id',
'class' => 'widefat',
@@ -94,7 +94,7 @@ class SportsPress_Widget_Recent_Events extends WP_Widget {
'name' => $this->get_field_name('venue'),
'id' => $this->get_field_id('venue'),
'selected' => $venue,
- 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Venues', 'sportspress' ) ),
+ 'show_option_all' => __( 'All Venues', 'sportspress' ),
'hide_empty' => 0,
'values' => 'term_id',
'class' => 'widefat',
@@ -110,17 +110,17 @@ class SportsPress_Widget_Recent_Events extends WP_Widget {
'name' => $this->get_field_name('team'),
'id' => $this->get_field_id('team'),
'selected' => $team,
- 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Teams', 'sportspress' ) ),
+ 'show_option_all' => __( 'All Teams', 'sportspress' ),
'values' => 'ID',
'class' => 'widefat',
);
if ( ! sportspress_dropdown_pages( $args ) ):
- sportspress_post_adder( 'sp_table' );
+ sportspress_post_adder( 'sp_table', __( 'Add New League Table', 'sportspress' ) );
endif;
?>
-
+
$name,
- 'singular_name' => $singular_name,
- 'all_items' => $name,
- 'add_new' => sprintf( __( 'Add New', 'sportspress' ), $singular_name ),
- 'add_new_item' => sprintf( __( 'Add New %s', 'sportspress' ), $singular_name ),
- 'edit_item' => sprintf( __( 'Edit %s', 'sportspress' ), $singular_name ),
- 'new_item' => sprintf( __( 'New %s', 'sportspress' ), $singular_name ),
- 'view_item' => sprintf( __( 'View %s', 'sportspress' ), $singular_name ),
- 'search_items' => sprintf( __( 'Search %s', 'sportspress' ), $name ),
- 'not_found' => sprintf( __( 'No %s found.', 'sportspress' ), $lowercase_name ),
- 'not_found_in_trash' => sprintf( __( 'No %s found in trash.', 'sportspress' ), $lowercase_name ),
- 'parent_item_colon' => sprintf( __( 'Parent %s', 'sportspress' ), $singular_name ) . ':'
- );
- return $labels;
- }
-}
-
-if ( !function_exists( 'sportspress_get_term_labels' ) ) {
- function sportspress_get_term_labels( $name, $singular_name, $lowercase_name = null ) {
- if ( !$lowercase_name ) $lowercase_name = $name;
- $labels = array(
- 'name' => $name,
- 'singular_name' => $singular_name,
- 'all_items' => sprintf( __( 'All %s', 'sportspress' ), $name ),
- 'edit_item' => sprintf( __( 'Edit %s', 'sportspress' ), $singular_name ),
- 'view_item' => sprintf( __( 'View %s', 'sportspress' ), $singular_name ),
- 'update_item' => sprintf( __( 'Update %s', 'sportspress' ), $singular_name ),
- 'add_new_item' => sprintf( __( 'Add New %s', 'sportspress' ), $singular_name ),
- 'new_item_name' => sprintf( __( 'New %s Name', 'sportspress' ), $singular_name ),
- 'parent_item' => sprintf( __( 'Parent %s', 'sportspress' ), $singular_name ),
- 'parent_item_colon' => sprintf( __( 'Parent %s', 'sportspress' ), $singular_name ) . ':',
- 'search_items' => sprintf( __( 'Search %s', 'sportspress' ), $name ),
- 'not_found' => sprintf( __( 'No %s found.', 'sportspress' ), $lowercase_name )
- );
- return $labels;
- }
-}
-
if ( !function_exists( 'sportspress_get_the_term_id' ) ) {
function sportspress_get_the_term_id( $post_id, $taxonomy, $index ) {
$terms = get_the_terms( $post_id, $taxonomy );
@@ -716,7 +674,7 @@ if ( !function_exists( 'sportspress_get_var_calculates' ) ) {
if ( !function_exists( 'sportspress_edit_calendar_table' ) ) {
function sportspress_edit_calendar_table( $data = array() ) {
if ( empty( $data ) ):
- printf( __( 'No %s found.', 'sportspress' ), __( 'events', 'sportspress' ) );
+ _e( 'No Events found.', 'sportspress' );
return false;
endif;
?>
@@ -1171,13 +1129,15 @@ if ( !function_exists( 'sportspress_player_nationality_selector' ) ) {
}
if ( !function_exists( 'sportspress_post_adder' ) ) {
- function sportspress_post_adder( $post_type = 'post' ) {
+ function sportspress_post_adder( $post_type = 'post', $label = null ) {
$obj = get_post_type_object( $post_type );
+ if ( $label == null )
+ $label = __( 'Add New', 'sportspress' );
?>
@@ -1186,13 +1146,15 @@ if ( !function_exists( 'sportspress_post_adder' ) ) {
}
if ( !function_exists( 'sportspress_taxonomy_adder' ) ) {
- function sportspress_taxonomy_adder( $taxonomy = 'category', $post_type = 'post' ) {
+ function sportspress_taxonomy_adder( $taxonomy = 'category', $post_type = 'post', $label = null ) {
$obj = get_taxonomy( $taxonomy );
+ if ( $label == null )
+ $label = __( 'Add New', 'sportspress' );
?>