Escape outputs
This commit is contained in:
@@ -111,13 +111,13 @@ if ( ! class_exists( 'SP_Admin_Assets' ) ) :
|
||||
$strings = apply_filters(
|
||||
'sportspress_localized_strings',
|
||||
array(
|
||||
'none' => __( 'None', 'sportspress' ),
|
||||
'remove_text' => __( '— Remove —', 'sportspress' ),
|
||||
'days' => __( 'days', 'sportspress' ),
|
||||
'hrs' => __( 'hrs', 'sportspress' ),
|
||||
'mins' => __( 'mins', 'sportspress' ),
|
||||
'secs' => __( 'secs', 'sportspress' ),
|
||||
'displaying_posts' => html_entity_decode( __( 'Displaying %1$s–%2$s of %3$s', 'sportspress' ) ),
|
||||
'none' => esc_attr__( 'None', 'sportspress' ),
|
||||
'remove_text' => esc_attr__( '— Remove —', 'sportspress' ),
|
||||
'days' => esc_attr__( 'days', 'sportspress' ),
|
||||
'hrs' => esc_attr__( 'hrs', 'sportspress' ),
|
||||
'mins' => esc_attr__( 'mins', 'sportspress' ),
|
||||
'secs' => esc_attr__( 'secs', 'sportspress' ),
|
||||
'displaying_posts' => html_entity_decode( esc_attr__( 'Displaying %1$s–%2$s of %3$s', 'sportspress' ) ),
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -33,8 +33,8 @@ if ( ! class_exists( 'SP_Admin_Dashboard' ) ) :
|
||||
* Init dashboard widgets
|
||||
*/
|
||||
public function init() {
|
||||
// wp_add_dashboard_widget( 'sportspress_dashboard_news', __( 'Sports News', 'sportspress' ), array( $this, 'news_widget' ), null, null, 'side' );
|
||||
wp_add_dashboard_widget( 'sportspress_dashboard_status', __( 'SportsPress', 'sportspress' ), array( $this, 'status_widget' ) );
|
||||
// wp_add_dashboard_widget( 'sportspress_dashboard_news', esc_attr__( 'Sports News', 'sportspress' ), array( $this, 'news_widget' ), null, null, 'side' );
|
||||
wp_add_dashboard_widget( 'sportspress_dashboard_status', esc_attr__( 'SportsPress', 'sportspress' ), array( $this, 'status_widget' ) );
|
||||
add_filter( 'dashboard_glance_items', array( $this, 'glance_items' ), 10, 1 );
|
||||
}
|
||||
|
||||
|
||||
@@ -35,28 +35,28 @@ if ( ! class_exists( 'SP_Admin_Importers' ) ) :
|
||||
'sportspress_importers',
|
||||
array(
|
||||
'sp_event_csv' => array(
|
||||
'name' => __( 'SportsPress Events (CSV)', 'sportspress' ),
|
||||
'description' => __( 'Import <strong>events</strong> from a csv file.', 'sportspress' ),
|
||||
'name' => esc_attr__( 'SportsPress Events (CSV)', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Import <strong>events</strong> from a csv file.', 'sportspress' ),
|
||||
'callback' => array( $this, 'events_importer' ),
|
||||
),
|
||||
'sp_fixture_csv' => array(
|
||||
'name' => __( 'SportsPress Fixtures (CSV)', 'sportspress' ),
|
||||
'description' => __( 'Import <strong>upcoming events</strong> from a csv file.', 'sportspress' ),
|
||||
'name' => esc_attr__( 'SportsPress Fixtures (CSV)', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Import <strong>upcoming events</strong> from a csv file.', 'sportspress' ),
|
||||
'callback' => array( $this, 'fixtures_importer' ),
|
||||
),
|
||||
'sp_team_csv' => array(
|
||||
'name' => __( 'SportsPress Teams (CSV)', 'sportspress' ),
|
||||
'description' => __( 'Import <strong>teams</strong> from a csv file.', 'sportspress' ),
|
||||
'name' => esc_attr__( 'SportsPress Teams (CSV)', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Import <strong>teams</strong> from a csv file.', 'sportspress' ),
|
||||
'callback' => array( $this, 'teams_importer' ),
|
||||
),
|
||||
'sp_player_csv' => array(
|
||||
'name' => __( 'SportsPress Players (CSV)', 'sportspress' ),
|
||||
'description' => __( 'Import <strong>players</strong> from a csv file.', 'sportspress' ),
|
||||
'name' => esc_attr__( 'SportsPress Players (CSV)', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Import <strong>players</strong> from a csv file.', 'sportspress' ),
|
||||
'callback' => array( $this, 'players_importer' ),
|
||||
),
|
||||
'sp_staff_csv' => array(
|
||||
'name' => __( 'SportsPress Staff (CSV)', 'sportspress' ),
|
||||
'description' => __( 'Import <strong>staff</strong> from a csv file.', 'sportspress' ),
|
||||
'name' => esc_attr__( 'SportsPress Staff (CSV)', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Import <strong>staff</strong> from a csv file.', 'sportspress' ),
|
||||
'callback' => array( $this, 'staff_importer' ),
|
||||
),
|
||||
)
|
||||
@@ -64,8 +64,8 @@ if ( ! class_exists( 'SP_Admin_Importers' ) ) :
|
||||
|
||||
if ( 'import.php' !== $pagenow ) {
|
||||
$importers['sp_event_performance_csv'] = array(
|
||||
'name' => __( 'SportsPress Box Score (CSV)', 'sportspress' ),
|
||||
'description' => '<a href="' . admin_url( add_query_arg( array( 'post_type' => 'sp_event' ), 'edit.php' ) ) . '">' . sprintf( __( 'Select %s', 'sportspress' ), __( 'Event', 'sportspress' ) ) . '</a>',
|
||||
'name' => esc_attr__( 'SportsPress Box Score (CSV)', 'sportspress' ),
|
||||
'description' => '<a href="' . admin_url( add_query_arg( array( 'post_type' => 'sp_event' ), 'edit.php' ) ) . '">' . sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Event', 'sportspress' ) ) . '</a>',
|
||||
'callback' => array( $this, 'event_performance_importer' ),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -47,28 +47,28 @@ if ( ! class_exists( 'SP_Admin_Menus' ) ) :
|
||||
$menu[] = array( '', 'read', 'separator-sportspress', '', 'wp-menu-separator sportspress' );
|
||||
}
|
||||
|
||||
$main_page = add_menu_page( __( 'SportsPress', 'sportspress' ), __( 'SportsPress', 'sportspress' ), 'manage_sportspress', 'sportspress', array( $this, 'settings_page' ), apply_filters( 'sportspress_menu_icon', null ), '51.5' );
|
||||
$main_page = add_menu_page( esc_attr__( 'SportsPress', 'sportspress' ), esc_attr__( 'SportsPress', 'sportspress' ), 'manage_sportspress', 'sportspress', array( $this, 'settings_page' ), apply_filters( 'sportspress_menu_icon', null ), '51.5' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Add menu item
|
||||
*/
|
||||
public function config_menu() {
|
||||
add_submenu_page( 'sportspress', __( 'Configure', 'sportspress' ), __( 'Configure', 'sportspress' ), 'manage_sportspress', 'sportspress-config', array( $this, 'config_page' ) );
|
||||
add_submenu_page( 'sportspress', esc_attr__( 'Configure', 'sportspress' ), esc_attr__( 'Configure', 'sportspress' ), 'manage_sportspress', 'sportspress-config', array( $this, 'config_page' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* 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', esc_attr__( 'Leagues', 'sportspress' ), esc_attr__( 'Leagues', 'sportspress' ), 'manage_sportspress', 'edit-tags.php?taxonomy=sp_league' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Add menu item
|
||||
*/
|
||||
public function seasons_menu() {
|
||||
add_submenu_page( 'sportspress', __( 'Seasons', 'sportspress' ), __( 'Seasons', 'sportspress' ), 'manage_sportspress', 'edit-tags.php?taxonomy=sp_season' );
|
||||
add_submenu_page( 'sportspress', esc_attr__( 'Seasons', 'sportspress' ), esc_attr__( 'Seasons', 'sportspress' ), 'manage_sportspress', 'edit-tags.php?taxonomy=sp_season' );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -106,7 +106,7 @@ if ( ! class_exists( 'SP_Admin_Menus' ) ) :
|
||||
global $menu, $submenu;
|
||||
|
||||
if ( isset( $submenu['sportspress'] ) && isset( $submenu['sportspress'][0] ) && isset( $submenu['sportspress'][0][0] ) ) {
|
||||
$submenu['sportspress'][0][0] = __( 'Settings', 'sportspress' );
|
||||
$submenu['sportspress'][0][0] = esc_attr__( 'Settings', 'sportspress' );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -253,23 +253,23 @@ if ( ! class_exists( 'SP_Admin_Menus' ) ) :
|
||||
}
|
||||
|
||||
public function remove_add_new( $arr = array() ) {
|
||||
return $arr[0] != __( 'Add New', 'sportspress' );
|
||||
return $arr[0] != esc_attr__( 'Add New', 'sportspress' );
|
||||
}
|
||||
|
||||
public function remove_leagues( $arr = array() ) {
|
||||
return $arr[0] != __( 'Leagues', 'sportspress' );
|
||||
return $arr[0] != esc_attr__( 'Leagues', 'sportspress' );
|
||||
}
|
||||
|
||||
public function remove_positions( $arr = array() ) {
|
||||
return $arr[0] != __( 'Positions', 'sportspress' );
|
||||
return $arr[0] != esc_attr__( 'Positions', 'sportspress' );
|
||||
}
|
||||
|
||||
public function remove_seasons( $arr = array() ) {
|
||||
return $arr[0] != __( 'Seasons', 'sportspress' );
|
||||
return $arr[0] != esc_attr__( 'Seasons', 'sportspress' );
|
||||
}
|
||||
|
||||
public function remove_venues( $arr = array() ) {
|
||||
return $arr[0] != __( 'Venues', 'sportspress' );
|
||||
return $arr[0] != esc_attr__( 'Venues', 'sportspress' );
|
||||
}
|
||||
|
||||
public static function highlight_admin_menu( $p = 'sportspress', $s = 'sportspress' ) {
|
||||
|
||||
@@ -26,17 +26,17 @@ if ( ! class_exists( 'SP_Admin_Permalink_Settings' ) ) :
|
||||
$this->slugs = apply_filters(
|
||||
'sportspress_permalink_slugs',
|
||||
array(
|
||||
array( 'event', __( 'Events', 'sportspress' ) ),
|
||||
array( 'venue', __( 'Venues', 'sportspress' ) ),
|
||||
array( 'calendar', __( 'Calendars', 'sportspress' ) ),
|
||||
array( 'team', __( 'Teams', 'sportspress' ) ),
|
||||
array( 'league', __( 'Leagues', 'sportspress' ) ),
|
||||
array( 'season', __( 'Seasons', 'sportspress' ) ),
|
||||
array( 'table', __( 'League Tables', 'sportspress' ) ),
|
||||
array( 'player', __( 'Players', 'sportspress' ) ),
|
||||
array( 'position', __( 'Positions', 'sportspress' ) ),
|
||||
array( 'list', __( 'Player Lists', 'sportspress' ) ),
|
||||
array( 'staff', __( 'Staff', 'sportspress' ) ),
|
||||
array( 'event', esc_attr__( 'Events', 'sportspress' ) ),
|
||||
array( 'venue', esc_attr__( 'Venues', 'sportspress' ) ),
|
||||
array( 'calendar', esc_attr__( 'Calendars', 'sportspress' ) ),
|
||||
array( 'team', esc_attr__( 'Teams', 'sportspress' ) ),
|
||||
array( 'league', esc_attr__( 'Leagues', 'sportspress' ) ),
|
||||
array( 'season', esc_attr__( 'Seasons', 'sportspress' ) ),
|
||||
array( 'table', esc_attr__( 'League Tables', 'sportspress' ) ),
|
||||
array( 'player', esc_attr__( 'Players', 'sportspress' ) ),
|
||||
array( 'position', esc_attr__( 'Positions', 'sportspress' ) ),
|
||||
array( 'list', esc_attr__( 'Player Lists', 'sportspress' ) ),
|
||||
array( 'staff', esc_attr__( 'Staff', 'sportspress' ) ),
|
||||
)
|
||||
);
|
||||
|
||||
@@ -49,7 +49,7 @@ if ( ! class_exists( 'SP_Admin_Permalink_Settings' ) ) :
|
||||
*/
|
||||
public function settings_init() {
|
||||
// Add a section to the permalinks page
|
||||
add_settings_section( 'sportspress-permalink', __( 'SportsPress', 'sportspress' ), array( $this, 'settings' ), 'permalink' );
|
||||
add_settings_section( 'sportspress-permalink', esc_attr__( 'SportsPress', 'sportspress' ), array( $this, 'settings' ), 'permalink' );
|
||||
|
||||
// Add our settings
|
||||
foreach ( $this->slugs as $slug ) :
|
||||
@@ -78,7 +78,7 @@ if ( ! class_exists( 'SP_Admin_Permalink_Settings' ) ) :
|
||||
* Show the settings
|
||||
*/
|
||||
public function settings() {
|
||||
echo wp_kses_post( wpautop( __( 'These settings control the permalinks used for SportsPress. These settings only apply when <strong>not using "default" permalinks above</strong>.', 'sportspress' ) ) );
|
||||
echo wp_kses_post( wpautop( esc_attr__( 'These settings control the permalinks used for SportsPress. These settings only apply when <strong>not using "default" permalinks above</strong>.', 'sportspress' ) ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -74,38 +74,38 @@ if ( ! class_exists( 'SP_Admin_Post_Types' ) ) :
|
||||
$obj = get_post_type_object( $typenow );
|
||||
|
||||
for ( $i = 0; $i <= 10; $i++ ) :
|
||||
$messages['post'][ $i ] = __( 'Settings saved.', 'sportspress' ) .
|
||||
$messages['post'][ $i ] = esc_attr__( 'Settings saved.', 'sportspress' ) .
|
||||
' <a href="' . esc_url( admin_url( 'edit.php?post_type=' . $typenow ) ) . '">' .
|
||||
__( 'View All', 'sportspress' ) . '</a>';
|
||||
endfor;
|
||||
elseif ( is_sp_post_type( $typenow ) ) :
|
||||
$obj = get_post_type_object( $typenow );
|
||||
|
||||
$messages['post'][1] = __( 'Changes saved.', 'sportspress' ) .
|
||||
$messages['post'][1] = esc_attr__( 'Changes saved.', 'sportspress' ) .
|
||||
' <a href="' . esc_url( get_permalink( $post->ID ) ) . '">' . $obj->labels->view_item . '</a>';
|
||||
|
||||
$messages['post'][4] = __( 'Changes saved.', 'sportspress' );
|
||||
$messages['post'][4] = esc_attr__( 'Changes saved.', 'sportspress' );
|
||||
|
||||
$messages['post'][6] = __( 'Success!', 'sportspress' ) .
|
||||
$messages['post'][6] = esc_attr__( 'Success!', 'sportspress' ) .
|
||||
' <a href="' . esc_url( get_permalink( $post->ID ) ) . '">' . $obj->labels->view_item . '</a>';
|
||||
|
||||
$messages['post'][7] = __( 'Changes saved.', 'sportspress' );
|
||||
$messages['post'][7] = esc_attr__( 'Changes saved.', 'sportspress' );
|
||||
|
||||
$messages['post'][8] = __( 'Success!', 'sportspress' ) .
|
||||
$messages['post'][8] = esc_attr__( 'Success!', 'sportspress' ) .
|
||||
' <a target="_blank" href="' . esc_url( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) . '">' .
|
||||
sprintf( __( 'Preview %s', 'sportspress' ), $obj->labels->singular_name ) . '</a>';
|
||||
sprintf( esc_attr__( 'Preview %s', 'sportspress' ), $obj->labels->singular_name ) . '</a>';
|
||||
|
||||
$messages['post'][9] = sprintf(
|
||||
__( 'Scheduled for: <b>%1$s</b>.', 'sportspress' ),
|
||||
date_i18n( __( 'M j, Y @ G:i', 'sportspress' ), strtotime( $post->post_date ) ),
|
||||
date_i18n( esc_attr__( 'M j, Y @ G:i', 'sportspress' ), strtotime( $post->post_date ) ),
|
||||
esc_url( get_permalink( $post->ID ) )
|
||||
) .
|
||||
' <a target="_blank" href="' . esc_url( get_permalink( $post->ID ) ) . '">' .
|
||||
sprintf( __( 'Preview %s', 'sportspress' ), $obj->labels->singular_name ) . '</a>';
|
||||
sprintf( esc_attr__( 'Preview %s', 'sportspress' ), $obj->labels->singular_name ) . '</a>';
|
||||
|
||||
$messages['post'][10] = __( 'Success!', 'sportspress' ) .
|
||||
$messages['post'][10] = esc_attr__( 'Success!', 'sportspress' ) .
|
||||
' <a target="_blank" href="' . esc_url( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) . '">' .
|
||||
sprintf( __( 'Preview %s', 'sportspress' ), $obj->labels->singular_name ) . '</a>';
|
||||
sprintf( esc_attr__( 'Preview %s', 'sportspress' ), $obj->labels->singular_name ) . '</a>';
|
||||
endif;
|
||||
|
||||
return $messages;
|
||||
|
||||
@@ -170,7 +170,7 @@ class SP_Admin_Sample_Data {
|
||||
$post['post_title'] = $team['name'];
|
||||
$post['post_type'] = 'sp_team';
|
||||
$post['post_status'] = 'publish';
|
||||
$post['post_content'] = sprintf( $sample_content, __( 'Team', 'sportspress' ), __( 'Teams', 'sportspress' ), add_query_arg( 'post_type', 'sp_team', admin_url( 'edit.php' ) ) );
|
||||
$post['post_content'] = sprintf( $sample_content, esc_attr__( 'Team', 'sportspress' ), esc_attr__( 'Teams', 'sportspress' ), add_query_arg( 'post_type', 'sp_team', admin_url( 'edit.php' ) ) );
|
||||
|
||||
// Terms
|
||||
$post['tax_input'] = array();
|
||||
@@ -230,7 +230,7 @@ class SP_Admin_Sample_Data {
|
||||
$post['post_title'] = $name;
|
||||
$post['post_type'] = 'sp_player';
|
||||
$post['post_status'] = 'publish';
|
||||
$post['post_content'] = sprintf( $sample_content, __( 'Player', 'sportspress' ), __( 'Players', 'sportspress' ), add_query_arg( 'post_type', 'sp_player', admin_url( 'edit.php' ) ) );
|
||||
$post['post_content'] = sprintf( $sample_content, esc_attr__( 'Player', 'sportspress' ), esc_attr__( 'Players', 'sportspress' ), add_query_arg( 'post_type', 'sp_player', admin_url( 'edit.php' ) ) );
|
||||
|
||||
// Terms
|
||||
$post['tax_input'] = array();
|
||||
@@ -342,7 +342,7 @@ class SP_Admin_Sample_Data {
|
||||
$post['post_title'] = $name;
|
||||
$post['post_type'] = 'sp_staff';
|
||||
$post['post_status'] = 'publish';
|
||||
$post['post_content'] = sprintf( $sample_content, __( 'Staff', 'sportspress' ), __( 'Staff', 'sportspress' ), add_query_arg( 'post_type', 'sp_staff', admin_url( 'edit.php' ) ) );
|
||||
$post['post_content'] = sprintf( $sample_content, esc_attr__( 'Staff', 'sportspress' ), esc_attr__( 'Staff', 'sportspress' ), add_query_arg( 'post_type', 'sp_staff', admin_url( 'edit.php' ) ) );
|
||||
|
||||
// Terms
|
||||
$post['tax_input'] = array();
|
||||
@@ -438,7 +438,7 @@ class SP_Admin_Sample_Data {
|
||||
'post_title' => $teams[ $i ]['name'] . ' ' . get_option( 'sportspress_event_teams_delimiter', 'vs' ) . ' ' . $teams[ $away_index ]['name'],
|
||||
'post_type' => 'sp_event',
|
||||
'post_status' => $post_status,
|
||||
'post_content' => sprintf( $sample_content, __( 'Event', 'sportspress' ), __( 'Events', 'sportspress' ), add_query_arg( 'post_type', 'sp_event', admin_url( 'edit.php' ) ) ),
|
||||
'post_content' => sprintf( $sample_content, esc_attr__( 'Event', 'sportspress' ), esc_attr__( 'Events', 'sportspress' ), add_query_arg( 'post_type', 'sp_event', admin_url( 'edit.php' ) ) ),
|
||||
'post_date' => $post_year . '-' . sprintf( '%02d', 3 + $i * 3 ) . '-' . sprintf( '%02d', 5 + $i * 10 ) . ' ' . ( 18 + $i ) . ':00:00',
|
||||
'tax_input' => array(
|
||||
'sp_league' => get_terms(
|
||||
@@ -568,7 +568,7 @@ class SP_Admin_Sample_Data {
|
||||
'post_title' => _x( 'Fixtures & Results', 'example', 'sportspress' ),
|
||||
'post_type' => 'sp_calendar',
|
||||
'post_status' => 'publish',
|
||||
'post_content' => sprintf( $sample_content, __( 'Calendar', 'sportspress' ), __( 'Calendars', 'sportspress' ), add_query_arg( 'post_type', 'sp_calendar', admin_url( 'edit.php' ) ) ),
|
||||
'post_content' => sprintf( $sample_content, esc_attr__( 'Calendar', 'sportspress' ), esc_attr__( 'Calendars', 'sportspress' ), add_query_arg( 'post_type', 'sp_calendar', admin_url( 'edit.php' ) ) ),
|
||||
);
|
||||
|
||||
// Insert post
|
||||
@@ -618,7 +618,7 @@ class SP_Admin_Sample_Data {
|
||||
'post_title' => $league->name . ' ' . $season->name,
|
||||
'post_type' => 'sp_table',
|
||||
'post_status' => 'publish',
|
||||
'post_content' => sprintf( $sample_content, __( 'League Table', 'sportspress' ), __( 'League Tables', 'sportspress' ), add_query_arg( 'post_type', 'sp_table', admin_url( 'edit.php' ) ) ),
|
||||
'post_content' => sprintf( $sample_content, esc_attr__( 'League Table', 'sportspress' ), esc_attr__( 'League Tables', 'sportspress' ), add_query_arg( 'post_type', 'sp_table', admin_url( 'edit.php' ) ) ),
|
||||
'tax_input' => array(
|
||||
'sp_league' => $league->term_id,
|
||||
'sp_season' => $season->term_id,
|
||||
@@ -660,7 +660,7 @@ class SP_Admin_Sample_Data {
|
||||
'post_title' => get_the_title( $team_id ) . ' ' . _x( 'Roster', 'example', 'sportspress' ),
|
||||
'post_type' => 'sp_list',
|
||||
'post_status' => 'publish',
|
||||
'post_content' => sprintf( $sample_content, __( 'Player List', 'sportspress' ), __( 'Player Lists', 'sportspress' ), add_query_arg( 'post_type', 'sp_list', admin_url( 'edit.php' ) ) ),
|
||||
'post_content' => sprintf( $sample_content, esc_attr__( 'Player List', 'sportspress' ), esc_attr__( 'Player Lists', 'sportspress' ), add_query_arg( 'post_type', 'sp_list', admin_url( 'edit.php' ) ) ),
|
||||
);
|
||||
|
||||
// Insert post
|
||||
@@ -705,7 +705,7 @@ class SP_Admin_Sample_Data {
|
||||
'post_title' => _x( 'Player Ranking', 'example', 'sportspress' ),
|
||||
'post_type' => 'sp_list',
|
||||
'post_status' => 'publish',
|
||||
'post_content' => sprintf( $sample_content, __( 'Player List', 'sportspress' ), __( 'Player Lists', 'sportspress' ), add_query_arg( 'post_type', 'sp_list', admin_url( 'edit.php' ) ) ),
|
||||
'post_content' => sprintf( $sample_content, esc_attr__( 'Player List', 'sportspress' ), esc_attr__( 'Player Lists', 'sportspress' ), add_query_arg( 'post_type', 'sp_list', admin_url( 'edit.php' ) ) ),
|
||||
);
|
||||
|
||||
// Insert post
|
||||
|
||||
@@ -74,7 +74,7 @@ if ( ! class_exists( 'SP_Admin_Settings' ) ) :
|
||||
do_action( 'sportspress_update_options_' . $current_tab );
|
||||
do_action( 'sportspress_update_options' );
|
||||
|
||||
self::add_message( __( 'Your settings have been saved.', 'sportspress' ) );
|
||||
self::add_message( esc_attr__( 'Your settings have been saved.', 'sportspress' ) );
|
||||
|
||||
do_action( 'sportspress_settings_saved' );
|
||||
}
|
||||
@@ -144,7 +144,7 @@ if ( ! class_exists( 'SP_Admin_Settings' ) ) :
|
||||
'sportspress_settings',
|
||||
'localized_strings',
|
||||
array(
|
||||
'none' => __( 'None', 'sportspress' ),
|
||||
'none' => esc_attr__( 'None', 'sportspress' ),
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -57,37 +57,37 @@ class SP_Admin_Setup_Wizard {
|
||||
}
|
||||
$this->steps = array(
|
||||
'introduction' => array(
|
||||
'name' => __( 'Introduction', 'sportspress' ),
|
||||
'name' => esc_attr__( 'Introduction', 'sportspress' ),
|
||||
'view' => array( $this, 'sp_setup_introduction' ),
|
||||
'handler' => '',
|
||||
),
|
||||
'basics' => array(
|
||||
'name' => __( 'Basic Setup', 'sportspress' ),
|
||||
'name' => esc_attr__( 'Basic Setup', 'sportspress' ),
|
||||
'view' => array( $this, 'sp_setup_basics' ),
|
||||
'handler' => array( $this, 'sp_setup_basics_save' ),
|
||||
),
|
||||
'teams' => array(
|
||||
'name' => __( 'Teams', 'sportspress' ),
|
||||
'name' => esc_attr__( 'Teams', 'sportspress' ),
|
||||
'view' => array( $this, 'sp_setup_teams' ),
|
||||
'handler' => array( $this, 'sp_setup_teams_save' ),
|
||||
),
|
||||
'players_staff' => array(
|
||||
'name' => __( 'Players', 'sportspress' ) . ' & ' . __( 'Staff', 'sportspress' ),
|
||||
'name' => esc_attr__( 'Players', 'sportspress' ) . ' & ' . esc_attr__( 'Staff', 'sportspress' ),
|
||||
'view' => array( $this, 'sp_setup_players_staff' ),
|
||||
'handler' => array( $this, 'sp_setup_players_staff_save' ),
|
||||
),
|
||||
'venue' => array(
|
||||
'name' => __( 'Venue', 'sportspress' ),
|
||||
'name' => esc_attr__( 'Venue', 'sportspress' ),
|
||||
'view' => array( $this, 'sp_setup_venue' ),
|
||||
'handler' => array( $this, 'sp_setup_venue_save' ),
|
||||
),
|
||||
'pages' => array(
|
||||
'name' => __( 'Pages', 'sportspress' ),
|
||||
'name' => esc_attr__( 'Pages', 'sportspress' ),
|
||||
'view' => array( $this, 'sp_setup_pages' ),
|
||||
'handler' => array( $this, 'sp_setup_pages_save' ),
|
||||
),
|
||||
'next_steps' => array(
|
||||
'name' => __( 'Ready!', 'sportspress' ),
|
||||
'name' => esc_attr__( 'Ready!', 'sportspress' ),
|
||||
'view' => array( $this, 'sp_setup_ready' ),
|
||||
'handler' => '',
|
||||
),
|
||||
@@ -108,8 +108,8 @@ class SP_Admin_Setup_Wizard {
|
||||
$strings = apply_filters(
|
||||
'sportspress_localized_strings',
|
||||
array(
|
||||
'none' => __( 'None', 'sportspress' ),
|
||||
'remove_text' => __( '— Remove —', 'sportspress' ),
|
||||
'none' => esc_attr__( 'None', 'sportspress' ),
|
||||
'remove_text' => esc_attr__( '— Remove —', 'sportspress' ),
|
||||
)
|
||||
);
|
||||
|
||||
@@ -148,7 +148,7 @@ class SP_Admin_Setup_Wizard {
|
||||
<?php do_action( 'admin_head' ); ?>
|
||||
</head>
|
||||
<body class="sp-setup wp-core-ui">
|
||||
<h1 id="sp-logo"><?php echo wp_kses_post( apply_filters( 'sportspress_logo', '<img src="' . plugin_dir_url( SP_PLUGIN_FILE ) . 'assets/images/modules/sportspress' . ( class_exists( 'SportsPress_Pro' ) ? '-pro' : '' ) . '.png" alt="' . __( 'SportsPress', 'sportspress' ) . '">' ) ); ?></h1>
|
||||
<h1 id="sp-logo"><?php echo wp_kses_post( apply_filters( 'sportspress_logo', '<img src="' . plugin_dir_url( SP_PLUGIN_FILE ) . 'assets/images/modules/sportspress' . ( class_exists( 'SportsPress_Pro' ) ? '-pro' : '' ) . '.png" alt="' . esc_attr__( 'SportsPress', 'sportspress' ) . '">' ) ); ?></h1>
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -520,7 +520,7 @@ class SP_Admin_Setup_Wizard {
|
||||
update_post_meta( $id, 'sp_number', $number );
|
||||
|
||||
// Add position
|
||||
wp_set_object_terms( $id, sp_array_value( $player, 'position', __( 'Position', 'sportspress' ) ), 'sp_position', false );
|
||||
wp_set_object_terms( $id, sp_array_value( $player, 'position', esc_attr__( 'Position', 'sportspress' ) ), 'sp_position', false );
|
||||
|
||||
// Add team
|
||||
if ( $team ) {
|
||||
@@ -608,7 +608,7 @@ class SP_Admin_Setup_Wizard {
|
||||
// Insert venue
|
||||
$venue = sanitize_text_field( $_POST['venue'] );
|
||||
if ( ! is_string( $venue ) || empty( $venue ) ) {
|
||||
$venue = sp_array_value( $_POST, 'address', __( 'Venue', 'sportspress' ) );
|
||||
$venue = sp_array_value( $_POST, 'address', esc_attr__( 'Venue', 'sportspress' ) );
|
||||
}
|
||||
$inserted = wp_insert_term( $venue, 'sp_venue' );
|
||||
|
||||
@@ -639,9 +639,9 @@ class SP_Admin_Setup_Wizard {
|
||||
$pages = apply_filters(
|
||||
'sportspress_setup_pages',
|
||||
array(
|
||||
'sp_calendar' => __( 'Organize and publish calendars using different layouts.', 'sportspress' ),
|
||||
'sp_table' => __( 'Create automated league tables to keep track of team standings.', 'sportspress' ),
|
||||
'sp_list' => __( 'Create team rosters, player galleries, and ranking charts.', 'sportspress' ),
|
||||
'sp_calendar' => esc_attr__( 'Organize and publish calendars using different layouts.', 'sportspress' ),
|
||||
'sp_table' => esc_attr__( 'Create automated league tables to keep track of team standings.', 'sportspress' ),
|
||||
'sp_list' => esc_attr__( 'Create team rosters, player galleries, and ranking charts.', 'sportspress' ),
|
||||
)
|
||||
);
|
||||
?>
|
||||
@@ -683,9 +683,9 @@ class SP_Admin_Setup_Wizard {
|
||||
$pages = apply_filters(
|
||||
'sportspress_setup_pages',
|
||||
array(
|
||||
'sp_calendar' => __( 'Organize and publish calendars using different layouts.', 'sportspress' ),
|
||||
'sp_table' => __( 'Create automated league tables to keep track of team standings.', 'sportspress' ),
|
||||
'sp_list' => __( 'Create team rosters, player galleries, and ranking charts.', 'sportspress' ),
|
||||
'sp_calendar' => esc_attr__( 'Organize and publish calendars using different layouts.', 'sportspress' ),
|
||||
'sp_table' => esc_attr__( 'Create automated league tables to keep track of team standings.', 'sportspress' ),
|
||||
'sp_list' => esc_attr__( 'Create team rosters, player galleries, and ranking charts.', 'sportspress' ),
|
||||
)
|
||||
);
|
||||
|
||||
@@ -815,7 +815,7 @@ class SP_Admin_Setup_Wizard {
|
||||
}
|
||||
$post['post_title'] = implode( ' ' . get_option( 'sportspress_event_teams_delimiter', 'vs' ) . ' ', $team_names );
|
||||
} else {
|
||||
$post['post_title'] = __( 'Event', 'sportspress' );
|
||||
$post['post_title'] = esc_attr__( 'Event', 'sportspress' );
|
||||
}
|
||||
|
||||
// Insert event
|
||||
@@ -857,12 +857,12 @@ class SP_Admin_Setup_Wizard {
|
||||
'sportspress_setup_wizard_next_steps',
|
||||
array(
|
||||
'first' => array(
|
||||
'label' => __( 'Next Steps', 'sportspress' ),
|
||||
'content' => '<a class="button button-primary button-large button-first-event" href="' . esc_url( admin_url( 'post.php?post=' . $id . '&action=edit' ) ) . '">' . __( 'Schedule your first event!', 'sportspress' ) . '</a>',
|
||||
'label' => esc_attr__( 'Next Steps', 'sportspress' ),
|
||||
'content' => '<a class="button button-primary button-large button-first-event" href="' . esc_url( admin_url( 'post.php?post=' . $id . '&action=edit' ) ) . '">' . esc_attr__( 'Schedule your first event!', 'sportspress' ) . '</a>',
|
||||
),
|
||||
'last' => array(
|
||||
'label' => __( 'Upgrade to Pro', 'sportspress' ),
|
||||
'content' => __( 'Get SportsPress Pro to get access to all modules. You can upgrade any time without losing any of your data.', 'sportspress' ) . ' <a href="' . apply_filters( 'sportspress_pro_url', 'http://tboy.co/pro' ) . '" target="_blank">' . __( 'Learn more', 'sportspress' ) . '</a>',
|
||||
'label' => esc_attr__( 'Upgrade to Pro', 'sportspress' ),
|
||||
'content' => esc_attr__( 'Get SportsPress Pro to get access to all modules. You can upgrade any time without losing any of your data.', 'sportspress' ) . ' <a href="' . apply_filters( 'sportspress_pro_url', 'http://tboy.co/pro' ) . '" target="_blank">' . esc_attr__( 'Learn more', 'sportspress' ) . '</a>',
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
@@ -48,7 +48,7 @@ class SP_Admin_Sports {
|
||||
}
|
||||
$id = preg_replace( '/\\.[^.\\s]{3,4}$/', '', $file );
|
||||
$presets[ $id ] = $data;
|
||||
$name = array_key_exists( 'name', $data ) ? __( $data['name'], 'sportspress' ) : $id;
|
||||
$name = array_key_exists( 'name', $data ) ? esc_attr__( $data['name'], 'sportspress' ) : $id;
|
||||
|
||||
// Conditionally append filename in parentheses for clarity
|
||||
if ( false === strpos( str_replace( ' ', '', strtolower( $data['name'] ) ), str_replace( '-', '', $id ) ) ) {
|
||||
@@ -111,7 +111,7 @@ class SP_Admin_Sports {
|
||||
$name = $position;
|
||||
$sections = array( 0, 1 );
|
||||
} else {
|
||||
$name = sp_array_value( $position, 'name', __( 'Position', 'sportspress' ) );
|
||||
$name = sp_array_value( $position, 'name', esc_attr__( 'Position', 'sportspress' ) );
|
||||
$sections = sp_array_value( $position, 'sections', array( 0, 1 ) );
|
||||
}
|
||||
$term = wp_insert_term( $name, 'sp_position' );
|
||||
@@ -321,12 +321,12 @@ class SP_Admin_Sports {
|
||||
return apply_filters(
|
||||
'sportspress_sport_categories',
|
||||
array(
|
||||
'team-sports' => __( 'Team Sports', 'sportspress' ),
|
||||
'racket-sports' => __( 'Racket Sports', 'sportspress' ),
|
||||
'water-sports' => __( 'Water Sports', 'sportspress' ),
|
||||
'target-sports' => __( 'Target Sports', 'sportspress' ),
|
||||
'esports' => __( 'Esports', 'sportspress' ),
|
||||
'other' => __( 'Other', 'sportspress' ),
|
||||
'team-sports' => esc_attr__( 'Team Sports', 'sportspress' ),
|
||||
'racket-sports' => esc_attr__( 'Racket Sports', 'sportspress' ),
|
||||
'water-sports' => esc_attr__( 'Water Sports', 'sportspress' ),
|
||||
'target-sports' => esc_attr__( 'Target Sports', 'sportspress' ),
|
||||
'esports' => esc_attr__( 'Esports', 'sportspress' ),
|
||||
'other' => esc_attr__( 'Other', 'sportspress' ),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -193,8 +193,8 @@ class SP_Admin_Taxonomies {
|
||||
$options = apply_filters(
|
||||
'sportspress_performance_sections',
|
||||
array(
|
||||
0 => __( 'Offense', 'sportspress' ),
|
||||
1 => __(
|
||||
0 => esc_attr__( 'Offense', 'sportspress' ),
|
||||
1 => esc_attr__(
|
||||
'Defense',
|
||||
'sportspress'
|
||||
),
|
||||
@@ -232,8 +232,8 @@ class SP_Admin_Taxonomies {
|
||||
$options = apply_filters(
|
||||
'sportspress_performance_sections',
|
||||
array(
|
||||
0 => __( 'Offense', 'sportspress' ),
|
||||
1 => __(
|
||||
0 => esc_attr__( 'Offense', 'sportspress' ),
|
||||
1 => esc_attr__(
|
||||
'Defense',
|
||||
'sportspress'
|
||||
),
|
||||
@@ -291,7 +291,7 @@ class SP_Admin_Taxonomies {
|
||||
$new_columns = array();
|
||||
|
||||
if ( function_exists( 'get_term_meta' ) ) {
|
||||
$new_columns['sp_order'] = __( 'Order', 'sportspress' );
|
||||
$new_columns['sp_order'] = esc_attr__( 'Order', 'sportspress' );
|
||||
}
|
||||
|
||||
if ( array_key_exists( 'posts', $columns ) ) {
|
||||
@@ -312,7 +312,7 @@ class SP_Admin_Taxonomies {
|
||||
*/
|
||||
public function venue_columns( $columns ) {
|
||||
$new_columns = array();
|
||||
$new_columns['sp_address'] = __( 'Address', 'sportspress' );
|
||||
$new_columns['sp_address'] = esc_attr__( 'Address', 'sportspress' );
|
||||
|
||||
if ( array_key_exists( 'posts', $columns ) ) {
|
||||
$new_columns['posts'] = $columns['posts'];
|
||||
@@ -334,10 +334,10 @@ class SP_Admin_Taxonomies {
|
||||
*/
|
||||
public function position_columns( $columns ) {
|
||||
$new_columns = array();
|
||||
$new_columns['sp_sections'] = __( 'Statistics', 'sportspress' );
|
||||
$new_columns['sp_sections'] = esc_attr__( 'Statistics', 'sportspress' );
|
||||
|
||||
if ( function_exists( 'get_term_meta' ) ) {
|
||||
$new_columns['sp_order'] = __( 'Order', 'sportspress' );
|
||||
$new_columns['sp_order'] = esc_attr__( 'Order', 'sportspress' );
|
||||
}
|
||||
|
||||
if ( array_key_exists( 'posts', $columns ) ) {
|
||||
@@ -375,8 +375,8 @@ class SP_Admin_Taxonomies {
|
||||
$options = apply_filters(
|
||||
'sportspress_performance_sections',
|
||||
array(
|
||||
0 => __( 'Offense', 'sportspress' ),
|
||||
1 => __(
|
||||
0 => esc_attr__( 'Offense', 'sportspress' ),
|
||||
1 => esc_attr__(
|
||||
'Defense',
|
||||
'sportspress'
|
||||
),
|
||||
|
||||
@@ -48,8 +48,8 @@ class SP_Admin_Welcome {
|
||||
return;
|
||||
}
|
||||
|
||||
$welcome_page_name = __( 'About SportsPress', 'sportspress' );
|
||||
$welcome_page_title = __( 'Welcome to SportsPress', 'sportspress' );
|
||||
$welcome_page_name = esc_attr__( 'About SportsPress', 'sportspress' );
|
||||
$welcome_page_title = esc_attr__( 'Welcome to SportsPress', 'sportspress' );
|
||||
|
||||
switch ( $_GET['page'] ) {
|
||||
case 'sp-about':
|
||||
@@ -107,18 +107,18 @@ class SP_Admin_Welcome {
|
||||
unset( $version[2] );
|
||||
$display_version = implode( '.', $version );
|
||||
?>
|
||||
<h1 class="sp-welcome-logo"><?php echo wp_kses_post( apply_filters( 'sportspress_logo', '<img src="' . plugin_dir_url( SP_PLUGIN_FILE ) . 'assets/images/welcome/sportspress' . ( class_exists( 'SportsPress_Pro' ) ? '-pro' : '' ) . '.png" alt="' . __( 'SportsPress', 'sportspress' ) . '">' ) ); ?></h1>
|
||||
<h1 class="sp-welcome-logo"><?php echo wp_kses_post( apply_filters( 'sportspress_logo', '<img src="' . plugin_dir_url( SP_PLUGIN_FILE ) . 'assets/images/welcome/sportspress' . ( class_exists( 'SportsPress_Pro' ) ? '-pro' : '' ) . '.png" alt="' . esc_attr__( 'SportsPress', 'sportspress' ) . '">' ) ); ?></h1>
|
||||
|
||||
<div class="sp-badge"><?php printf( esc_html__( 'Version %s', 'sportspress' ), esc_html( SP()->version ) ); ?></div>
|
||||
|
||||
<div class="about-text sp-about-text">
|
||||
<?php
|
||||
if ( ! empty( $_GET['sp-installed'] ) ) {
|
||||
$message = __( 'Thanks, all done!', 'sportspress' );
|
||||
$message = esc_attr__( 'Thanks, all done!', 'sportspress' );
|
||||
} elseif ( ! empty( $_GET['sp-updated'] ) ) {
|
||||
$message = __( 'Thank you for updating to the latest version!', 'sportspress' );
|
||||
$message = esc_attr__( 'Thank you for updating to the latest version!', 'sportspress' );
|
||||
} else {
|
||||
$message = __( 'Thanks for installing!', 'sportspress' );
|
||||
$message = esc_attr__( 'Thanks for installing!', 'sportspress' );
|
||||
}
|
||||
|
||||
printf( esc_html__( '%1$s SportsPress %2$s has lots of refinements we think you’ll love.', 'sportspress' ), esc_html( $message ), esc_html( $display_version ) );
|
||||
@@ -329,7 +329,7 @@ class SP_Admin_Welcome {
|
||||
<div class="wrap about-wrap about-sportspress-wrap">
|
||||
<?php $this->intro(); ?>
|
||||
|
||||
<p class="about-description"><?php printf( wp_kses_post( __( 'SportsPress is developed and maintained by a worldwide team of passionate individuals and backed by an awesome developer community. Want to see your name? <a href="%s">Contribute to SportsPress</a>.', 'sportspress' ) ), 'https://github.com/ThemeBoy/SportsPress/blob/master/CONTRIBUTING.md' ); ?></p>
|
||||
<p class="about-description"><?php printf( wp_kses_post( esc_attr__( 'SportsPress is developed and maintained by a worldwide team of passionate individuals and backed by an awesome developer community. Want to see your name? <a href="%s">Contribute to SportsPress</a>.', 'sportspress' ) ), 'https://github.com/ThemeBoy/SportsPress/blob/master/CONTRIBUTING.md' ); ?></p>
|
||||
|
||||
<div class="sp-feature feature-section col one-col">
|
||||
<?php echo wp_kses_post( $this->contributors() ); ?>
|
||||
@@ -347,7 +347,7 @@ class SP_Admin_Welcome {
|
||||
|
||||
<?php $this->intro(); ?>
|
||||
|
||||
<p class="about-description"><?php printf( wp_kses_post( __( 'SportsPress has been kindly translated into several other languages thanks to our translation team. Want to see your name? <a href="%s">Translate SportsPress</a>.', 'sportspress' ) ), 'https://translate.wordpress.org/projects/wp-plugins/sportspress' ); ?></p>
|
||||
<p class="about-description"><?php printf( wp_kses_post( esc_attr__( 'SportsPress has been kindly translated into several other languages thanks to our translation team. Want to see your name? <a href="%s">Translate SportsPress</a>.', 'sportspress' ) ), 'https://translate.wordpress.org/projects/wp-plugins/sportspress' ); ?></p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
@@ -372,7 +372,7 @@ class SP_Admin_Welcome {
|
||||
$contributor_list .= sprintf(
|
||||
'<a href="%s" title="%s">',
|
||||
esc_url( 'https://github.com/' . $contributor->login ),
|
||||
esc_html( sprintf( __( 'View %s', 'sportspress' ), $contributor->login ) )
|
||||
esc_html( sprintf( esc_attr__( 'View %s', 'sportspress' ), $contributor->login ) )
|
||||
);
|
||||
$contributor_list .= sprintf( '<img src="%s" width="64" height="64" class="gravatar" alt="%s" />', esc_url( $contributor->avatar_url ), esc_html( $contributor->login ) );
|
||||
$contributor_list .= '</a>';
|
||||
|
||||
@@ -23,15 +23,15 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->import_page = 'sp_event_csv';
|
||||
$this->import_label = __( 'Import Events', 'sportspress' );
|
||||
$this->import_label = esc_attr__( 'Import Events', 'sportspress' );
|
||||
$this->columns = array(
|
||||
'post_date' => __( 'Date', 'sportspress' ),
|
||||
'post_time' => __( 'Time', 'sportspress' ),
|
||||
'sp_venue' => __( 'Venue', 'sportspress' ),
|
||||
'sp_team' => __( 'Teams', 'sportspress' ),
|
||||
'sp_results' => __( 'Results', 'sportspress' ),
|
||||
'sp_outcome' => __( 'Outcome', 'sportspress' ),
|
||||
'sp_player' => __( 'Players', 'sportspress' ),
|
||||
'post_date' => esc_attr__( 'Date', 'sportspress' ),
|
||||
'post_time' => esc_attr__( 'Time', 'sportspress' ),
|
||||
'sp_venue' => esc_attr__( 'Venue', 'sportspress' ),
|
||||
'sp_team' => esc_attr__( 'Teams', 'sportspress' ),
|
||||
'sp_results' => esc_attr__( 'Results', 'sportspress' ),
|
||||
'sp_outcome' => esc_attr__( 'Outcome', 'sportspress' ),
|
||||
'sp_player' => esc_attr__( 'Players', 'sportspress' ),
|
||||
);
|
||||
$performance_labels = sp_get_var_labels( 'sp_performance' );
|
||||
if ( $performance_labels && is_array( $performance_labels ) && sizeof( $performance_labels ) ) {
|
||||
@@ -156,7 +156,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
'post_type' => 'sp_event',
|
||||
'post_status' => 'publish',
|
||||
'post_date' => $date,
|
||||
'post_title' => __( 'Event', 'sportspress' ),
|
||||
'post_title' => esc_attr__( 'Event', 'sportspress' ),
|
||||
);
|
||||
|
||||
// Insert event
|
||||
@@ -338,7 +338,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
$title = get_the_title( $id );
|
||||
|
||||
// Initialize event name
|
||||
if ( __( 'Event', 'sportspress' ) === $title ) {
|
||||
if ( esc_attr__( 'Event', 'sportspress' ) === $title ) {
|
||||
$title = '';
|
||||
} else {
|
||||
$title .= ' ' . get_option( 'sportspress_event_teams_delimiter', 'vs' ) . ' ';
|
||||
@@ -494,8 +494,8 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
function greet() {
|
||||
echo '<div class="narrow">';
|
||||
echo '<p>' . esc_html__( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( __( 'Events need to be defined with columns in a specific order (3+ columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/events-sample.csv' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( __( 'Supports CSV files generated by <a href="%s">LeagueLobster</a>.', 'sportspress' ) ), 'http://tboy.co/leaguelobster' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( esc_attr__( 'Events need to be defined with columns in a specific order (3+ columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/events-sample.csv' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( esc_attr__( 'Supports CSV files generated by <a href="%s">LeagueLobster</a>.', 'sportspress' ) ), 'http://tboy.co/leaguelobster' ) . '</p>';
|
||||
wp_import_upload_form( 'admin.php?import=sp_event_csv&step=1' );
|
||||
echo '</div>';
|
||||
}
|
||||
@@ -538,7 +538,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
);
|
||||
if ( ! sp_dropdown_taxonomies( $args ) ) :
|
||||
echo '<p>' . esc_html__( 'None', 'sportspress' ) . '</p>';
|
||||
sp_taxonomy_adder( 'sp_league', 'sp_team', __( 'Add New', 'sportspress' ) );
|
||||
sp_taxonomy_adder( 'sp_league', 'sp_team', esc_attr__( 'Add New', 'sportspress' ) );
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
@@ -551,11 +551,11 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
'taxonomy' => 'sp_season',
|
||||
'name' => 'sp_season',
|
||||
'values' => 'slug',
|
||||
'show_option_none' => __( '— Not set —', 'sportspress' ),
|
||||
'show_option_none' => esc_attr__( '— Not set —', 'sportspress' ),
|
||||
);
|
||||
if ( ! sp_dropdown_taxonomies( $args ) ) :
|
||||
echo '<p>' . esc_html__( 'None', 'sportspress' ) . '</p>';
|
||||
sp_taxonomy_adder( 'sp_season', 'sp_team', __( 'Add New', 'sportspress' ) );
|
||||
sp_taxonomy_adder( 'sp_season', 'sp_team', esc_attr__( 'Add New', 'sportspress' ) );
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -23,9 +23,9 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->import_page = 'sp_event_performance_csv';
|
||||
$this->import_label = __( 'Import Box Score', 'sportspress' );
|
||||
$this->import_label = esc_attr__( 'Import Box Score', 'sportspress' );
|
||||
$this->columns = array(
|
||||
'sp_player' => __( 'Player', 'sportspress' ),
|
||||
'sp_player' => esc_attr__( 'Player', 'sportspress' ),
|
||||
);
|
||||
$performance_labels = sp_get_var_labels( 'sp_performance' );
|
||||
if ( $performance_labels && is_array( $performance_labels ) && sizeof( $performance_labels ) ) {
|
||||
@@ -178,7 +178,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
)
|
||||
);
|
||||
echo '<p>' . esc_html__( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( __( 'Box scores need to be defined with columns in a specific order. <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/event-performance-sample.csv' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( esc_attr__( 'Box scores need to be defined with columns in a specific order. <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/event-performance-sample.csv' ) . '</p>';
|
||||
wp_import_upload_form( add_query_arg( $args, 'admin.php' ) );
|
||||
} else {
|
||||
echo '<p><a href="' . esc_url( admin_url( add_query_arg( array( 'post_type' => 'sp_event' ), 'edit.php' ) ) ) . '">' . sprintf( esc_html__( 'Select %s', 'sportspress' ), esc_html__( 'Event', 'sportspress' ) ) . '</a></p>';
|
||||
|
||||
@@ -23,14 +23,14 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->import_page = 'sp_fixture_csv';
|
||||
$this->import_label = __( 'Import Fixtures', 'sportspress' );
|
||||
$this->import_label = esc_attr__( 'Import Fixtures', 'sportspress' );
|
||||
$this->columns = array(
|
||||
'post_date' => __( 'Date', 'sportspress' ),
|
||||
'post_time' => __( 'Time', 'sportspress' ),
|
||||
'sp_venue' => __( 'Venue', 'sportspress' ),
|
||||
'sp_home' => __( 'Home', 'sportspress' ),
|
||||
'sp_away' => __( 'Away', 'sportspress' ),
|
||||
'sp_day' => __( 'Match Day', 'sportspress' ),
|
||||
'post_date' => esc_attr__( 'Date', 'sportspress' ),
|
||||
'post_time' => esc_attr__( 'Time', 'sportspress' ),
|
||||
'sp_venue' => esc_attr__( 'Venue', 'sportspress' ),
|
||||
'sp_home' => esc_attr__( 'Home', 'sportspress' ),
|
||||
'sp_away' => esc_attr__( 'Away', 'sportspress' ),
|
||||
'sp_day' => esc_attr__( 'Match Day', 'sportspress' ),
|
||||
);
|
||||
$this->optionals = array( 'sp_day' );
|
||||
}
|
||||
@@ -122,7 +122,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
'post_type' => 'sp_event',
|
||||
'post_status' => 'publish',
|
||||
'post_date' => $date,
|
||||
'post_title' => __( 'Event', 'sportspress' ),
|
||||
'post_title' => esc_attr__( 'Event', 'sportspress' ),
|
||||
);
|
||||
|
||||
// Insert event
|
||||
@@ -226,7 +226,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
$title = get_the_title( $id );
|
||||
|
||||
// Initialize event name
|
||||
if ( __( 'Event', 'sportspress' ) === $title ) {
|
||||
if ( esc_attr__( 'Event', 'sportspress' ) === $title ) {
|
||||
$title = '';
|
||||
} else {
|
||||
$title .= ' ' . get_option( 'sportspress_event_teams_delimiter', 'vs' ) . ' ';
|
||||
@@ -284,8 +284,8 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
function greet() {
|
||||
echo '<div class="narrow">';
|
||||
echo '<p>' . esc_html__( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( __( 'Fixtures need to be defined with columns in a specific order (4+ columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/fixtures-sample.csv' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( __( 'Supports CSV files generated by <a href="%s">LeagueLobster</a>.', 'sportspress' ) ), 'http://tboy.co/leaguelobster' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( esc_attr__( 'Fixtures need to be defined with columns in a specific order (4+ columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/fixtures-sample.csv' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( esc_attr__( 'Supports CSV files generated by <a href="%s">LeagueLobster</a>.', 'sportspress' ) ), 'http://tboy.co/leaguelobster' ) . '</p>';
|
||||
wp_import_upload_form( 'admin.php?import=sp_fixture_csv&step=1' );
|
||||
echo '</div>';
|
||||
}
|
||||
@@ -319,11 +319,11 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
'taxonomy' => 'sp_league',
|
||||
'name' => 'sp_league',
|
||||
'values' => 'slug',
|
||||
'show_option_none' => __( '— Not set —', 'sportspress' ),
|
||||
'show_option_none' => esc_attr__( '— Not set —', 'sportspress' ),
|
||||
);
|
||||
if ( ! sp_dropdown_taxonomies( $args ) ) :
|
||||
echo '<p>' . esc_html__( 'None', 'sportspress' ) . '</p>';
|
||||
sp_taxonomy_adder( 'sp_league', 'sp_team', __( 'Add New', 'sportspress' ) );
|
||||
sp_taxonomy_adder( 'sp_league', 'sp_team', esc_attr__( 'Add New', 'sportspress' ) );
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
@@ -336,11 +336,11 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
'taxonomy' => 'sp_season',
|
||||
'name' => 'sp_season',
|
||||
'values' => 'slug',
|
||||
'show_option_none' => __( '— Not set —', 'sportspress' ),
|
||||
'show_option_none' => esc_attr__( '— Not set —', 'sportspress' ),
|
||||
);
|
||||
if ( ! sp_dropdown_taxonomies( $args ) ) :
|
||||
echo '<p>' . esc_html__( 'None', 'sportspress' ) . '</p>';
|
||||
sp_taxonomy_adder( 'sp_season', 'sp_team', __( 'Add New', 'sportspress' ) );
|
||||
sp_taxonomy_adder( 'sp_season', 'sp_team', esc_attr__( 'Add New', 'sportspress' ) );
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -23,9 +23,9 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->import_page = 'sp_official_csv';
|
||||
$this->import_label = __( 'Import Officials', 'sportspress' );
|
||||
$this->import_label = esc_attr__( 'Import Officials', 'sportspress' );
|
||||
$this->columns = array(
|
||||
'post_title' => __( 'Name', 'sportspress' ),
|
||||
'post_title' => esc_attr__( 'Name', 'sportspress' ),
|
||||
);
|
||||
parent::__construct();
|
||||
}
|
||||
@@ -117,7 +117,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
function greet() {
|
||||
echo '<div class="narrow">';
|
||||
echo '<p>' . esc_html__( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( __( 'Officials need to be defined with columns in a specific order. <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/officials-sample.csv' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( esc_attr__( 'Officials need to be defined with columns in a specific order. <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/officials-sample.csv' ) . '</p>';
|
||||
wp_import_upload_form( 'admin.php?import=sp_official_csv&step=1' );
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
@@ -23,16 +23,16 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->import_page = 'sp_player_csv';
|
||||
$this->import_label = __( 'Import Players', 'sportspress' );
|
||||
$this->import_label = esc_attr__( 'Import Players', 'sportspress' );
|
||||
$this->columns = array(
|
||||
'sp_number' => __( 'Squad Number', 'sportspress' ),
|
||||
'post_title' => __( 'Name', 'sportspress' ),
|
||||
'sp_position' => __( 'Positions', 'sportspress' ),
|
||||
'sp_team' => __( 'Teams', 'sportspress' ),
|
||||
'sp_league' => __( 'Leagues', 'sportspress' ),
|
||||
'sp_season' => __( 'Seasons', 'sportspress' ),
|
||||
'sp_nationality' => __( 'Nationality', 'sportspress' ),
|
||||
'post_date' => __( 'Date of Birth', 'sportspress' ),
|
||||
'sp_number' => esc_attr__( 'Squad Number', 'sportspress' ),
|
||||
'post_title' => esc_attr__( 'Name', 'sportspress' ),
|
||||
'sp_position' => esc_attr__( 'Positions', 'sportspress' ),
|
||||
'sp_team' => esc_attr__( 'Teams', 'sportspress' ),
|
||||
'sp_league' => esc_attr__( 'Leagues', 'sportspress' ),
|
||||
'sp_season' => esc_attr__( 'Seasons', 'sportspress' ),
|
||||
'sp_nationality' => esc_attr__( 'Nationality', 'sportspress' ),
|
||||
'post_date' => esc_attr__( 'Date of Birth', 'sportspress' ),
|
||||
);
|
||||
parent::__construct();
|
||||
}
|
||||
@@ -250,7 +250,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
function greet() {
|
||||
echo '<div class="narrow">';
|
||||
echo '<p>' . esc_html__( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( __( 'Players need to be defined with columns in a specific order (8 columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/players-sample.csv' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( esc_attr__( 'Players need to be defined with columns in a specific order (8 columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/players-sample.csv' ) . '</p>';
|
||||
wp_import_upload_form( 'admin.php?import=sp_player_csv&step=1' );
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
@@ -23,14 +23,14 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->import_page = 'sp_staff_csv';
|
||||
$this->import_label = __( 'Import Staff', 'sportspress' );
|
||||
$this->import_label = esc_attr__( 'Import Staff', 'sportspress' );
|
||||
$this->columns = array(
|
||||
'post_title' => __( 'Name', 'sportspress' ),
|
||||
'sp_role' => __( 'Jobs', 'sportspress' ),
|
||||
'sp_team' => __( 'Teams', 'sportspress' ),
|
||||
'sp_league' => __( 'Leagues', 'sportspress' ),
|
||||
'sp_season' => __( 'Seasons', 'sportspress' ),
|
||||
'sp_nationality' => __( 'Nationality', 'sportspress' ),
|
||||
'post_title' => esc_attr__( 'Name', 'sportspress' ),
|
||||
'sp_role' => esc_attr__( 'Jobs', 'sportspress' ),
|
||||
'sp_team' => esc_attr__( 'Teams', 'sportspress' ),
|
||||
'sp_league' => esc_attr__( 'Leagues', 'sportspress' ),
|
||||
'sp_season' => esc_attr__( 'Seasons', 'sportspress' ),
|
||||
'sp_nationality' => esc_attr__( 'Nationality', 'sportspress' ),
|
||||
);
|
||||
parent::__construct();
|
||||
}
|
||||
@@ -198,7 +198,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
function greet() {
|
||||
echo '<div class="narrow">';
|
||||
echo '<p>' . esc_html__( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( __( 'Staff need to be defined with columns in a specific order (6 columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/staff-sample.csv' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( esc_attr__( 'Staff need to be defined with columns in a specific order (6 columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/staff-sample.csv' ) . '</p>';
|
||||
wp_import_upload_form( 'admin.php?import=sp_staff_csv&step=1' );
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
@@ -23,14 +23,14 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->import_page = 'sp_team_csv';
|
||||
$this->import_label = __( 'Import Teams', 'sportspress' );
|
||||
$this->import_label = esc_attr__( 'Import Teams', 'sportspress' );
|
||||
$this->columns = array(
|
||||
'post_title' => __( 'Name', 'sportspress' ),
|
||||
'sp_league' => __( 'Leagues', 'sportspress' ),
|
||||
'sp_season' => __( 'Seasons', 'sportspress' ),
|
||||
'sp_url' => __( 'Site URL', 'sportspress' ),
|
||||
'sp_abbreviation' => __( 'Abbreviation', 'sportspress' ),
|
||||
'sp_venue' => __( 'Home', 'sportspress' ),
|
||||
'post_title' => esc_attr__( 'Name', 'sportspress' ),
|
||||
'sp_league' => esc_attr__( 'Leagues', 'sportspress' ),
|
||||
'sp_season' => esc_attr__( 'Seasons', 'sportspress' ),
|
||||
'sp_url' => esc_attr__( 'Site URL', 'sportspress' ),
|
||||
'sp_abbreviation' => esc_attr__( 'Abbreviation', 'sportspress' ),
|
||||
'sp_venue' => esc_attr__( 'Home', 'sportspress' ),
|
||||
);
|
||||
parent::__construct();
|
||||
}
|
||||
@@ -144,7 +144,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
function greet() {
|
||||
echo '<div class="narrow">';
|
||||
echo '<p>' . esc_html__( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( __( 'Teams need to be defined with columns in a specific order (3 columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/teams-sample.csv' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( esc_attr__( 'Teams need to be defined with columns in a specific order (3 columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/teams-sample.csv' ) . '</p>';
|
||||
wp_import_upload_form( 'admin.php?import=sp_team_csv&step=1' );
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
@@ -49,13 +49,13 @@ if ( ! class_exists( 'SP_Admin_CPT_Calendar' ) ) :
|
||||
$columns = array_merge(
|
||||
array(
|
||||
'cb' => '<input type="checkbox" />',
|
||||
'title' => __( 'Title', 'sportspress' ),
|
||||
'sp_league' => __( 'League', 'sportspress' ),
|
||||
'sp_season' => __( 'Season', 'sportspress' ),
|
||||
'sp_venue' => __( 'Venue', 'sportspress' ),
|
||||
'sp_team' => __( 'Team', 'sportspress' ),
|
||||
'sp_events' => __( 'Events', 'sportspress' ),
|
||||
'sp_layout' => __( 'Layout', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Title', 'sportspress' ),
|
||||
'sp_league' => esc_attr__( 'League', 'sportspress' ),
|
||||
'sp_season' => esc_attr__( 'Season', 'sportspress' ),
|
||||
'sp_venue' => esc_attr__( 'Venue', 'sportspress' ),
|
||||
'sp_team' => esc_attr__( 'Team', 'sportspress' ),
|
||||
'sp_events' => esc_attr__( 'Events', 'sportspress' ),
|
||||
'sp_layout' => esc_attr__( 'Layout', 'sportspress' ),
|
||||
),
|
||||
$existing_columns
|
||||
);
|
||||
@@ -122,7 +122,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Calendar' ) ) :
|
||||
|
||||
$selected = isset( $_REQUEST['sp_league'] ) ? sanitize_key( $_REQUEST['sp_league'] ) : null;
|
||||
$args = array(
|
||||
'show_option_all' => __( 'Show all leagues', 'sportspress' ),
|
||||
'show_option_all' => esc_attr__( 'Show all leagues', 'sportspress' ),
|
||||
'taxonomy' => 'sp_league',
|
||||
'name' => 'sp_league',
|
||||
'selected' => $selected,
|
||||
@@ -131,7 +131,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Calendar' ) ) :
|
||||
|
||||
$selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null;
|
||||
$args = array(
|
||||
'show_option_all' => __( 'Show all seasons', 'sportspress' ),
|
||||
'show_option_all' => esc_attr__( 'Show all seasons', 'sportspress' ),
|
||||
'taxonomy' => 'sp_season',
|
||||
'name' => 'sp_season',
|
||||
'selected' => $selected,
|
||||
@@ -142,11 +142,11 @@ if ( ! class_exists( 'SP_Admin_CPT_Calendar' ) ) :
|
||||
$args = array(
|
||||
'post_type' => 'sp_team',
|
||||
'name' => 'team',
|
||||
'show_option_none' => __( 'Show all teams', 'sportspress' ),
|
||||
'show_option_none' => esc_attr__( 'Show all teams', 'sportspress' ),
|
||||
'selected' => $selected,
|
||||
'values' => 'ID',
|
||||
);
|
||||
esc_html ( wp_dropdown_pages( $args ) );
|
||||
wp_dropdown_pages( $args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -43,12 +43,12 @@ if ( ! class_exists( 'SP_Admin_CPT_Column' ) ) :
|
||||
public function edit_columns( $existing_columns ) {
|
||||
$columns = array(
|
||||
'cb' => '<input type="checkbox" />',
|
||||
'title' => __( 'Label', 'sportspress' ),
|
||||
'sp_key' => __( 'Key', 'sportspress' ),
|
||||
'sp_equation' => __( 'Equation', 'sportspress' ),
|
||||
'sp_precision' => __( 'Decimal Places', 'sportspress' ),
|
||||
'sp_order' => __( 'Sort Order', 'sportspress' ),
|
||||
'sp_description' => __( 'Description', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Label', 'sportspress' ),
|
||||
'sp_key' => esc_attr__( 'Key', 'sportspress' ),
|
||||
'sp_equation' => esc_attr__( 'Equation', 'sportspress' ),
|
||||
'sp_precision' => esc_attr__( 'Decimal Places', 'sportspress' ),
|
||||
'sp_order' => esc_attr__( 'Sort Order', 'sportspress' ),
|
||||
'sp_description' => esc_attr__( 'Description', 'sportspress' ),
|
||||
);
|
||||
return apply_filters( 'sportspress_column_admin_columns', $columns );
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Event' ) ) :
|
||||
*/
|
||||
public function enter_title_here( $text, $post ) {
|
||||
if ( $post->post_type == 'sp_event' ) {
|
||||
return __( '(Auto)', 'sportspress' );
|
||||
return esc_attr__( '(Auto)', 'sportspress' );
|
||||
}
|
||||
|
||||
return $text;
|
||||
@@ -134,19 +134,19 @@ if ( ! class_exists( 'SP_Admin_CPT_Event' ) ) :
|
||||
$columns = array_merge(
|
||||
array(
|
||||
'cb' => '<input type="checkbox" />',
|
||||
'sp_format' => '<span class="dashicons sp-icon-calendar sp-tip" title="' . __( 'Format', 'sportspress' ) . '"></span>',
|
||||
'sp_format' => '<span class="dashicons sp-icon-calendar sp-tip" title="' . esc_attr__( 'Format', 'sportspress' ) . '"></span>',
|
||||
'title' => null,
|
||||
'date' => __( 'Date', 'sportspress' ),
|
||||
'sp_time' => __( 'Time', 'sportspress' ),
|
||||
'sp_team' => __( 'Teams', 'sportspress' ),
|
||||
'sp_league' => __( 'League', 'sportspress' ),
|
||||
'sp_season' => __( 'Season', 'sportspress' ),
|
||||
'sp_venue' => __( 'Venue', 'sportspress' ),
|
||||
'sp_day' => __( 'Match Day', 'sportspress' ),
|
||||
'date' => esc_attr__( 'Date', 'sportspress' ),
|
||||
'sp_time' => esc_attr__( 'Time', 'sportspress' ),
|
||||
'sp_team' => esc_attr__( 'Teams', 'sportspress' ),
|
||||
'sp_league' => esc_attr__( 'League', 'sportspress' ),
|
||||
'sp_season' => esc_attr__( 'Season', 'sportspress' ),
|
||||
'sp_venue' => esc_attr__( 'Venue', 'sportspress' ),
|
||||
'sp_day' => esc_attr__( 'Match Day', 'sportspress' ),
|
||||
),
|
||||
$existing_columns,
|
||||
array(
|
||||
'title' => __( 'Event', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Event', 'sportspress' ),
|
||||
)
|
||||
);
|
||||
return apply_filters( 'sportspress_event_admin_columns', $columns );
|
||||
@@ -236,7 +236,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Event' ) ) :
|
||||
$team_results = implode( ' | ', $team_results );
|
||||
endif;
|
||||
|
||||
echo '<a class="sp-result sp-tip" tabindex="10" title="' . esc_attr( $team_results ) . '" data-team="' . esc_attr( $team_id ) . '" href="#">' . ( $team_result == '' ? '-' : wp_kses_post( apply_filters( 'sportspress_event_team_result_admin', $team_result, $post_id, $team_id ) ) ) . '</a>';
|
||||
echo '<a class="sp-result sp-tip" tabindex="10" title="' . esc_attr( $team_results ) . '" data-team="' . esc_attr( $team_id ) . '" href="#">' . ( esc_attr( $team_result ) == '' ? '-' : wp_kses_post( apply_filters( 'sportspress_event_team_result_admin', $team_result, $post_id, $team_id ) ) ) . '</a>';
|
||||
echo '<input type="text" tabindex="10" class="sp-edit-result hidden small-text" data-team="' . esc_attr( $team_id ) . '" data-key="' . esc_attr( $main_result ) . '" value="' . esc_attr( $team_result ) . '"> ';
|
||||
echo esc_html( $team->post_title );
|
||||
echo '<br>';
|
||||
@@ -266,7 +266,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Event' ) ) :
|
||||
case 'sp_day':
|
||||
$day = get_post_meta( $post_id, 'sp_day', true );
|
||||
if ( '' === $day ) {
|
||||
$day = __( 'Default', 'sportspress' );
|
||||
$day = esc_attr__( 'Default', 'sportspress' );
|
||||
}
|
||||
echo esc_html( $day );
|
||||
break;
|
||||
@@ -287,15 +287,15 @@ if ( ! class_exists( 'SP_Admin_CPT_Event' ) ) :
|
||||
$args = array(
|
||||
'post_type' => 'sp_team',
|
||||
'name' => 'team',
|
||||
'show_option_none' => __( 'Show all teams', 'sportspress' ),
|
||||
'show_option_none' => esc_attr__( 'Show all teams', 'sportspress' ),
|
||||
'selected' => $selected,
|
||||
'values' => 'ID',
|
||||
);
|
||||
esc_html( wp_dropdown_pages( $args ) );
|
||||
wp_dropdown_pages( $args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
|
||||
$selected = isset( $_REQUEST['sp_league'] ) ? sanitize_key( $_REQUEST['sp_league'] ) : null;
|
||||
$args = array(
|
||||
'show_option_all' => __( 'Show all leagues', 'sportspress' ),
|
||||
'show_option_all' => esc_attr__( 'Show all leagues', 'sportspress' ),
|
||||
'taxonomy' => 'sp_league',
|
||||
'name' => 'sp_league',
|
||||
'selected' => $selected,
|
||||
@@ -304,7 +304,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Event' ) ) :
|
||||
|
||||
$selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null;
|
||||
$args = array(
|
||||
'show_option_all' => __( 'Show all seasons', 'sportspress' ),
|
||||
'show_option_all' => esc_attr__( 'Show all seasons', 'sportspress' ),
|
||||
'taxonomy' => 'sp_season',
|
||||
'name' => 'sp_season',
|
||||
'selected' => $selected,
|
||||
@@ -359,11 +359,11 @@ if ( ! class_exists( 'SP_Admin_CPT_Event' ) ) :
|
||||
$status = get_post_meta( $post->ID, 'sp_status', true );
|
||||
|
||||
if ( 'postponed' == $status ) {
|
||||
$post_states = array( __( 'Postponed', 'sportspress' ) );
|
||||
$post_states = array( esc_attr__( 'Postponed', 'sportspress' ) );
|
||||
} elseif ( 'cancelled' == $status ) {
|
||||
$post_states = array( __( 'Canceled', 'sportspress' ) );
|
||||
$post_states = array( esc_attr__( 'Canceled', 'sportspress' ) );
|
||||
} elseif ( 'tbd' == $status ) {
|
||||
$post_states = array( __( 'TBD', 'sportspress' ) );
|
||||
$post_states = array( esc_attr__( 'TBD', 'sportspress' ) );
|
||||
}
|
||||
|
||||
return $post_states;
|
||||
|
||||
@@ -49,12 +49,12 @@ if ( ! class_exists( 'SP_Admin_CPT_List' ) ) :
|
||||
$columns = array_merge(
|
||||
array(
|
||||
'cb' => '<input type="checkbox" />',
|
||||
'title' => __( 'Title', 'sportspress' ),
|
||||
'sp_league' => __( 'League', 'sportspress' ),
|
||||
'sp_season' => __( 'Season', 'sportspress' ),
|
||||
'sp_team' => __( 'Team', 'sportspress' ),
|
||||
'sp_player' => __( 'Players', 'sportspress' ),
|
||||
'sp_layout' => __( 'Layout', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Title', 'sportspress' ),
|
||||
'sp_league' => esc_attr__( 'League', 'sportspress' ),
|
||||
'sp_season' => esc_attr__( 'Season', 'sportspress' ),
|
||||
'sp_team' => esc_attr__( 'Team', 'sportspress' ),
|
||||
'sp_player' => esc_attr__( 'Players', 'sportspress' ),
|
||||
'sp_layout' => esc_attr__( 'Layout', 'sportspress' ),
|
||||
),
|
||||
$existing_columns
|
||||
);
|
||||
@@ -118,7 +118,7 @@ if ( ! class_exists( 'SP_Admin_CPT_List' ) ) :
|
||||
|
||||
$selected = isset( $_REQUEST['sp_league'] ) ? sanitize_key( $_REQUEST['sp_league'] ) : null;
|
||||
$args = array(
|
||||
'show_option_all' => __( 'Show all leagues', 'sportspress' ),
|
||||
'show_option_all' => esc_attr__( 'Show all leagues', 'sportspress' ),
|
||||
'taxonomy' => 'sp_league',
|
||||
'name' => 'sp_league',
|
||||
'selected' => $selected,
|
||||
@@ -127,7 +127,7 @@ if ( ! class_exists( 'SP_Admin_CPT_List' ) ) :
|
||||
|
||||
$selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null;
|
||||
$args = array(
|
||||
'show_option_all' => __( 'Show all seasons', 'sportspress' ),
|
||||
'show_option_all' => esc_attr__( 'Show all seasons', 'sportspress' ),
|
||||
'taxonomy' => 'sp_season',
|
||||
'name' => 'sp_season',
|
||||
'selected' => $selected,
|
||||
@@ -138,11 +138,11 @@ if ( ! class_exists( 'SP_Admin_CPT_List' ) ) :
|
||||
$args = array(
|
||||
'post_type' => 'sp_team',
|
||||
'name' => 'team',
|
||||
'show_option_none' => __( 'Show all teams', 'sportspress' ),
|
||||
'show_option_none' => esc_attr__( 'Show all teams', 'sportspress' ),
|
||||
'selected' => $selected,
|
||||
'values' => 'ID',
|
||||
);
|
||||
esc_html( wp_dropdown_pages( $args ) );
|
||||
wp_dropdown_pages( $args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -43,9 +43,9 @@ if ( ! class_exists( 'SP_Admin_CPT_Metric' ) ) :
|
||||
public function edit_columns( $existing_columns ) {
|
||||
$columns = array(
|
||||
'cb' => '<input type="checkbox" />',
|
||||
'title' => __( 'Label', 'sportspress' ),
|
||||
'sp_key' => __( 'Variable', 'sportspress' ),
|
||||
'sp_description' => __( 'Description', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Label', 'sportspress' ),
|
||||
'sp_key' => esc_attr__( 'Variable', 'sportspress' ),
|
||||
'sp_description' => esc_attr__( 'Description', 'sportspress' ),
|
||||
);
|
||||
return apply_filters( 'sportspress_metric_admin_columns', $columns );
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Official' ) ) :
|
||||
*/
|
||||
public function enter_title_here( $text, $post ) {
|
||||
if ( $post->post_type == 'sp_official' ) {
|
||||
return __( 'Name', 'sportspress' );
|
||||
return esc_attr__( 'Name', 'sportspress' );
|
||||
}
|
||||
|
||||
return $text;
|
||||
|
||||
@@ -43,10 +43,10 @@ if ( ! class_exists( 'SP_Admin_CPT_Outcome' ) ) :
|
||||
public function edit_columns( $existing_columns ) {
|
||||
$columns = array(
|
||||
'cb' => '<input type="checkbox" />',
|
||||
'title' => __( 'Label', 'sportspress' ),
|
||||
'sp_key' => __( 'Variable', 'sportspress' ),
|
||||
'sp_abbreviation' => __( 'Abbreviation', 'sportspress' ),
|
||||
'sp_description' => __( 'Description', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Label', 'sportspress' ),
|
||||
'sp_key' => esc_attr__( 'Variable', 'sportspress' ),
|
||||
'sp_abbreviation' => esc_attr__( 'Abbreviation', 'sportspress' ),
|
||||
'sp_description' => esc_attr__( 'Description', 'sportspress' ),
|
||||
);
|
||||
return apply_filters( 'sportspress_outcome_admin_columns', $columns );
|
||||
}
|
||||
|
||||
@@ -43,12 +43,12 @@ if ( ! class_exists( 'SP_Admin_CPT_Performance' ) ) :
|
||||
public function edit_columns( $existing_columns ) {
|
||||
$columns = array(
|
||||
'cb' => '<input type="checkbox" />',
|
||||
'sp_icon' => __( 'Icon', 'sportspress' ),
|
||||
'title' => __( 'Label', 'sportspress' ),
|
||||
'sp_key' => __( 'Variable', 'sportspress' ),
|
||||
'sp_section' => __( 'Category', 'sportspress' ),
|
||||
'sp_config_format' => __( 'Format', 'sportspress' ),
|
||||
'sp_description' => __( 'Description', 'sportspress' ),
|
||||
'sp_icon' => esc_attr__( 'Icon', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Label', 'sportspress' ),
|
||||
'sp_key' => esc_attr__( 'Variable', 'sportspress' ),
|
||||
'sp_section' => esc_attr__( 'Category', 'sportspress' ),
|
||||
'sp_config_format' => esc_attr__( 'Format', 'sportspress' ),
|
||||
'sp_description' => esc_attr__( 'Description', 'sportspress' ),
|
||||
);
|
||||
return apply_filters( 'sportspress_performance_admin_columns', $columns );
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Player' ) ) :
|
||||
*/
|
||||
public function enter_title_here( $text, $post ) {
|
||||
if ( $post->post_type == 'sp_player' ) {
|
||||
return __( 'Name', 'sportspress' );
|
||||
return esc_attr__( 'Name', 'sportspress' );
|
||||
}
|
||||
|
||||
return $text;
|
||||
@@ -76,16 +76,16 @@ if ( ! class_exists( 'SP_Admin_CPT_Player' ) ) :
|
||||
$columns = array_merge(
|
||||
array(
|
||||
'cb' => '<input type="checkbox" />',
|
||||
'sp_number' => '<span class="dashicons sp-icon-tshirt sp-tip" title="' . __( 'Squad Number', 'sportspress' ) . '"></span>',
|
||||
'sp_number' => '<span class="dashicons sp-icon-tshirt sp-tip" title="' . esc_attr__( 'Squad Number', 'sportspress' ) . '"></span>',
|
||||
'title' => null,
|
||||
'sp_position' => __( 'Positions', 'sportspress' ),
|
||||
'sp_team' => __( 'Teams', 'sportspress' ),
|
||||
'sp_league' => __( 'Leagues', 'sportspress' ),
|
||||
'sp_season' => __( 'Seasons', 'sportspress' ),
|
||||
'sp_position' => esc_attr__( 'Positions', 'sportspress' ),
|
||||
'sp_team' => esc_attr__( 'Teams', 'sportspress' ),
|
||||
'sp_league' => esc_attr__( 'Leagues', 'sportspress' ),
|
||||
'sp_season' => esc_attr__( 'Seasons', 'sportspress' ),
|
||||
),
|
||||
$existing_columns,
|
||||
array(
|
||||
'title' => __( 'Name', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Name', 'sportspress' ),
|
||||
)
|
||||
);
|
||||
return apply_filters( 'sportspress_player_admin_columns', $columns );
|
||||
@@ -156,7 +156,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Player' ) ) :
|
||||
if ( taxonomy_exists( 'sp_position' ) ) :
|
||||
$selected = isset( $_REQUEST['sp_position'] ) ? sanitize_key( $_REQUEST['sp_position'] ) : null;
|
||||
$args = array(
|
||||
'show_option_all' => __( 'Show all positions', 'sportspress' ),
|
||||
'show_option_all' => esc_attr__( 'Show all positions', 'sportspress' ),
|
||||
'taxonomy' => 'sp_position',
|
||||
'name' => 'sp_position',
|
||||
'selected' => $selected,
|
||||
@@ -168,16 +168,16 @@ if ( ! class_exists( 'SP_Admin_CPT_Player' ) ) :
|
||||
$args = array(
|
||||
'post_type' => 'sp_team',
|
||||
'name' => 'team',
|
||||
'show_option_none' => __( 'Show all teams', 'sportspress' ),
|
||||
'show_option_none' => esc_attr__( 'Show all teams', 'sportspress' ),
|
||||
'selected' => $selected,
|
||||
'values' => 'ID',
|
||||
);
|
||||
esc_html( wp_dropdown_pages( $args ) );
|
||||
wp_dropdown_pages( $args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
|
||||
if ( taxonomy_exists( 'sp_league' ) ) :
|
||||
$selected = isset( $_REQUEST['sp_league'] ) ? sanitize_key( $_REQUEST['sp_league'] ) : null;
|
||||
$args = array(
|
||||
'show_option_all' => __( 'Show all leagues', 'sportspress' ),
|
||||
'show_option_all' => esc_attr__( 'Show all leagues', 'sportspress' ),
|
||||
'taxonomy' => 'sp_league',
|
||||
'name' => 'sp_league',
|
||||
'selected' => $selected,
|
||||
@@ -188,7 +188,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Player' ) ) :
|
||||
if ( taxonomy_exists( 'sp_season' ) ) :
|
||||
$selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null;
|
||||
$args = array(
|
||||
'show_option_all' => __( 'Show all seasons', 'sportspress' ),
|
||||
'show_option_all' => esc_attr__( 'Show all seasons', 'sportspress' ),
|
||||
'taxonomy' => 'sp_season',
|
||||
'name' => 'sp_season',
|
||||
'selected' => $selected,
|
||||
|
||||
@@ -43,9 +43,9 @@ if ( ! class_exists( 'SP_Admin_CPT_Result' ) ) :
|
||||
public function edit_columns( $existing_columns ) {
|
||||
$columns = array(
|
||||
'cb' => '<input type="checkbox" />',
|
||||
'title' => __( 'Label', 'sportspress' ),
|
||||
'sp_key' => __( 'Variable', 'sportspress' ),
|
||||
'sp_description' => __( 'Description', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Label', 'sportspress' ),
|
||||
'sp_key' => esc_attr__( 'Variable', 'sportspress' ),
|
||||
'sp_description' => esc_attr__( 'Description', 'sportspress' ),
|
||||
);
|
||||
return apply_filters( 'sportspress_result_admin_columns', $columns );
|
||||
}
|
||||
|
||||
@@ -43,9 +43,9 @@ if ( ! class_exists( 'SP_Admin_CPT_Spec' ) ) :
|
||||
public function edit_columns( $existing_columns ) {
|
||||
$columns = array(
|
||||
'cb' => '<input type="checkbox" />',
|
||||
'title' => __( 'Label', 'sportspress' ),
|
||||
'sp_key' => __( 'Variable', 'sportspress' ),
|
||||
'sp_description' => __( 'Description', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Label', 'sportspress' ),
|
||||
'sp_key' => esc_attr__( 'Variable', 'sportspress' ),
|
||||
'sp_description' => esc_attr__( 'Description', 'sportspress' ),
|
||||
);
|
||||
return apply_filters( 'sportspress_spec_admin_columns', $columns );
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Staff' ) ) :
|
||||
*/
|
||||
public function enter_title_here( $text, $post ) {
|
||||
if ( $post->post_type == 'sp_staff' ) {
|
||||
return __( 'Name', 'sportspress' );
|
||||
return esc_attr__( 'Name', 'sportspress' );
|
||||
}
|
||||
|
||||
return $text;
|
||||
@@ -68,14 +68,14 @@ if ( ! class_exists( 'SP_Admin_CPT_Staff' ) ) :
|
||||
array(
|
||||
'cb' => '<input type="checkbox" />',
|
||||
'title' => null,
|
||||
'sp_role' => __( 'Job', 'sportspress' ),
|
||||
'sp_team' => __( 'Teams', 'sportspress' ),
|
||||
'sp_league' => __( 'Leagues', 'sportspress' ),
|
||||
'sp_season' => __( 'Seasons', 'sportspress' ),
|
||||
'sp_role' => esc_attr__( 'Job', 'sportspress' ),
|
||||
'sp_team' => esc_attr__( 'Teams', 'sportspress' ),
|
||||
'sp_league' => esc_attr__( 'Leagues', 'sportspress' ),
|
||||
'sp_season' => esc_attr__( 'Seasons', 'sportspress' ),
|
||||
),
|
||||
$existing_columns,
|
||||
array(
|
||||
'title' => __( 'Name', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Name', 'sportspress' ),
|
||||
)
|
||||
);
|
||||
return apply_filters( 'sportspress_staff_admin_columns', $columns );
|
||||
@@ -89,7 +89,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Staff' ) ) :
|
||||
public function custom_columns( $column, $post_id ) {
|
||||
switch ( $column ) :
|
||||
case 'sp_role':
|
||||
echo get_the_terms( $post_id, 'sp_role' ) ? the_terms( $post_id, 'sp_role' ) : '—';
|
||||
echo get_the_terms( $post_id, 'sp_role' ) ? wp_kses_post( the_terms( $post_id, 'sp_role' ) ) : '—';
|
||||
break;
|
||||
case 'sp_team':
|
||||
$teams = (array) get_post_meta( $post_id, 'sp_team', false );
|
||||
@@ -106,7 +106,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Staff' ) ) :
|
||||
if ( $team ) :
|
||||
echo esc_html( $team->post_title );
|
||||
if ( in_array( $team_id, $current_teams ) ) :
|
||||
echo '<span class="dashicons dashicons-yes" title="' . __( 'Current Team', 'sportspress' ) . '"></span>';
|
||||
echo '<span class="dashicons dashicons-yes" title="' . esc_attr__( 'Current Team', 'sportspress' ) . '"></span>';
|
||||
endif;
|
||||
echo '<br>';
|
||||
endif;
|
||||
@@ -114,10 +114,10 @@ if ( ! class_exists( 'SP_Admin_CPT_Staff' ) ) :
|
||||
endif;
|
||||
break;
|
||||
case 'sp_league':
|
||||
echo get_the_terms( $post_id, 'sp_league' ) ? the_terms( $post_id, 'sp_league' ) : '—';
|
||||
echo get_the_terms( $post_id, 'sp_league' ) ? wp_kses_post( the_terms( $post_id, 'sp_league' ) ) : '—';
|
||||
break;
|
||||
case 'sp_season':
|
||||
echo get_the_terms( $post_id, 'sp_season' ) ? the_terms( $post_id, 'sp_season' ) : '—';
|
||||
echo get_the_terms( $post_id, 'sp_season' ) ? wp_kses_post( the_terms( $post_id, 'sp_season' ) ) : '—';
|
||||
break;
|
||||
endswitch;
|
||||
}
|
||||
@@ -136,15 +136,15 @@ if ( ! class_exists( 'SP_Admin_CPT_Staff' ) ) :
|
||||
$args = array(
|
||||
'post_type' => 'sp_team',
|
||||
'name' => 'team',
|
||||
'show_option_none' => __( 'Show all teams', 'sportspress' ),
|
||||
'show_option_none' => esc_attr__( 'Show all teams', 'sportspress' ),
|
||||
'selected' => $selected,
|
||||
'values' => 'ID',
|
||||
);
|
||||
wp_dropdown_pages( $args );
|
||||
wp_dropdown_pages( $args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
|
||||
$selected = isset( $_REQUEST['sp_league'] ) ? sanitize_key( $_REQUEST['sp_league'] ) : null;
|
||||
$args = array(
|
||||
'show_option_all' => __( 'Show all leagues', 'sportspress' ),
|
||||
'show_option_all' => esc_attr__( 'Show all leagues', 'sportspress' ),
|
||||
'taxonomy' => 'sp_league',
|
||||
'name' => 'sp_league',
|
||||
'selected' => $selected,
|
||||
@@ -153,7 +153,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Staff' ) ) :
|
||||
|
||||
$selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null;
|
||||
$args = array(
|
||||
'show_option_all' => __( 'Show all seasons', 'sportspress' ),
|
||||
'show_option_all' => esc_attr__( 'Show all seasons', 'sportspress' ),
|
||||
'taxonomy' => 'sp_season',
|
||||
'name' => 'sp_season',
|
||||
'selected' => $selected,
|
||||
|
||||
@@ -43,12 +43,12 @@ if ( ! class_exists( 'SP_Admin_CPT_Statistic' ) ) :
|
||||
public function edit_columns( $existing_columns ) {
|
||||
$columns = array(
|
||||
'cb' => '<input type="checkbox" />',
|
||||
'sp_icon' => __( 'Icon', 'sportspress' ),
|
||||
'title' => __( 'Label', 'sportspress' ),
|
||||
'sp_key' => __( 'Key', 'sportspress' ),
|
||||
'sp_equation' => __( 'Equation', 'sportspress' ),
|
||||
'sp_precision' => __( 'Decimal Places', 'sportspress' ),
|
||||
'sp_description' => __( 'Description', 'sportspress' ),
|
||||
'sp_icon' => esc_attr__( 'Icon', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Label', 'sportspress' ),
|
||||
'sp_key' => esc_attr__( 'Key', 'sportspress' ),
|
||||
'sp_equation' => esc_attr__( 'Equation', 'sportspress' ),
|
||||
'sp_precision' => esc_attr__( 'Decimal Places', 'sportspress' ),
|
||||
'sp_description' => esc_attr__( 'Description', 'sportspress' ),
|
||||
);
|
||||
return apply_filters( 'sportspress_statistic_admin_columns', $columns );
|
||||
}
|
||||
|
||||
@@ -49,10 +49,10 @@ if ( ! class_exists( 'SP_Admin_CPT_Table' ) ) :
|
||||
$columns = array_merge(
|
||||
array(
|
||||
'cb' => '<input type="checkbox" />',
|
||||
'title' => __( 'Title', 'sportspress' ),
|
||||
'sp_league' => __( 'League', 'sportspress' ),
|
||||
'sp_season' => __( 'Season', 'sportspress' ),
|
||||
'sp_team' => __( 'Teams', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Title', 'sportspress' ),
|
||||
'sp_league' => esc_attr__( 'League', 'sportspress' ),
|
||||
'sp_season' => esc_attr__( 'Season', 'sportspress' ),
|
||||
'sp_team' => esc_attr__( 'Teams', 'sportspress' ),
|
||||
),
|
||||
$existing_columns
|
||||
);
|
||||
@@ -96,7 +96,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Table' ) ) :
|
||||
|
||||
$selected = isset( $_REQUEST['sp_league'] ) ? sanitize_key( $_REQUEST['sp_league'] ) : null;
|
||||
$args = array(
|
||||
'show_option_all' => __( 'Show all leagues', 'sportspress' ),
|
||||
'show_option_all' => esc_attr__( 'Show all leagues', 'sportspress' ),
|
||||
'taxonomy' => 'sp_league',
|
||||
'name' => 'sp_league',
|
||||
'selected' => $selected,
|
||||
@@ -105,7 +105,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Table' ) ) :
|
||||
|
||||
$selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null;
|
||||
$args = array(
|
||||
'show_option_all' => __( 'Show all seasons', 'sportspress' ),
|
||||
'show_option_all' => esc_attr__( 'Show all seasons', 'sportspress' ),
|
||||
'taxonomy' => 'sp_season',
|
||||
'name' => 'sp_season',
|
||||
'selected' => $selected,
|
||||
@@ -116,11 +116,11 @@ if ( ! class_exists( 'SP_Admin_CPT_Table' ) ) :
|
||||
$args = array(
|
||||
'post_type' => 'sp_team',
|
||||
'name' => 'team',
|
||||
'show_option_none' => __( 'Show all teams', 'sportspress' ),
|
||||
'show_option_none' => esc_attr__( 'Show all teams', 'sportspress' ),
|
||||
'selected' => $selected,
|
||||
'values' => 'ID',
|
||||
);
|
||||
esc_html( wp_dropdown_pages( $args ) );
|
||||
wp_dropdown_pages( $args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -52,7 +52,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Team' ) ) :
|
||||
*/
|
||||
public function enter_title_here( $text, $post ) {
|
||||
if ( $post->post_type == 'sp_team' ) {
|
||||
return __( 'Name', 'sportspress' );
|
||||
return esc_attr__( 'Name', 'sportspress' );
|
||||
}
|
||||
|
||||
return $text;
|
||||
@@ -66,16 +66,16 @@ if ( ! class_exists( 'SP_Admin_CPT_Team' ) ) :
|
||||
$columns = array_merge(
|
||||
array(
|
||||
'cb' => '<input type="checkbox" />',
|
||||
'sp_icon' => '<span class="dashicons sp-icon-shield sp-tip" title="' . __( 'Logo', 'sportspress' ) . '"></span>',
|
||||
'sp_icon' => '<span class="dashicons sp-icon-shield sp-tip" title="' . esc_attr__( 'Logo', 'sportspress' ) . '"></span>',
|
||||
'title' => null,
|
||||
'sp_short_name' => __( 'Short Name', 'sportspress' ),
|
||||
'sp_abbreviation' => __( 'Abbreviation', 'sportspress' ),
|
||||
'sp_league' => __( 'Leagues', 'sportspress' ),
|
||||
'sp_season' => __( 'Seasons', 'sportspress' ),
|
||||
'sp_short_name' => esc_attr__( 'Short Name', 'sportspress' ),
|
||||
'sp_abbreviation' => esc_attr__( 'Abbreviation', 'sportspress' ),
|
||||
'sp_league' => esc_attr__( 'Leagues', 'sportspress' ),
|
||||
'sp_season' => esc_attr__( 'Seasons', 'sportspress' ),
|
||||
),
|
||||
$existing_columns,
|
||||
array(
|
||||
'title' => __( 'Team', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Team', 'sportspress' ),
|
||||
)
|
||||
);
|
||||
return apply_filters( 'sportspress_team_admin_columns', $columns );
|
||||
@@ -120,7 +120,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Team' ) ) :
|
||||
|
||||
$selected = isset( $_REQUEST['sp_league'] ) ? sanitize_key( $_REQUEST['sp_league'] ) : null;
|
||||
$args = array(
|
||||
'show_option_all' => __( 'Show all leagues', 'sportspress' ),
|
||||
'show_option_all' => esc_attr__( 'Show all leagues', 'sportspress' ),
|
||||
'taxonomy' => 'sp_league',
|
||||
'name' => 'sp_league',
|
||||
'selected' => $selected,
|
||||
@@ -129,7 +129,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Team' ) ) :
|
||||
|
||||
$selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null;
|
||||
$args = array(
|
||||
'show_option_all' => __( 'Show all seasons', 'sportspress' ),
|
||||
'show_option_all' => esc_attr__( 'Show all seasons', 'sportspress' ),
|
||||
'taxonomy' => 'sp_season',
|
||||
'name' => 'sp_season',
|
||||
'selected' => $selected,
|
||||
|
||||
@@ -42,8 +42,8 @@ if ( ! class_exists( 'SP_Admin_CPT' ) ) :
|
||||
if ( $post_type == $this->type ) {
|
||||
$obj = get_post_type_object( $this->type );
|
||||
|
||||
$strings['insertIntoPost'] = sprintf( __( 'Insert into %s', 'sportspress' ), $obj->labels->singular_name );
|
||||
$strings['uploadedToThisPost'] = sprintf( __( 'Uploaded to this %s', 'sportspress' ), $obj->labels->singular_name );
|
||||
$strings['insertIntoPost'] = sprintf( esc_attr__( 'Insert into %s', 'sportspress' ), $obj->labels->singular_name );
|
||||
$strings['uploadedToThisPost'] = sprintf( esc_attr__( 'Uploaded to this %s', 'sportspress' ), $obj->labels->singular_name );
|
||||
}
|
||||
|
||||
return $strings;
|
||||
|
||||
@@ -31,7 +31,7 @@ class SP_Admin_Meta_Boxes {
|
||||
$meta_boxes = array(
|
||||
'sp_outcome' => array(
|
||||
'details' => array(
|
||||
'title' => __( 'Details', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Details', 'sportspress' ),
|
||||
'save' => 'SP_Meta_Box_Outcome_Details::save',
|
||||
'output' => 'SP_Meta_Box_Outcome_Details::output',
|
||||
'context' => 'normal',
|
||||
@@ -40,14 +40,14 @@ class SP_Admin_Meta_Boxes {
|
||||
),
|
||||
'sp_result' => array(
|
||||
'details' => array(
|
||||
'title' => __( 'Details', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Details', 'sportspress' ),
|
||||
'save' => 'SP_Meta_Box_Result_Details::save',
|
||||
'output' => 'SP_Meta_Box_Result_Details::output',
|
||||
'context' => 'side',
|
||||
'priority' => 'default',
|
||||
),
|
||||
'equation' => array(
|
||||
'title' => __( 'Equation', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Equation', 'sportspress' ),
|
||||
'save' => 'SP_Meta_Box_Result_Equation::save',
|
||||
'output' => 'SP_Meta_Box_Result_Equation::output',
|
||||
'context' => 'normal',
|
||||
@@ -56,14 +56,14 @@ class SP_Admin_Meta_Boxes {
|
||||
),
|
||||
'sp_performance' => array(
|
||||
'details' => array(
|
||||
'title' => __( 'Details', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Details', 'sportspress' ),
|
||||
'save' => 'SP_Meta_Box_Performance_Details::save',
|
||||
'output' => 'SP_Meta_Box_Performance_Details::output',
|
||||
'context' => 'normal',
|
||||
'priority' => 'high',
|
||||
),
|
||||
'equation' => array(
|
||||
'title' => __( 'Equation', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Equation', 'sportspress' ),
|
||||
'save' => 'SP_Meta_Box_Performance_Equation::save',
|
||||
'output' => 'SP_Meta_Box_Performance_Equation::output',
|
||||
'context' => 'normal',
|
||||
@@ -72,14 +72,14 @@ class SP_Admin_Meta_Boxes {
|
||||
),
|
||||
'sp_column' => array(
|
||||
'details' => array(
|
||||
'title' => __( 'Details', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Details', 'sportspress' ),
|
||||
'save' => 'SP_Meta_Box_Column_Details::save',
|
||||
'output' => 'SP_Meta_Box_Column_Details::output',
|
||||
'context' => 'side',
|
||||
'priority' => 'default',
|
||||
),
|
||||
'equation' => array(
|
||||
'title' => __( 'Equation', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Equation', 'sportspress' ),
|
||||
'save' => 'SP_Meta_Box_Column_Equation::save',
|
||||
'output' => 'SP_Meta_Box_Column_Equation::output',
|
||||
'context' => 'normal',
|
||||
@@ -88,7 +88,7 @@ class SP_Admin_Meta_Boxes {
|
||||
),
|
||||
'sp_metric' => array(
|
||||
'details' => array(
|
||||
'title' => __( 'Details', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Details', 'sportspress' ),
|
||||
'save' => 'SP_Meta_Box_Metric_Details::save',
|
||||
'output' => 'SP_Meta_Box_Metric_Details::output',
|
||||
'context' => 'normal',
|
||||
@@ -97,14 +97,14 @@ class SP_Admin_Meta_Boxes {
|
||||
),
|
||||
'sp_statistic' => array(
|
||||
'details' => array(
|
||||
'title' => __( 'Details', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Details', 'sportspress' ),
|
||||
'save' => 'SP_Meta_Box_Statistic_Details::save',
|
||||
'output' => 'SP_Meta_Box_Statistic_Details::output',
|
||||
'context' => 'side',
|
||||
'priority' => 'default',
|
||||
),
|
||||
'equation' => array(
|
||||
'title' => __( 'Equation', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Equation', 'sportspress' ),
|
||||
'save' => 'SP_Meta_Box_Statistic_Equation::save',
|
||||
'output' => 'SP_Meta_Box_Statistic_Equation::output',
|
||||
'context' => 'normal',
|
||||
@@ -113,48 +113,48 @@ class SP_Admin_Meta_Boxes {
|
||||
),
|
||||
'sp_event' => array(
|
||||
'shortcode' => array(
|
||||
'title' => __( 'Shortcodes', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Shortcodes', 'sportspress' ),
|
||||
'output' => 'SP_Meta_Box_Event_Shortcode::output',
|
||||
'context' => 'side',
|
||||
'priority' => 'default',
|
||||
),
|
||||
'format' => array(
|
||||
'title' => __( 'Format', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Format', 'sportspress' ),
|
||||
'save' => 'SP_Meta_Box_Event_Format::save',
|
||||
'output' => 'SP_Meta_Box_Event_Format::output',
|
||||
'context' => 'side',
|
||||
'priority' => 'default',
|
||||
),
|
||||
'mode' => array(
|
||||
'title' => __( 'Mode', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Mode', 'sportspress' ),
|
||||
'save' => 'SP_Meta_Box_Event_Mode::save',
|
||||
'output' => 'SP_Meta_Box_Event_Mode::output',
|
||||
'context' => 'side',
|
||||
'priority' => 'default',
|
||||
),
|
||||
'details' => array(
|
||||
'title' => __( 'Details', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Details', 'sportspress' ),
|
||||
'save' => 'SP_Meta_Box_Event_Details::save',
|
||||
'output' => 'SP_Meta_Box_Event_Details::output',
|
||||
'context' => 'side',
|
||||
'priority' => 'default',
|
||||
),
|
||||
'team' => array(
|
||||
'title' => __( 'Teams', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Teams', 'sportspress' ),
|
||||
'save' => 'SP_Meta_Box_Event_Teams::save',
|
||||
'output' => 'SP_Meta_Box_Event_Teams::output',
|
||||
'context' => 'side',
|
||||
'priority' => 'default',
|
||||
),
|
||||
'results' => array(
|
||||
'title' => __( 'Results', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Results', 'sportspress' ),
|
||||
'save' => 'SP_Meta_Box_Event_Results::save',
|
||||
'output' => 'SP_Meta_Box_Event_Results::output',
|
||||
'context' => 'normal',
|
||||
'priority' => 'high',
|
||||
),
|
||||
'performance' => array(
|
||||
'title' => __( 'Box Score', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Box Score', 'sportspress' ),
|
||||
'save' => 'SP_Meta_Box_Event_Performance::save',
|
||||
'output' => 'SP_Meta_Box_Event_Performance::output',
|
||||
'context' => 'normal',
|
||||
@@ -163,14 +163,14 @@ class SP_Admin_Meta_Boxes {
|
||||
),
|
||||
'sp_team' => array(
|
||||
'details' => array(
|
||||
'title' => __( 'Details', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Details', 'sportspress' ),
|
||||
'save' => 'SP_Meta_Box_Team_Details::save',
|
||||
'output' => 'SP_Meta_Box_Team_Details::output',
|
||||
'context' => 'side',
|
||||
'priority' => 'default',
|
||||
),
|
||||
'staff' => array(
|
||||
'title' => __( 'Staff', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Staff', 'sportspress' ),
|
||||
'save' => 'SP_Meta_Box_Team_Staff::save',
|
||||
'output' => 'SP_Meta_Box_Team_Staff::output',
|
||||
'context' => 'normal',
|
||||
@@ -179,34 +179,34 @@ class SP_Admin_Meta_Boxes {
|
||||
),
|
||||
'sp_player' => array(
|
||||
'shortcode' => array(
|
||||
'title' => __( 'Shortcodes', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Shortcodes', 'sportspress' ),
|
||||
'output' => 'SP_Meta_Box_Player_Shortcode::output',
|
||||
'context' => 'side',
|
||||
'priority' => 'default',
|
||||
),
|
||||
'columns' => array(
|
||||
'title' => __( 'Columns', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Columns', 'sportspress' ),
|
||||
'save' => 'SP_Meta_Box_Player_Columns::save',
|
||||
'output' => 'SP_Meta_Box_Player_Columns::output',
|
||||
'context' => 'side',
|
||||
'priority' => 'default',
|
||||
),
|
||||
'details' => array(
|
||||
'title' => __( 'Details', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Details', 'sportspress' ),
|
||||
'save' => 'SP_Meta_Box_Player_Details::save',
|
||||
'output' => 'SP_Meta_Box_Player_Details::output',
|
||||
'context' => 'side',
|
||||
'priority' => 'default',
|
||||
),
|
||||
'metrics' => array(
|
||||
'title' => __( 'Metrics', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Metrics', 'sportspress' ),
|
||||
'save' => 'SP_Meta_Box_Player_Metrics::save',
|
||||
'output' => 'SP_Meta_Box_Player_Metrics::output',
|
||||
'context' => 'side',
|
||||
'priority' => 'default',
|
||||
),
|
||||
'statistics' => array(
|
||||
'title' => __( 'Statistics', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Statistics', 'sportspress' ),
|
||||
'save' => 'SP_Meta_Box_Player_Statistics::save',
|
||||
'output' => 'SP_Meta_Box_Player_Statistics::output',
|
||||
'context' => 'normal',
|
||||
@@ -215,13 +215,13 @@ class SP_Admin_Meta_Boxes {
|
||||
),
|
||||
'sp_staff' => array(
|
||||
'shortcode' => array(
|
||||
'title' => __( 'Shortcode', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Shortcode', 'sportspress' ),
|
||||
'output' => 'SP_Meta_Box_Staff_Shortcode::output',
|
||||
'context' => 'side',
|
||||
'priority' => 'default',
|
||||
),
|
||||
'details' => array(
|
||||
'title' => __( 'Details', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Details', 'sportspress' ),
|
||||
'save' => 'SP_Meta_Box_Staff_Details::save',
|
||||
'output' => 'SP_Meta_Box_Staff_Details::output',
|
||||
'context' => 'side',
|
||||
@@ -292,22 +292,22 @@ class SP_Admin_Meta_Boxes {
|
||||
*/
|
||||
public function rename_meta_boxes() {
|
||||
remove_meta_box( 'submitdiv', 'sp_event', 'side' );
|
||||
add_meta_box( 'submitdiv', __( 'Event', 'sportspress' ), 'post_submit_meta_box', 'sp_event', 'side', 'high' );
|
||||
add_meta_box( 'submitdiv', esc_attr__( 'Event', 'sportspress' ), 'post_submit_meta_box', 'sp_event', 'side', 'high' );
|
||||
|
||||
remove_meta_box( 'postimagediv', 'sp_team', 'side' );
|
||||
add_meta_box( 'postimagediv', __( 'Logo', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_team', 'side', 'low' );
|
||||
add_meta_box( 'postimagediv', esc_attr__( 'Logo', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_team', 'side', 'low' );
|
||||
|
||||
remove_meta_box( 'postimagediv', 'sp_player', 'side' );
|
||||
add_meta_box( 'postimagediv', __( 'Photo', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_player', 'side', 'low' );
|
||||
add_meta_box( 'postimagediv', esc_attr__( 'Photo', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_player', 'side', 'low' );
|
||||
|
||||
remove_meta_box( 'postimagediv', 'sp_staff', 'side' );
|
||||
add_meta_box( 'postimagediv', __( 'Photo', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_staff', 'side', 'low' );
|
||||
add_meta_box( 'postimagediv', esc_attr__( 'Photo', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_staff', 'side', 'low' );
|
||||
|
||||
remove_meta_box( 'postimagediv', 'sp_performance', 'side' );
|
||||
add_meta_box( 'postimagediv', __( 'Icon', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_performance', 'side', 'low' );
|
||||
add_meta_box( 'postimagediv', esc_attr__( 'Icon', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_performance', 'side', 'low' );
|
||||
|
||||
remove_meta_box( 'postimagediv', 'sp_statistic', 'side' );
|
||||
add_meta_box( 'postimagediv', __( 'Icon', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_statistic', 'side', 'low' );
|
||||
add_meta_box( 'postimagediv', esc_attr__( 'Icon', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_statistic', 'side', 'low' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,28 +32,28 @@ class SP_Meta_Box_Calendar_Columns {
|
||||
$columns = array();
|
||||
|
||||
if ( 'teams' === $title_format ) {
|
||||
$columns['event'] = __( 'Home', 'sportspress' ) . ' | ' . __( 'Away', 'sportspress' );
|
||||
$columns['event'] = esc_attr__( 'Home', 'sportspress' ) . ' | ' . esc_attr__( 'Away', 'sportspress' );
|
||||
} elseif ( 'homeaway' === $title_format ) {
|
||||
$columns['event'] = __( 'Teams', 'sportspress' );
|
||||
$columns['event'] = esc_attr__( 'Teams', 'sportspress' );
|
||||
} else {
|
||||
$columns['event'] = __( 'Title', 'sportspress' );
|
||||
$columns['event'] = esc_attr__( 'Title', 'sportspress' );
|
||||
}
|
||||
|
||||
if ( 'time' === $time_format || 'separate' === $time_format ) {
|
||||
$columns['time'] = __( 'Time', 'sportspress' );
|
||||
$columns['time'] = esc_attr__( 'Time', 'sportspress' );
|
||||
} elseif ( 'combined' === $time_format ) {
|
||||
$columns['time'] = __( 'Time/Results', 'sportspress' );
|
||||
$columns['time'] = esc_attr__( 'Time/Results', 'sportspress' );
|
||||
}
|
||||
|
||||
if ( 'results' === $time_format || 'separate' === $time_format ) {
|
||||
$columns['results'] = __( 'Results', 'sportspress' );
|
||||
$columns['results'] = esc_attr__( 'Results', 'sportspress' );
|
||||
}
|
||||
|
||||
$columns['league'] = __( 'League', 'sportspress' );
|
||||
$columns['season'] = __( 'Season', 'sportspress' );
|
||||
$columns['venue'] = __( 'Venue', 'sportspress' );
|
||||
$columns['article'] = __( 'Article', 'sportspress' );
|
||||
$columns['day'] = __( 'Match Day', 'sportspress' );
|
||||
$columns['league'] = esc_attr__( 'League', 'sportspress' );
|
||||
$columns['season'] = esc_attr__( 'Season', 'sportspress' );
|
||||
$columns['venue'] = esc_attr__( 'Venue', 'sportspress' );
|
||||
$columns['article'] = esc_attr__( 'Article', 'sportspress' );
|
||||
$columns['day'] = esc_attr__( 'Match Day', 'sportspress' );
|
||||
|
||||
$columns = apply_filters( 'sportspress_calendar_columns', $columns );
|
||||
?>
|
||||
|
||||
@@ -52,22 +52,22 @@ class SP_Meta_Box_Calendar_Data {
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="column-date">
|
||||
<?php _e( 'Date', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Date', 'sportspress' ); ?>
|
||||
</th>
|
||||
<?php if ( is_array( $usecolumns ) && in_array( 'event', $usecolumns ) ) { ?>
|
||||
<th class="column-event">
|
||||
<label for="sp_columns_event">
|
||||
<?php
|
||||
if ( 'teams' == $title_format ) {
|
||||
_e( 'Home', 'sportspress' );
|
||||
esc_attr_e( 'Home', 'sportspress' );
|
||||
?>
|
||||
|
|
||||
<?php
|
||||
_e( 'Away', 'sportspress' );
|
||||
esc_attr_e( 'Away', 'sportspress' );
|
||||
} elseif ( 'homeaway' == $title_format ) {
|
||||
_e( 'Teams', 'sportspress' );
|
||||
esc_attr_e( 'Teams', 'sportspress' );
|
||||
} else {
|
||||
_e( 'Title', 'sportspress' );
|
||||
esc_attr_e( 'Title', 'sportspress' );
|
||||
}
|
||||
?>
|
||||
</label>
|
||||
@@ -78,9 +78,9 @@ class SP_Meta_Box_Calendar_Data {
|
||||
<label for="sp_columns_time">
|
||||
<?php
|
||||
if ( 'time' == $time_format || 'separate' == $time_format ) {
|
||||
_e( 'Time', 'sportspress' );
|
||||
esc_attr_e( 'Time', 'sportspress' );
|
||||
} else {
|
||||
_e( 'Time/Results', 'sportspress' );
|
||||
esc_attr_e( 'Time/Results', 'sportspress' );
|
||||
}
|
||||
?>
|
||||
</label>
|
||||
@@ -89,42 +89,42 @@ class SP_Meta_Box_Calendar_Data {
|
||||
<?php if ( ( is_array( $usecolumns ) && in_array( 'results', $usecolumns ) ) && in_array( $time_format, array( 'separate', 'results' ) ) ) { ?>
|
||||
<th class="column-results">
|
||||
<label for="sp_columns_results">
|
||||
<?php _e( 'Results', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Results', 'sportspress' ); ?>
|
||||
</label>
|
||||
</th>
|
||||
<?php } ?>
|
||||
<?php if ( is_array( $usecolumns ) && in_array( 'league', $usecolumns ) ) { ?>
|
||||
<th class="column-league">
|
||||
<label for="sp_columns_league">
|
||||
<?php _e( 'League', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'League', 'sportspress' ); ?>
|
||||
</label>
|
||||
</th>
|
||||
<?php } ?>
|
||||
<?php if ( is_array( $usecolumns ) && in_array( 'season', $usecolumns ) ) { ?>
|
||||
<th class="column-season">
|
||||
<label for="sp_columns_season">
|
||||
<?php _e( 'Season', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Season', 'sportspress' ); ?>
|
||||
</label>
|
||||
</th>
|
||||
<?php } ?>
|
||||
<?php if ( is_array( $usecolumns ) && in_array( 'venue', $usecolumns ) ) { ?>
|
||||
<th class="column-venue">
|
||||
<label for="sp_columns_venue">
|
||||
<?php _e( 'Venue', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Venue', 'sportspress' ); ?>
|
||||
</label>
|
||||
</th>
|
||||
<?php } ?>
|
||||
<?php if ( is_array( $usecolumns ) && in_array( 'article', $usecolumns ) ) { ?>
|
||||
<th class="column-article">
|
||||
<label for="sp_columns_article">
|
||||
<?php _e( 'Article', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Article', 'sportspress' ); ?>
|
||||
</label>
|
||||
</th>
|
||||
<?php } ?>
|
||||
<?php if ( is_array( $usecolumns ) && in_array( 'day', $usecolumns ) ) { ?>
|
||||
<th class="column-day">
|
||||
<label for="sp_columns_day">
|
||||
<?php _e( 'Match Day', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Match Day', 'sportspress' ); ?>
|
||||
</label>
|
||||
</th>
|
||||
<?php } ?>
|
||||
@@ -149,7 +149,7 @@ class SP_Meta_Box_Calendar_Data {
|
||||
echo ' alternate';}
|
||||
?>
|
||||
">
|
||||
<td><?php echo get_post_time( get_option( 'date_format' ), false, $event, true ); ?></td>
|
||||
<td><?php echo esc_attr( get_post_time( get_option( 'date_format' ) ), false, $event, true ); ?></td>
|
||||
<?php if ( is_array( $usecolumns ) && in_array( 'event', $usecolumns ) ) { ?>
|
||||
<td>
|
||||
<div class="sp-title-format sp-title-format-title
|
||||
@@ -185,7 +185,7 @@ class SP_Meta_Box_Calendar_Data {
|
||||
$main_results[] = $team_result;
|
||||
unset( $team_results['outcome'] );
|
||||
$team_results = implode( ' | ', $team_results );
|
||||
echo '<a class="result sp-tip" title="' . $team_results . '" href="' . get_edit_post_link( $event->ID ) . '">' . $team_result . '</a> ';
|
||||
echo '<a class="result sp-tip" title="' . esc_attr( $team_results ) . '" href="' . esc_url( get_edit_post_link( $event->ID ) ) . '">' . esc_attr( $team_result ) . '</a> ';
|
||||
endif;
|
||||
|
||||
echo esc_html( $name ) . '<br>';
|
||||
@@ -200,15 +200,15 @@ class SP_Meta_Box_Calendar_Data {
|
||||
<?php if ( ( is_array( $usecolumns ) && in_array( 'time', $usecolumns ) ) && in_array( $time_format, array( 'combined', 'separate', 'time' ) ) ) { ?>
|
||||
<?php if ( 'time' == $time_format || 'separate' == $time_format ) { ?>
|
||||
<td>
|
||||
<?php echo apply_filters( 'sportspress_event_time_admin', get_post_time( get_option( 'time_format' ), false, $event, true ), $event->ID ); ?>
|
||||
<?php echo wp_kses_post( apply_filters( 'sportspress_event_time_admin', get_post_time( get_option( 'time_format' ), false, $event, true ), $event->ID ) ); ?>
|
||||
</td>
|
||||
<?php } else { ?>
|
||||
<td>
|
||||
<?php
|
||||
if ( ! empty( $main_results ) ) :
|
||||
echo implode( ' - ', $main_results );
|
||||
echo wp_kses_post( implode( ' - ', $main_results ) );
|
||||
else :
|
||||
echo apply_filters( 'sportspress_event_time_admin', get_post_time( get_option( 'time_format' ), false, $event, true ), $event->ID );
|
||||
echo wp_kses_post( apply_filters( 'sportspress_event_time_admin', get_post_time( get_option( 'time_format' ), false, $event, true ), $event->ID ) );
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
@@ -218,7 +218,7 @@ class SP_Meta_Box_Calendar_Data {
|
||||
<td>
|
||||
<?php
|
||||
if ( ! empty( $main_results ) ) :
|
||||
echo implode( ' - ', $main_results );
|
||||
echo wp_kses_post( implode( ' - ', $main_results ) );
|
||||
else :
|
||||
echo '-';
|
||||
endif;
|
||||
@@ -236,7 +236,7 @@ class SP_Meta_Box_Calendar_Data {
|
||||
<?php } ?>
|
||||
<?php if ( is_array( $usecolumns ) && in_array( 'article', $usecolumns ) ) { ?>
|
||||
<td>
|
||||
<a href="<?php echo get_edit_post_link( $event->ID ); ?>#sp_articlediv">
|
||||
<a href="<?php echo esc_url( get_edit_post_link( $event->ID ) ); ?>#sp_articlediv">
|
||||
<?php if ( $video ) : ?>
|
||||
<div class="dashicons dashicons-video-alt"></div>
|
||||
<?php elseif ( has_post_thumbnail( $event->ID ) ) : ?>
|
||||
@@ -244,11 +244,11 @@ class SP_Meta_Box_Calendar_Data {
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if ( $event->post_content == null ) :
|
||||
_e( 'None', 'sportspress' );
|
||||
esc_attr_e( 'None', 'sportspress' );
|
||||
elseif ( $event->post_status == 'publish' ) :
|
||||
_e( 'Recap', 'sportspress' );
|
||||
esc_attr_e( 'Recap', 'sportspress' );
|
||||
else :
|
||||
_e( 'Preview', 'sportspress' );
|
||||
esc_attr_e( 'Preview', 'sportspress' );
|
||||
endif;
|
||||
?>
|
||||
</a>
|
||||
@@ -274,8 +274,8 @@ class SP_Meta_Box_Calendar_Data {
|
||||
else :
|
||||
?>
|
||||
<tr class="sp-row alternate">
|
||||
<td colspan="<?php echo sizeof( $usecolumns ); ?>">
|
||||
<?php _e( 'No results found.', 'sportspress' ); ?>
|
||||
<td colspan="<?php echo esc_attr( sizeof( $usecolumns ) ); ?>">
|
||||
<?php esc_attr_e( 'No results found.', 'sportspress' ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
@@ -283,8 +283,8 @@ class SP_Meta_Box_Calendar_Data {
|
||||
else :
|
||||
?>
|
||||
<tr class="sp-row alternate">
|
||||
<td colspan="<?php echo sizeof( $usecolumns ); ?>">
|
||||
<?php printf( __( 'Select %s', 'sportspress' ), __( 'Details', 'sportspress' ) ); ?>
|
||||
<td colspan="<?php echo esc_attr( sizeof( $usecolumns ) ); ?>">
|
||||
<?php printf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Details', 'sportspress' ) ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@@ -39,10 +39,10 @@ class SP_Meta_Box_Calendar_Details {
|
||||
$order = get_post_meta( $post->ID, 'sp_order', true );
|
||||
?>
|
||||
<div>
|
||||
<p><strong><?php _e( 'Heading', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Heading', 'sportspress' ); ?></strong></p>
|
||||
<p><input type="text" id="sp_caption" name="sp_caption" value="<?php echo esc_attr( $caption ); ?>" placeholder="<?php echo esc_attr( get_the_title() ); ?>"></p>
|
||||
|
||||
<p><strong><?php _e( 'Status', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Status', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<?php
|
||||
$args = array(
|
||||
@@ -53,7 +53,7 @@ class SP_Meta_Box_Calendar_Details {
|
||||
sp_dropdown_statuses( $args );
|
||||
?>
|
||||
</p>
|
||||
<p><strong><?php _e( 'Event Format', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Event Format', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<select name="sp_event_format" class="postform">
|
||||
<option value="all">All</option>
|
||||
@@ -63,7 +63,7 @@ class SP_Meta_Box_Calendar_Details {
|
||||
</select>
|
||||
</p>
|
||||
<div class="sp-date-selector">
|
||||
<p><strong><?php _e( 'Date', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Date', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<?php
|
||||
$args = array(
|
||||
@@ -76,33 +76,33 @@ class SP_Meta_Box_Calendar_Details {
|
||||
</p>
|
||||
<div class="sp-date-range">
|
||||
<p class="sp-date-range-absolute">
|
||||
<input type="text" class="sp-datepicker-from" name="sp_date_from" value="<?php echo $date_from ? esc_attr( $date_from ) : date_i18n( 'Y-m-d' ); ?>" size="10">
|
||||
<input type="text" class="sp-datepicker-from" name="sp_date_from" value="<?php echo $date_from ? esc_attr( $date_from ) : esc_attr( date_i18n( 'Y-m-d' ) ); ?>" size="10">
|
||||
:
|
||||
<input type="text" class="sp-datepicker-to" name="sp_date_to" value="<?php echo $date_to ? esc_attr( $date_to ) : date_i18n( 'Y-m-d' ); ?>" size="10">
|
||||
<input type="text" class="sp-datepicker-to" name="sp_date_to" value="<?php echo $date_to ? esc_attr( $date_to ) : esc_attr( date_i18n( 'Y-m-d' ) ); ?>" size="10">
|
||||
</p>
|
||||
|
||||
<p class="sp-date-range-relative">
|
||||
<?php _e( 'Past', 'sportspress' ); ?>
|
||||
<input type="number" min="0" step="1" class="tiny-text" name="sp_date_past" value="<?php echo '' !== $date_past ? $date_past : 7; ?>">
|
||||
<?php _e( 'days', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Past', 'sportspress' ); ?>
|
||||
<input type="number" min="0" step="1" class="tiny-text" name="sp_date_past" value="<?php echo '' !== $date_past ? esc_attr( $date_past ) : 7; ?>">
|
||||
<?php esc_attr_e( 'days', 'sportspress' ); ?>
|
||||
→
|
||||
<?php _e( 'Next', 'sportspress' ); ?>
|
||||
<input type="number" min="0" step="1" class="tiny-text" name="sp_date_future" value="<?php echo '' !== $date_future ? $date_future : 7; ?>">
|
||||
<?php _e( 'days', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Next', 'sportspress' ); ?>
|
||||
<input type="number" min="0" step="1" class="tiny-text" name="sp_date_future" value="<?php echo '' !== $date_future ? esc_attr( $date_future ) : 7; ?>">
|
||||
<?php esc_attr_e( 'days', 'sportspress' ); ?>
|
||||
</p>
|
||||
|
||||
<p class="sp-date-relative">
|
||||
<label>
|
||||
<input type="checkbox" name="sp_date_relative" value="1" id="sp_date_relative" <?php checked( $date_relative ); ?>>
|
||||
<?php _e( 'Relative', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Relative', 'sportspress' ); ?>
|
||||
</label>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sp-event-day-field">
|
||||
<p><strong><?php _e( 'Match Day', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Match Day', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<input name="sp_day" type="text" class="medium-text" placeholder="<?php _e( 'All', 'sportspress' ); ?>" value="<?php echo esc_attr( $day ); ?>">
|
||||
<input name="sp_day" type="text" class="medium-text" placeholder="<?php esc_attr_e( 'All', 'sportspress' ); ?>" value="<?php echo esc_attr( $day ); ?>">
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
@@ -110,7 +110,7 @@ class SP_Meta_Box_Calendar_Details {
|
||||
sp_taxonomy_field( $taxonomy, $post, true );
|
||||
}
|
||||
?>
|
||||
<p><strong><?php _e( 'Team', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Team', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<?php
|
||||
$args = array(
|
||||
@@ -121,14 +121,14 @@ class SP_Meta_Box_Calendar_Details {
|
||||
'class' => 'widefat',
|
||||
'property' => 'multiple',
|
||||
'chosen' => true,
|
||||
'placeholder' => __( 'All', 'sportspress' ),
|
||||
'placeholder' => esc_attr__( 'All', 'sportspress' ),
|
||||
);
|
||||
if ( ! sp_dropdown_pages( $args ) ) :
|
||||
sp_post_adder( 'sp_team', __( 'Add New', 'sportspress' ) );
|
||||
sp_post_adder( 'sp_team', esc_attr__( 'Add New', 'sportspress' ) );
|
||||
endif;
|
||||
?>
|
||||
</p>
|
||||
<p><strong><?php _e( 'Player', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Player', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<?php
|
||||
$args = array(
|
||||
@@ -139,25 +139,25 @@ class SP_Meta_Box_Calendar_Details {
|
||||
'class' => 'widefat',
|
||||
'property' => 'multiple',
|
||||
'chosen' => true,
|
||||
'placeholder' => __( 'All', 'sportspress' ),
|
||||
'placeholder' => esc_attr__( 'All', 'sportspress' ),
|
||||
);
|
||||
if ( ! sp_dropdown_pages( $args ) ) :
|
||||
sp_post_adder( 'sp_player', __( 'Add New', 'sportspress' ) );
|
||||
sp_post_adder( 'sp_player', esc_attr__( 'Add New', 'sportspress' ) );
|
||||
endif;
|
||||
?>
|
||||
</p>
|
||||
<p><strong><?php _e( 'Sort by', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Sort by', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<select name="sp_orderby">
|
||||
<option value="date" <?php selected( 'date', $orderby ); ?>><?php _e( 'Date', 'sportspress' ); ?></option>
|
||||
<option value="day" <?php selected( 'day', $orderby ); ?>><?php _e( 'Match Day', 'sportspress' ); ?></option>
|
||||
<option value="date" <?php selected( 'date', $orderby ); ?>><?php esc_attr_e( 'Date', 'sportspress' ); ?></option>
|
||||
<option value="day" <?php selected( 'day', $orderby ); ?>><?php esc_attr_e( 'Match Day', 'sportspress' ); ?></option>
|
||||
</select>
|
||||
</p>
|
||||
<p><strong><?php _e( 'Sort Order', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Sort Order', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<select name="sp_order">
|
||||
<option value="ASC" <?php selected( 'ASC', $order ); ?>><?php _e( 'Ascending', 'sportspress' ); ?></option>
|
||||
<option value="DESC" <?php selected( 'DESC', $order ); ?>><?php _e( 'Descending', 'sportspress' ); ?></option>
|
||||
<option value="ASC" <?php selected( 'ASC', $order ); ?>><?php esc_attr_e( 'Ascending', 'sportspress' ); ?></option>
|
||||
<option value="DESC" <?php selected( 'DESC', $order ); ?>><?php esc_attr_e( 'Descending', 'sportspress' ); ?></option>
|
||||
</select>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -44,7 +44,7 @@ class SP_Meta_Box_Calendar_Feeds {
|
||||
?>
|
||||
<p>
|
||||
<strong><?php echo esc_html( sp_array_value( $format, 'name' ) ); ?></strong>
|
||||
<a class="sp-link" href="<?php echo esc_attr( $feed ); ?>" target="_blank" title="<?php _e( 'Link', 'sportspress' ); ?>"></a>
|
||||
<a class="sp-link" href="<?php echo esc_attr( $feed ); ?>" target="_blank" title="<?php esc_attr_e( 'Link', 'sportspress' ); ?>"></a>
|
||||
</p>
|
||||
<p>
|
||||
<input type="text" value="<?php echo esc_attr( $feed ); ?>" readonly="readonly" class="code widefat">
|
||||
|
||||
@@ -27,7 +27,7 @@ class SP_Meta_Box_Calendar_Shortcode {
|
||||
}
|
||||
?>
|
||||
<p class="howto">
|
||||
<?php _e( 'Copy this code and paste it into your post, page or text widget content.', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Copy this code and paste it into your post, page or text widget content.', 'sportspress' ); ?>
|
||||
</p>
|
||||
<p><input type="text" value="<?php sp_shortcode_template( 'event_' . $the_format, $post->ID ); ?>" readonly="readonly" class="code widefat"></p>
|
||||
<?php
|
||||
|
||||
@@ -36,37 +36,37 @@ class SP_Meta_Box_Column_Details extends SP_Meta_Box_Config {
|
||||
$precision = 0;
|
||||
}
|
||||
?>
|
||||
<p><strong><?php _e( 'Key', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Key', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<input name="sp_default_key" type="hidden" id="sp_default_key" value="<?php echo esc_attr( $post->post_name ); ?>">
|
||||
<input name="sp_key" type="text" id="sp_key" value="<?php echo esc_attr( $post->post_name ); ?>">
|
||||
</p>
|
||||
<p><strong><?php _e( 'Decimal Places', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Decimal Places', 'sportspress' ); ?></strong></p>
|
||||
<p class="sp-precision-selector">
|
||||
<input name="sp_precision" type="text" size="4" id="sp_precision" value="<?php echo esc_attr( $precision ); ?>" placeholder="0">
|
||||
</p>
|
||||
<p><strong><?php _e( 'Sort Order', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Sort Order', 'sportspress' ); ?></strong></p>
|
||||
<p class="sp-order-selector">
|
||||
<select name="sp_priority">
|
||||
<?php
|
||||
$options = array( '0' => __( 'Disable', 'sportspress' ) );
|
||||
$options = array( '0' => esc_attr__( 'Disable', 'sportspress' ) );
|
||||
$count = wp_count_posts( 'sp_column' );
|
||||
for ( $i = 1; $i <= $count->publish; $i++ ) :
|
||||
$options[ $i ] = $i;
|
||||
endfor;
|
||||
foreach ( $options as $key => $value ) :
|
||||
printf( '<option value="%s" %s>%s</option>', $key, selected( true, $key == $priority, false ), $value );
|
||||
printf( '<option value="%s" %s>%s</option>', esc_attr( $key ), selected( true, $key == $priority, false ), esc_attr( $value ) );
|
||||
endforeach;
|
||||
?>
|
||||
</select>
|
||||
<select name="sp_order">
|
||||
<?php
|
||||
$options = array(
|
||||
'DESC' => __( 'Descending', 'sportspress' ),
|
||||
'ASC' => __( 'Ascending', 'sportspress' ),
|
||||
'DESC' => esc_attr__( 'Descending', 'sportspress' ),
|
||||
'ASC' => esc_attr__( 'Ascending', 'sportspress' ),
|
||||
);
|
||||
foreach ( $options as $key => $value ) :
|
||||
printf( '<option value="%s" %s>%s</option>', $key, selected( true, $key == $order, false ), $value );
|
||||
printf( '<option value="%s" %s>%s</option>', esc_attr( $key ), selected( true, $key == $order, false ), esc_attr( $value ) );
|
||||
endforeach;
|
||||
?>
|
||||
</select>
|
||||
|
||||
@@ -36,25 +36,25 @@ class SP_Meta_Box_Equation {
|
||||
switch ( $group ) :
|
||||
case 'player_event':
|
||||
$options['Events'] = array(
|
||||
'$eventsattended' => __( 'Attended', 'sportspress' ),
|
||||
'$eventsplayed' => __( 'Played', 'sportspress' ),
|
||||
'$eventsstarted' => __( 'Started', 'sportspress' ),
|
||||
'$eventssubbed' => __( 'Substituted', 'sportspress' ),
|
||||
'$eventminutes' => __( 'Minutes', 'sportspress' ),
|
||||
'$eventsattended' => esc_attr__( 'Attended', 'sportspress' ),
|
||||
'$eventsplayed' => esc_attr__( 'Played', 'sportspress' ),
|
||||
'$eventsstarted' => esc_attr__( 'Started', 'sportspress' ),
|
||||
'$eventssubbed' => esc_attr__( 'Substituted', 'sportspress' ),
|
||||
'$eventminutes' => esc_attr__( 'Minutes', 'sportspress' ),
|
||||
);
|
||||
break;
|
||||
case 'team_event':
|
||||
$options['Events'] = array(
|
||||
'$eventsplayed' => __( 'Played', 'sportspress' ),
|
||||
'$eventminutes' => __( 'Minutes', 'sportspress' ),
|
||||
'$eventsplayed' => esc_attr__( 'Played', 'sportspress' ),
|
||||
'$eventminutes' => esc_attr__( 'Minutes', 'sportspress' ),
|
||||
);
|
||||
break;
|
||||
case 'result':
|
||||
$options['Results'] = self::optgroup(
|
||||
'sp_result',
|
||||
array(
|
||||
'for' => '(' . __( 'for', 'sportspress' ) . ')',
|
||||
'against' => '(' . __(
|
||||
'for' => '(' . esc_attr__( 'for', 'sportspress' ) . ')',
|
||||
'against' => '(' . esc_attr__(
|
||||
'against',
|
||||
'sportspress'
|
||||
) . ')',
|
||||
@@ -68,20 +68,20 @@ class SP_Meta_Box_Equation {
|
||||
break;
|
||||
case 'preset':
|
||||
$options['Presets'] = array(
|
||||
'$gamesback' => __( 'Games Back', 'sportspress' ),
|
||||
'$homerecord' => __( 'Home Record', 'sportspress' ),
|
||||
'$awayrecord' => __( 'Away Record', 'sportspress' ),
|
||||
'$streak' => __( 'Streak', 'sportspress' ),
|
||||
'$form' => __( 'Form', 'sportspress' ),
|
||||
'$last5' => __( 'Last 5', 'sportspress' ),
|
||||
'$last10' => __( 'Last 10', 'sportspress' ),
|
||||
'$gamesback' => esc_attr__( 'Games Back', 'sportspress' ),
|
||||
'$homerecord' => esc_attr__( 'Home Record', 'sportspress' ),
|
||||
'$awayrecord' => esc_attr__( 'Away Record', 'sportspress' ),
|
||||
'$streak' => esc_attr__( 'Streak', 'sportspress' ),
|
||||
'$form' => esc_attr__( 'Form', 'sportspress' ),
|
||||
'$last5' => esc_attr__( 'Last 5', 'sportspress' ),
|
||||
'$last10' => esc_attr__( 'Last 10', 'sportspress' ),
|
||||
);
|
||||
break;
|
||||
case 'subset':
|
||||
$options['Subsets'] = array(
|
||||
'_home' => '@' . __( 'Home', 'sportspress' ),
|
||||
'_away' => '@' . __( 'Away', 'sportspress' ),
|
||||
'_venue' => '@' . __( 'Venue', 'sportspress' ),
|
||||
'_home' => '@' . esc_attr__( 'Home', 'sportspress' ),
|
||||
'_away' => '@' . esc_attr__( 'Away', 'sportspress' ),
|
||||
'_venue' => '@' . esc_attr__( 'Venue', 'sportspress' ),
|
||||
);
|
||||
break;
|
||||
case 'performance':
|
||||
@@ -127,7 +127,7 @@ class SP_Meta_Box_Equation {
|
||||
if ( $i % 2 == 0 ) :
|
||||
?>
|
||||
class="alternate"<?php endif; ?>>
|
||||
<th><?php _e( $label, 'sportspress' ); ?></th>
|
||||
<th><?php esc_attr_e( $label, 'sportspress' ); ?></th>
|
||||
<td>
|
||||
<?php
|
||||
foreach ( $option as $key => $value ) :
|
||||
|
||||
@@ -27,16 +27,16 @@ class SP_Meta_Box_Event_Details {
|
||||
?>
|
||||
<?php do_action( 'sportspress_event_details_meta_box', $post ); ?>
|
||||
<div class="sp-event-day-field">
|
||||
<p><strong><?php _e( 'Match Day', 'sportspress' ); ?></strong> <span class="dashicons dashicons-editor-help sp-desc-tip" title="<?php _e( 'Optional', 'sportspress' ); ?>"></span></p>
|
||||
<p><strong><?php esc_attr_e( 'Match Day', 'sportspress' ); ?></strong> <span class="dashicons dashicons-editor-help sp-desc-tip" title="<?php esc_attr_e( 'Optional', 'sportspress' ); ?>"></span></p>
|
||||
<p>
|
||||
<input name="sp_day" type="text" class="medium-text" placeholder="<?php _e( 'Default', 'sportspress' ); ?>" value="<?php echo esc_attr( $day ); ?>">
|
||||
<input name="sp_day" type="text" class="medium-text" placeholder="<?php esc_attr_e( 'Default', 'sportspress' ); ?>" value="<?php echo esc_attr( $day ); ?>">
|
||||
</p>
|
||||
</div>
|
||||
<div class="sp-event-minutes-field">
|
||||
<p><strong><?php _e( 'Full Time', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Full Time', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<input name="sp_minutes" type="number" step="1" min="0" class="small-text" placeholder="<?php echo get_option( 'sportspress_event_minutes', 90 ); ?>" value="<?php echo esc_attr( $minutes ); ?>">
|
||||
<?php _e( 'mins', 'sportspress' ); ?>
|
||||
<input name="sp_minutes" type="number" step="1" min="0" class="small-text" placeholder="<?php echo esc_attr( get_option( 'sportspress_event_minutes', 90 ) ); ?>" value="<?php echo esc_attr( $minutes ); ?>">
|
||||
<?php esc_attr_e( 'mins', 'sportspress' ); ?>
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
@@ -44,11 +44,11 @@ class SP_Meta_Box_Event_Details {
|
||||
if ( 'sp_venue' == $taxonomy ) {
|
||||
continue;
|
||||
}
|
||||
sp_taxonomy_field( $taxonomy, $post, true, true, __( 'None', 'sportspress' ) );
|
||||
sp_taxonomy_field( $taxonomy, $post, true, true, esc_attr__( 'None', 'sportspress' ) );
|
||||
}
|
||||
?>
|
||||
<div class="sp-event-sp_venue-field">
|
||||
<p><strong><?php _e( 'Venue', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Venue', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<?php
|
||||
$terms = get_the_terms( $post->ID, 'sp_venue' );
|
||||
@@ -58,14 +58,14 @@ class SP_Meta_Box_Event_Details {
|
||||
'class' => 'sp-has-dummy',
|
||||
'selected' => sp_get_the_term_id_or_meta( $post->ID, 'sp_venue' ),
|
||||
'values' => 'term_id',
|
||||
'show_option_none' => __( '— Not set —', 'sportspress' ),
|
||||
'show_option_none' => esc_attr__( '— Not set —', 'sportspress' ),
|
||||
'chosen' => true,
|
||||
);
|
||||
if ( in_array( 'sp_venue', apply_filters( 'sportspress_event_auto_taxonomies', array( 'sp_venue' ) ) ) ) {
|
||||
$args['show_option_all'] = __( '(Auto)', 'sportspress' );
|
||||
$args['show_option_all'] = esc_attr__( '(Auto)', 'sportspress' );
|
||||
}
|
||||
if ( ! sp_dropdown_taxonomies( $args ) ) {
|
||||
sp_taxonomy_adder( 'sp_venue', 'sp_event', __( 'Add New', 'sportspress' ) );
|
||||
sp_taxonomy_adder( 'sp_venue', 'sp_event', esc_attr__( 'Add New', 'sportspress' ) );
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
|
||||
@@ -26,8 +26,8 @@ class SP_Meta_Box_Event_Mode {
|
||||
<div id="post-formats-select">
|
||||
<?php
|
||||
foreach ( array(
|
||||
'team' => __( 'Team vs team', 'sportspress' ),
|
||||
'player' => __( 'Player vs player', 'sportspress' ),
|
||||
'team' => esc_attr__( 'Team vs team', 'sportspress' ),
|
||||
'player' => esc_attr__( 'Player vs player', 'sportspress' ),
|
||||
) as $key => $mode ) :
|
||||
?>
|
||||
<input type="radio" name="sp_mode" class="post-format" id="post-format-<?php echo esc_attr( $key ); ?>" value="<?php echo esc_attr( $key ); ?>" <?php checked( $the_mode, $key ); ?>> <label for="post-format-<?php echo esc_attr( $key ); ?>" class="post-format-icon post-format-<?php echo esc_attr( $key ); ?>"><?php echo esc_html( $mode ); ?></label><br>
|
||||
|
||||
@@ -54,21 +54,21 @@ class SP_Meta_Box_Event_Officials {
|
||||
'name' => 'sp_officials[' . $duty->term_id . '][]',
|
||||
'selected' => sp_array_value( $officials, $duty->term_id, array() ),
|
||||
'values' => 'ID',
|
||||
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Officials', 'sportspress' ) ),
|
||||
'placeholder' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Officials', 'sportspress' ) ),
|
||||
'class' => 'widefat',
|
||||
'property' => 'multiple',
|
||||
'chosen' => true,
|
||||
);
|
||||
|
||||
if ( ! sp_dropdown_pages( $args ) ) {
|
||||
sp_post_adder( 'sp_official', __( 'Add New', 'sportspress' ) );
|
||||
sp_post_adder( 'sp_official', esc_attr__( 'Add New', 'sportspress' ) );
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
sp_taxonomy_adder( 'sp_duty', 'sp_official', __( 'Duty', 'sportspress' ) );
|
||||
sp_taxonomy_adder( 'sp_duty', 'sp_official', esc_attr__( 'Duty', 'sportspress' ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -251,11 +251,11 @@ class SP_Meta_Box_Event_Performance {
|
||||
// Determine order of sections
|
||||
if ( 1 == $sections ) {
|
||||
$section_order = array(
|
||||
1 => __( 'Defense', 'sportspress' ),
|
||||
0 => __( 'Offense', 'sportspress' ),
|
||||
1 => esc_attr__( 'Defense', 'sportspress' ),
|
||||
0 => esc_attr__( 'Offense', 'sportspress' ),
|
||||
);
|
||||
} else {
|
||||
$section_order = array( __( 'Offense', 'sportspress' ), __( 'Defense', 'sportspress' ) );
|
||||
$section_order = array( esc_attr__( 'Offense', 'sportspress' ), esc_attr__( 'Defense', 'sportspress' ) );
|
||||
}
|
||||
|
||||
foreach ( $section_order as $section_id => $section_label ) {
|
||||
@@ -563,11 +563,11 @@ endforeach;
|
||||
$times = false;
|
||||
}
|
||||
?>
|
||||
<?php echo self::status_select( $team_id, $player_id, sp_array_value( $player_performance, 'status', null ) ); ?><br>
|
||||
<?php echo self::sub_select( $team_id, $player_id, sp_array_value( $player_performance, 'sub', null ), $data ); ?><br>
|
||||
<?php echo wp_kses( self::status_select( $team_id, $player_id, sp_array_value( $player_performance, 'status', null ) ), array( 'select' => array( 'class' => array(), 'name' => array() ), 'option' => array( 'value' => array() ) ) ); ?><br>
|
||||
<?php echo wp_kses( self::sub_select( $team_id, $player_id, sp_array_value( $player_performance, 'sub', null ), $data ), array( 'select' => array( 'class' => array(), 'name' => array() ), 'option' => array( 'value' => array() ) ) ); ?><br>
|
||||
<?php if ( is_array( $times ) ) { ?>
|
||||
<input class="sp-sync-input small-text" type="text" name="sp_timeline[<?php echo esc_attr( $team_id ); ?>][<?php echo esc_attr( $player_id ); ?>][sub][]" value="<?php echo esc_attr( sp_array_value( $times, 0, '' ) ); ?>" placeholder="-" />
|
||||
<span class="description"><?php _e( 'mins', 'sportspress' ); ?></span>
|
||||
<span class="description"><?php esc_attr_e( 'mins', 'sportspress' ); ?></span>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<?php } ?>
|
||||
@@ -576,10 +576,10 @@ endforeach;
|
||||
<?php
|
||||
switch ( $stars_type ) {
|
||||
case 1:
|
||||
echo '<input type="checkbox" name="sp_stars[' . $player_id . ']" value="1" ' . checked( sp_array_value( $stars, $player_id, '' ) == '', false, false ) . '>';
|
||||
echo '<input type="checkbox" name="sp_stars[' . esc_attr( $player_id ) . ']" value="1" ' . checked( sp_array_value( $stars, $player_id, '' ) == '', false, false ) . '>';
|
||||
break;
|
||||
default:
|
||||
echo '<input type="text" name="sp_stars[' . $player_id . ']" class="tiny-text sp-player-stars-input sp-sync-input" value="' . sp_array_value( $stars, $player_id, '' ) . '">';
|
||||
echo '<input type="text" name="sp_stars[' . esc_attr( $player_id ) . ']" class="tiny-text sp-player-stars-input sp-sync-input" value="' . esc_attr( sp_array_value( $stars, $player_id, '' ) ) . '">';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
@@ -600,8 +600,8 @@ endforeach;
|
||||
$options = apply_filters(
|
||||
'sportspress_event_performance_status_options',
|
||||
array(
|
||||
'lineup' => __( 'Starting Lineup', 'sportspress' ),
|
||||
'sub' => __( 'Substitute', 'sportspress' ),
|
||||
'lineup' => esc_attr__( 'Starting Lineup', 'sportspress' ),
|
||||
'sub' => esc_attr__( 'Substitute', 'sportspress' ),
|
||||
)
|
||||
);
|
||||
|
||||
@@ -628,7 +628,7 @@ endforeach;
|
||||
|
||||
$output = '<select class="sp-sync-select" name="sp_players[' . $team_id . '][' . $player_id . '][sub]" style="display: none;">';
|
||||
|
||||
$output .= '<option value="0">' . __( 'None', 'sportspress' ) . '</option>';
|
||||
$output .= '<option value="0">' . esc_attr__( 'None', 'sportspress' ) . '</option>';
|
||||
|
||||
// Add players as selectable options
|
||||
foreach ( $data as $id => $performance ) :
|
||||
|
||||
@@ -260,7 +260,7 @@ class SP_Meta_Box_Event_Results {
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="column-team">
|
||||
<?php _e( 'Team', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Team', 'sportspress' ); ?>
|
||||
</th>
|
||||
<?php foreach ( $columns as $key => $label ) : ?>
|
||||
<th class="column-<?php echo esc_attr( $key ); ?>">
|
||||
@@ -275,7 +275,7 @@ class SP_Meta_Box_Event_Results {
|
||||
</th>
|
||||
<?php endforeach; ?>
|
||||
<th class="column-outcome">
|
||||
<?php _e( 'Outcome', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Outcome', 'sportspress' ); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -294,7 +294,7 @@ class SP_Meta_Box_Event_Results {
|
||||
?>
|
||||
" data-team="<?php echo esc_attr( $team_id ); ?>">
|
||||
<td>
|
||||
<?php echo get_the_title( $team_id ); ?>
|
||||
<?php echo esc_attr( get_the_title( $team_id ) ); ?>
|
||||
</td>
|
||||
<?php
|
||||
foreach ( $columns as $column => $label ) :
|
||||
@@ -304,7 +304,7 @@ class SP_Meta_Box_Event_Results {
|
||||
<?php
|
||||
if ( in_array( $column, $auto_columns ) ) {
|
||||
?>
|
||||
placeholder="<?php _e( '(Auto)', 'sportspress' ); ?>"<?php } ?> /></td>
|
||||
placeholder="<?php esc_attr_e( '(Auto)', 'sportspress' ); ?>"<?php } ?> /></td>
|
||||
<?php endforeach; ?>
|
||||
<td>
|
||||
<?php
|
||||
@@ -323,7 +323,7 @@ class SP_Meta_Box_Event_Results {
|
||||
'class' => 'sp-outcome',
|
||||
'property' => 'multiple',
|
||||
'chosen' => true,
|
||||
'placeholder' => __( '(Auto)', 'sportspress' ),
|
||||
'placeholder' => esc_attr__( '(Auto)', 'sportspress' ),
|
||||
);
|
||||
sp_dropdown_pages( $args );
|
||||
?>
|
||||
|
||||
@@ -24,19 +24,19 @@ class SP_Meta_Box_Event_Shortcode {
|
||||
$shortcodes = apply_filters(
|
||||
'sportspress_event_shortcodes',
|
||||
array(
|
||||
'event_results' => __( 'Results', 'sportspress' ),
|
||||
'event_details' => __( 'Details', 'sportspress' ),
|
||||
'event_performance' => __( 'Box Score', 'sportspress' ),
|
||||
'event_venue' => __( 'Venue', 'sportspress' ),
|
||||
'event_officials' => __( 'Officials', 'sportspress' ),
|
||||
'event_teams' => __( 'Teams', 'sportspress' ),
|
||||
'event_full' => __( 'Full Info', 'sportspress' ),
|
||||
'event_results' => esc_attr__( 'Results', 'sportspress' ),
|
||||
'event_details' => esc_attr__( 'Details', 'sportspress' ),
|
||||
'event_performance' => esc_attr__( 'Box Score', 'sportspress' ),
|
||||
'event_venue' => esc_attr__( 'Venue', 'sportspress' ),
|
||||
'event_officials' => esc_attr__( 'Officials', 'sportspress' ),
|
||||
'event_teams' => esc_attr__( 'Teams', 'sportspress' ),
|
||||
'event_full' => esc_attr__( 'Full Info', 'sportspress' ),
|
||||
)
|
||||
);
|
||||
if ( $shortcodes ) {
|
||||
?>
|
||||
<p class="howto">
|
||||
<?php _e( 'Copy this code and paste it into your post, page or text widget content.', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Copy this code and paste it into your post, page or text widget content.', 'sportspress' ); ?>
|
||||
</p>
|
||||
<?php foreach ( $shortcodes as $id => $label ) { ?>
|
||||
<p>
|
||||
|
||||
@@ -42,7 +42,7 @@ class SP_Meta_Box_Event_Specs {
|
||||
<?php
|
||||
endforeach;
|
||||
else :
|
||||
sp_post_adder( 'sp_spec', __( 'Add New', 'sportspress' ) );
|
||||
sp_post_adder( 'sp_spec', esc_attr__( 'Add New', 'sportspress' ) );
|
||||
endif;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ class SP_Meta_Box_Event_Teams {
|
||||
'post_type' => $post_type,
|
||||
'name' => 'sp_team[]',
|
||||
'class' => 'sportspress-pages',
|
||||
'show_option_none' => __( '— None —', 'sportspress' ),
|
||||
'show_option_none' => esc_attr__( '— None —', 'sportspress' ),
|
||||
'values' => 'ID',
|
||||
'selected' => $team,
|
||||
'chosen' => true,
|
||||
@@ -70,30 +70,30 @@ class SP_Meta_Box_Event_Teams {
|
||||
$sections = get_option( 'sportspress_event_performance_sections', -1 );
|
||||
if ( 0 == $sections ) {
|
||||
$tabs['sp_offense'] = array(
|
||||
'label' => __( 'Offense', 'sportspress' ),
|
||||
'label' => esc_attr__( 'Offense', 'sportspress' ),
|
||||
'post_type' => 'sp_player',
|
||||
);
|
||||
$tabs['sp_defense'] = array(
|
||||
'label' => __( 'Defense', 'sportspress' ),
|
||||
'label' => esc_attr__( 'Defense', 'sportspress' ),
|
||||
'post_type' => 'sp_player',
|
||||
);
|
||||
} elseif ( 1 == $sections ) {
|
||||
$tabs['sp_defense'] = array(
|
||||
'label' => __( 'Defense', 'sportspress' ),
|
||||
'label' => esc_attr__( 'Defense', 'sportspress' ),
|
||||
'post_type' => 'sp_player',
|
||||
);
|
||||
$tabs['sp_offense'] = array(
|
||||
'label' => __( 'Offense', 'sportspress' ),
|
||||
'label' => esc_attr__( 'Offense', 'sportspress' ),
|
||||
'post_type' => 'sp_player',
|
||||
);
|
||||
} else {
|
||||
$tabs['sp_player'] = array(
|
||||
'label' => __( 'Players', 'sportspress' ),
|
||||
'label' => esc_attr__( 'Players', 'sportspress' ),
|
||||
'post_type' => 'sp_player',
|
||||
);
|
||||
}
|
||||
$tabs['sp_staff'] = array(
|
||||
'label' => __( 'Staff', 'sportspress' ),
|
||||
'label' => esc_attr__( 'Staff', 'sportspress' ),
|
||||
'post_type' => 'sp_staff',
|
||||
);
|
||||
?>
|
||||
@@ -126,7 +126,7 @@ class SP_Meta_Box_Event_Teams {
|
||||
endfor;
|
||||
} else {
|
||||
?>
|
||||
<p><strong><?php printf( __( 'Select %s:', 'sportspress' ), sp_get_post_mode_label( $post->ID ) ); ?></strong></p>
|
||||
<p><strong><?php printf( esc_attr__( 'Select %s:', 'sportspress' ), esc_attr( sp_get_post_mode_label( $post->ID ) ) ); ?></strong></p>
|
||||
<?php
|
||||
$args = array(
|
||||
'post_type' => $post_type,
|
||||
@@ -136,10 +136,10 @@ class SP_Meta_Box_Event_Teams {
|
||||
'class' => 'widefat',
|
||||
'property' => 'multiple',
|
||||
'chosen' => true,
|
||||
'placeholder' => __( 'None', 'sportspress' ),
|
||||
'placeholder' => esc_attr__( 'None', 'sportspress' ),
|
||||
);
|
||||
if ( ! sp_dropdown_pages( $args ) ) :
|
||||
sp_post_adder( $post_type, __( 'Add New', 'sportspress' ) );
|
||||
sp_post_adder( $post_type, esc_attr__( 'Add New', 'sportspress' ) );
|
||||
endif;
|
||||
}
|
||||
wp_nonce_field( 'sp-get-players', 'sp-get-players-nonce', false );
|
||||
|
||||
@@ -25,21 +25,21 @@ class SP_Meta_Box_Event_Video {
|
||||
if ( $video ) :
|
||||
?>
|
||||
<fieldset class="sp-video-embed">
|
||||
<?php echo apply_filters( 'the_content', '[embed width="254"]' . $video . '[/embed]' ); ?>
|
||||
<p><a href="#" class="sp-remove-video"><?php _e( 'Remove video', 'sportspress' ); ?></a></p>
|
||||
<?php echo wp_kses( apply_filters( 'the_content', '[embed width="254"]' . esc_url( $video ) . '[/embed]' ), array( 'iframe' => array( 'title' => array(), 'width' => array(), 'height' => array(), 'src' => array(), 'frameborder' => array(), 'allow' => array(), 'allowfullscreen' => array(), 'style' => array()) ) ); ?>
|
||||
<p><a href="#" class="sp-remove-video"><?php esc_attr_e( 'Remove video', 'sportspress' ); ?></a></p>
|
||||
</fieldset>
|
||||
<?php endif; ?>
|
||||
<fieldset class="sp-video-field hidden">
|
||||
<p><strong><?php _e( 'URL', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'URL', 'sportspress' ); ?></strong></p>
|
||||
<p><input class="widefat" type="text" name="sp_video" id="sp_video" value="<?php echo esc_url( $video ); ?>"></p>
|
||||
<p><a href="#" class="sp-remove-video"><?php _e( 'Cancel', 'sportspress' ); ?></a></p>
|
||||
<p><a href="#" class="sp-remove-video"><?php esc_attr_e( 'Cancel', 'sportspress' ); ?></a></p>
|
||||
</fieldset>
|
||||
<fieldset class="sp-video-adder
|
||||
<?php
|
||||
if ( $video ) :
|
||||
?>
|
||||
hidden<?php endif; ?>">
|
||||
<p><a href="#" class="sp-add-video"><?php _e( 'Add video', 'sportspress' ); ?></a></p>
|
||||
<p><a href="#" class="sp-add-video"><?php esc_attr_e( 'Add video', 'sportspress' ); ?></a></p>
|
||||
</fieldset>
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -24,16 +24,16 @@ class SP_Meta_Box_List_Columns {
|
||||
$selected = (array) get_post_meta( $post->ID, 'sp_columns', true );
|
||||
$orderby = get_post_meta( $post->ID, 'sp_orderby', true );
|
||||
?>
|
||||
<p><strong><?php _e( 'General', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'General', 'sportspress' ); ?></strong></p>
|
||||
<ul class="categorychecklist form-no-clear">
|
||||
<li>
|
||||
<label class="selectit">
|
||||
<input value="number" type="checkbox" name="sp_columns[]" id="sp_columns_number" <?php checked( in_array( 'number', $selected ) ); ?>>
|
||||
<?php
|
||||
if ( in_array( $orderby, array( 'number', 'name' ) ) ) {
|
||||
_e( 'Squad Number', 'sportspress' );
|
||||
esc_attr_e( 'Squad Number', 'sportspress' );
|
||||
} else {
|
||||
_e( 'Rank', 'sportspress' );
|
||||
esc_attr_e( 'Rank', 'sportspress' );
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -42,23 +42,23 @@ class SP_Meta_Box_List_Columns {
|
||||
<li>
|
||||
<label class="selectit">
|
||||
<input value="team" type="checkbox" name="sp_columns[]" id="sp_columns_team" <?php checked( in_array( 'team', $selected ) ); ?>>
|
||||
<?php _e( 'Team', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Team', 'sportspress' ); ?>
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label class="selectit">
|
||||
<input value="position" type="checkbox" name="sp_columns[]" id="sp_columns_position" <?php checked( in_array( 'position', $selected ) ); ?>>
|
||||
<?php _e( 'Position', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Position', 'sportspress' ); ?>
|
||||
</label>
|
||||
</li>
|
||||
<?php do_action( 'sportspress_list_general_columns', $selected ); ?>
|
||||
</ul>
|
||||
<p><strong><?php _e( 'Data', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Data', 'sportspress' ); ?></strong></p>
|
||||
<div class="sp-instance">
|
||||
<ul id="sp_column-tabs" class="sp-tab-bar category-tabs">
|
||||
<li class="tabs"><a href="#sp_performance-all"><?php _e( 'Performance', 'sportspress' ); ?></a></li>
|
||||
<li><a href="#sp_metric-all"><?php _e( 'Metrics', 'sportspress' ); ?></a></li>
|
||||
<li><a href="#sp_statistic-all"><?php _e( 'Statistics', 'sportspress' ); ?></a></li>
|
||||
<li class="tabs"><a href="#sp_performance-all"><?php esc_attr_e( 'Performance', 'sportspress' ); ?></a></li>
|
||||
<li><a href="#sp_metric-all"><?php esc_attr_e( 'Metrics', 'sportspress' ); ?></a></li>
|
||||
<li><a href="#sp_statistic-all"><?php esc_attr_e( 'Statistics', 'sportspress' ); ?></a></li>
|
||||
</ul>
|
||||
<?php
|
||||
sp_column_checklist( $post->ID, 'sp_performance', 'block', $selected );
|
||||
|
||||
@@ -47,22 +47,22 @@ class SP_Meta_Box_List_Data {
|
||||
$show_player_photo = get_option( 'sportspress_list_show_photos', 'no' ) == 'yes' ? true : false;
|
||||
?>
|
||||
<ul class="subsubsub sp-table-bar">
|
||||
<li><a href="#sp-table-values" class="current"><?php _e( 'Values', 'sportspress' ); ?></a></li> |
|
||||
<li><a href="#sp-table-adjustments" class=""><?php _e( 'Adjustments', 'sportspress' ); ?></a></li>
|
||||
<li><a href="#sp-table-values" class="current"><?php esc_attr_e( 'Values', 'sportspress' ); ?></a></li> |
|
||||
<li><a href="#sp-table-adjustments" class=""><?php esc_attr_e( 'Adjustments', 'sportspress' ); ?></a></li>
|
||||
</ul>
|
||||
<div class="sp-data-table-container sp-table-panel sp-table-values" id="sp-table-values">
|
||||
<table class="widefat sp-data-table sp-player-list-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<?php if ( array_key_exists( 'number', $columns ) ) { ?>
|
||||
<th><?php echo in_array( $orderby, array( 'number', 'name' ) ) ? '#' : __( 'Rank', 'sportspress' ); ?></th>
|
||||
<th><?php echo in_array( $orderby, array( 'number', 'name' ) ) ? '#' : esc_attr__( 'Rank', 'sportspress' ); ?></th>
|
||||
<?php } ?>
|
||||
<th><?php _e( 'Player', 'sportspress' ); ?></th>
|
||||
<th><?php esc_attr_e( 'Player', 'sportspress' ); ?></th>
|
||||
<?php if ( array_key_exists( 'team', $columns ) ) { ?>
|
||||
<th><?php _e( 'Team', 'sportspress' ); ?></th>
|
||||
<th><?php esc_attr_e( 'Team', 'sportspress' ); ?></th>
|
||||
<?php } ?>
|
||||
<?php if ( array_key_exists( 'position', $columns ) ) { ?>
|
||||
<th><?php _e( 'Position', 'sportspress' ); ?></th>
|
||||
<th><?php esc_attr_e( 'Position', 'sportspress' ); ?></th>
|
||||
<?php } ?>
|
||||
<?php foreach ( $columns as $key => $label ) : ?>
|
||||
<?php
|
||||
@@ -102,9 +102,9 @@ class SP_Meta_Box_List_Data {
|
||||
<td>
|
||||
<?php
|
||||
if ( 'number' == $orderby ) {
|
||||
echo ( $number ? esc_html( $number ) : ' ' );
|
||||
echo ( $number ? esc_html( $number ) : ' ' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
} else {
|
||||
echo $i + 1;
|
||||
echo esc_html( $i + 1 );
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
@@ -116,12 +116,12 @@ class SP_Meta_Box_List_Data {
|
||||
?>
|
||||
<span class="sp-default-value">
|
||||
<span class="sp-default-value-input"><?php echo esc_html( $default_name ); ?></span>
|
||||
<a class="dashicons dashicons-edit sp-edit" title="<?php _e( 'Edit', 'sportspress' ); ?>"></a>
|
||||
<a class="dashicons dashicons-edit sp-edit" title="<?php esc_attr_e( 'Edit', 'sportspress' ); ?>"></a>
|
||||
</span>
|
||||
<span class="hidden sp-custom-value">
|
||||
<input type="text" name="sp_players[<?php echo esc_attr( $player_id ); ?>][name]" class="name sp-custom-value-input" value="<?php echo esc_attr( sp_array_value( $player_stats, 'name', '' ) ); ?>" placeholder="<?php echo esc_attr( get_the_title( $player_id ) ); ?>" size="6">
|
||||
<a class="button button-secondary sp-cancel"><?php _e( 'Cancel', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary sp-save"><?php _e( 'Save', 'sportspress' ); ?></a>
|
||||
<a class="button button-secondary sp-cancel"><?php esc_attr_e( 'Cancel', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary sp-save"><?php esc_attr_e( 'Save', 'sportspress' ); ?></a>
|
||||
</span>
|
||||
</td>
|
||||
<?php if ( array_key_exists( 'team', $columns ) ) { ?>
|
||||
@@ -134,12 +134,12 @@ class SP_Meta_Box_List_Data {
|
||||
$include = get_post_meta( $player_id, 'sp_team' );
|
||||
$args = array(
|
||||
'post_type' => 'sp_team',
|
||||
'name' => 'sp_players[' . $player_id . '][team]',
|
||||
'name' => 'sp_players[' . esc_attr( $player_id ) . '][team]',
|
||||
'include' => $include,
|
||||
'selected' => $selected,
|
||||
'values' => 'ID',
|
||||
);
|
||||
wp_dropdown_pages( $args );
|
||||
wp_dropdown_pages( $args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
?>
|
||||
</td>
|
||||
<?php } ?>
|
||||
@@ -150,7 +150,7 @@ class SP_Meta_Box_List_Data {
|
||||
$args = array(
|
||||
'taxonomy' => 'sp_position',
|
||||
'name' => 'sp_players[' . $player_id . '][position]',
|
||||
'show_option_blank' => __( '(Auto)', 'sportspress' ),
|
||||
'show_option_blank' => esc_attr__( '(Auto)', 'sportspress' ),
|
||||
'values' => 'term_id',
|
||||
'orderby' => 'meta_value_num',
|
||||
'meta_query' => array(
|
||||
@@ -194,7 +194,7 @@ class SP_Meta_Box_List_Data {
|
||||
echo esc_attr( $colspan );
|
||||
?>
|
||||
">
|
||||
<?php printf( __( 'Select %s', 'sportspress' ), __( 'Data', 'sportspress' ) ); ?>
|
||||
<?php printf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Data', 'sportspress' ) ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
@@ -208,7 +208,7 @@ class SP_Meta_Box_List_Data {
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th><?php _e( 'Player', 'sportspress' ); ?></th>
|
||||
<th><?php esc_attr_e( 'Player', 'sportspress' ); ?></th>
|
||||
<?php
|
||||
foreach ( $columns as $key => $label ) :
|
||||
if ( in_array( $key, array( 'number', 'team', 'position' ) ) ) {
|
||||
@@ -235,9 +235,9 @@ class SP_Meta_Box_List_Data {
|
||||
echo ' alternate';}
|
||||
?>
|
||||
">
|
||||
<td><?php echo ( $number ? $number : ' ' ); ?></td>
|
||||
<td><?php echo ( $number ? esc_html( $number ) : ' ' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></td>
|
||||
<td>
|
||||
<?php echo get_the_title( $player_id ); ?>
|
||||
<?php echo esc_html( get_the_title( $player_id ) ); ?>
|
||||
</td>
|
||||
<?php
|
||||
foreach ( $columns as $column => $label ) :
|
||||
@@ -261,7 +261,7 @@ class SP_Meta_Box_List_Data {
|
||||
echo esc_attr( $colspan );
|
||||
?>
|
||||
">
|
||||
<?php printf( __( 'Select %s', 'sportspress' ), __( 'Details', 'sportspress' ) ); ?>
|
||||
<?php printf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Details', 'sportspress' ) ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@@ -41,11 +41,11 @@ class SP_Meta_Box_List_Details {
|
||||
$default_nationality = get_option( 'sportspress_default_nationality', false );
|
||||
?>
|
||||
<div>
|
||||
<p><strong><?php _e( 'Heading', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Heading', 'sportspress' ); ?></strong></p>
|
||||
<p><input type="text" id="sp_caption" name="sp_caption" value="<?php echo esc_attr( $caption ); ?>" placeholder="<?php echo esc_attr( get_the_title() ); ?>"></p>
|
||||
|
||||
<div class="sp-date-selector">
|
||||
<p><strong><?php _e( 'Date', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Date', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<?php
|
||||
$args = array(
|
||||
@@ -58,21 +58,21 @@ class SP_Meta_Box_List_Details {
|
||||
</p>
|
||||
<div class="sp-date-range">
|
||||
<p class="sp-date-range-absolute">
|
||||
<input type="text" class="sp-datepicker-from" name="sp_date_from" value="<?php echo $date_from ? esc_attr( $date_from ) : date_i18n( 'Y-m-d' ); ?>" size="10">
|
||||
<input type="text" class="sp-datepicker-from" name="sp_date_from" value="<?php echo esc_attr( $date_from ? $date_from : date_i18n( 'Y-m-d' ) ); ?>" size="10">
|
||||
:
|
||||
<input type="text" class="sp-datepicker-to" name="sp_date_to" value="<?php echo $date_to ? esc_attr( $date_to ) : date_i18n( 'Y-m-d' ); ?>" size="10">
|
||||
<input type="text" class="sp-datepicker-to" name="sp_date_to" value="<?php echo esc_attr( $date_to ? $date_to : date_i18n( 'Y-m-d' ) ); ?>" size="10">
|
||||
</p>
|
||||
|
||||
<p class="sp-date-range-relative">
|
||||
<?php _e( 'Past', 'sportspress' ); ?>
|
||||
<input type="number" min="0" step="1" class="tiny-text" name="sp_date_past" value="<?php echo '' !== $date_past ? $date_past : 7; ?>">
|
||||
<?php _e( 'days', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Past', 'sportspress' ); ?>
|
||||
<input type="number" min="0" step="1" class="tiny-text" name="sp_date_past" value="<?php echo '' !== $date_past ? esc_attr( $date_past ) : 7; ?>">
|
||||
<?php esc_attr_e( 'days', 'sportspress' ); ?>
|
||||
</p>
|
||||
|
||||
<p class="sp-date-relative">
|
||||
<label>
|
||||
<input type="checkbox" name="sp_date_relative" value="1" id="sp_date_relative" <?php checked( $date_relative ); ?>>
|
||||
<?php _e( 'Relative', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Relative', 'sportspress' ); ?>
|
||||
</label>
|
||||
</p>
|
||||
</div>
|
||||
@@ -83,29 +83,29 @@ class SP_Meta_Box_List_Details {
|
||||
sp_taxonomy_field( $taxonomy, $post, true );
|
||||
}
|
||||
?>
|
||||
<p><strong><?php _e( 'Team', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Team', 'sportspress' ); ?></strong></p>
|
||||
<p class="sp-tab-select sp-team-era-selector">
|
||||
<?php
|
||||
$args = array(
|
||||
'post_type' => 'sp_team',
|
||||
'name' => 'sp_team',
|
||||
'show_option_all' => __( 'All', 'sportspress' ),
|
||||
'show_option_all' => esc_attr__( 'All', 'sportspress' ),
|
||||
'selected' => $team_id,
|
||||
'values' => 'ID',
|
||||
);
|
||||
if ( ! sp_dropdown_pages( $args ) ) :
|
||||
sp_post_adder( 'sp_team', __( 'Add New', 'sportspress' ) );
|
||||
sp_post_adder( 'sp_team', esc_attr__( 'Add New', 'sportspress' ) );
|
||||
endif;
|
||||
?>
|
||||
<select name="sp_era">
|
||||
<option value="all" <?php selected( 'all', $era ); ?>><?php _e( 'All', 'sportspress' ); ?></option>
|
||||
<option value="current" <?php selected( 'current', $era ); ?>><?php _e( 'Current', 'sportspress' ); ?></option>
|
||||
<option value="past" <?php selected( 'past', $era ); ?>><?php _e( 'Past', 'sportspress' ); ?></option>
|
||||
<option value="all" <?php selected( 'all', $era ); ?>><?php esc_attr_e( 'All', 'sportspress' ); ?></option>
|
||||
<option value="current" <?php selected( 'current', $era ); ?>><?php esc_attr_e( 'Current', 'sportspress' ); ?></option>
|
||||
<option value="past" <?php selected( 'past', $era ); ?>><?php esc_attr_e( 'Past', 'sportspress' ); ?></option>
|
||||
</select>
|
||||
</p>
|
||||
<p><strong><?php _e( 'Nationality', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Nationality', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<select id="sp_nationality" name="sp_nationality[]" data-placeholder="<?php printf( __( 'Select %s', 'sportspress' ), __( 'Nationality', 'sportspress' ) ); ?>" class="widefat chosen-select
|
||||
<select id="sp_nationality" name="sp_nationality[]" data-placeholder="<?php printf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Nationality', 'sportspress' ) ); ?>" class="widefat chosen-select
|
||||
<?php
|
||||
if ( is_rtl() ) :
|
||||
?>
|
||||
@@ -120,20 +120,20 @@ class SP_Meta_Box_List_Details {
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</p>
|
||||
<p><strong><?php _e( 'Grouping', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Grouping', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<select name="sp_grouping">
|
||||
<option value="0"><?php _e( 'None', 'sportspress' ); ?></option>
|
||||
<option value="position" <?php selected( $grouping, 'position' ); ?>><?php _e( 'Position', 'sportspress' ); ?></option>
|
||||
<option value="0"><?php esc_attr_e( 'None', 'sportspress' ); ?></option>
|
||||
<option value="position" <?php selected( $grouping, 'position' ); ?>><?php esc_attr_e( 'Position', 'sportspress' ); ?></option>
|
||||
</select>
|
||||
</p>
|
||||
<p><strong><?php _e( 'Sort by', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Sort by', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<?php
|
||||
$args = array(
|
||||
'prepend_options' => array(
|
||||
'number' => __( 'Squad Number', 'sportspress' ),
|
||||
'name' => __( 'Name', 'sportspress' ),
|
||||
'number' => esc_attr__( 'Squad Number', 'sportspress' ),
|
||||
'name' => esc_attr__( 'Name', 'sportspress' ),
|
||||
),
|
||||
'post_type' => array( 'sp_performance', 'sp_metric', 'sp_statistic' ),
|
||||
'name' => 'sp_orderby',
|
||||
@@ -146,21 +146,21 @@ class SP_Meta_Box_List_Details {
|
||||
<p>
|
||||
<label class="selectit">
|
||||
<input type="checkbox" name="sp_crop" value="1" <?php checked( $crop ); ?>>
|
||||
<?php _e( 'Skip if zero?', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Skip if zero?', 'sportspress' ); ?>
|
||||
</label>
|
||||
</p>
|
||||
<p><strong><?php _e( 'Sort Order', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Sort Order', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<select name="sp_order">
|
||||
<option value="ASC" <?php selected( 'ASC', $order ); ?>><?php _e( 'Ascending', 'sportspress' ); ?></option>
|
||||
<option value="DESC" <?php selected( 'DESC', $order ); ?>><?php _e( 'Descending', 'sportspress' ); ?></option>
|
||||
<option value="ASC" <?php selected( 'ASC', $order ); ?>><?php esc_attr_e( 'Ascending', 'sportspress' ); ?></option>
|
||||
<option value="DESC" <?php selected( 'DESC', $order ); ?>><?php esc_attr_e( 'Descending', 'sportspress' ); ?></option>
|
||||
</select>
|
||||
</p>
|
||||
<p><strong><?php _e( 'Players', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Players', 'sportspress' ); ?></strong></p>
|
||||
<p class="sp-select-setting">
|
||||
<select name="sp_select">
|
||||
<option value="auto" <?php selected( 'auto', $select ); ?>><?php _e( 'Auto', 'sportspress' ); ?></option>
|
||||
<option value="manual" <?php selected( 'manual', $select ); ?>><?php _e( 'Manual', 'sportspress' ); ?></option>
|
||||
<option value="auto" <?php selected( 'auto', $select ); ?>><?php esc_attr_e( 'Auto', 'sportspress' ); ?></option>
|
||||
<option value="manual" <?php selected( 'manual', $select ); ?>><?php esc_attr_e( 'Manual', 'sportspress' ); ?></option>
|
||||
</select>
|
||||
</p>
|
||||
<?php
|
||||
@@ -175,11 +175,11 @@ class SP_Meta_Box_List_Details {
|
||||
}
|
||||
}
|
||||
sp_post_checklist( $post->ID, 'sp_player', ( 'auto' == $select ? 'none' : 'block' ), $player_filters );
|
||||
sp_post_adder( 'sp_player', __( 'Add New', 'sportspress' ) );
|
||||
sp_post_adder( 'sp_player', esc_attr__( 'Add New', 'sportspress' ) );
|
||||
} else {
|
||||
?>
|
||||
<p><strong><?php _e( 'Display', 'sportspress' ); ?></strong></p>
|
||||
<p><input name="sp_number" id="sp_number" type="number" step="1" min="0" class="small-text" placeholder="<?php _e( 'All', 'sportspress' ); ?>" value="<?php echo esc_attr( $number ); ?>"> <?php _e( 'players', 'sportspress' ); ?></p>
|
||||
<p><strong><?php esc_attr_e( 'Display', 'sportspress' ); ?></strong></p>
|
||||
<p><input name="sp_number" id="sp_number" type="number" step="1" min="0" class="small-text" placeholder="<?php esc_attr_e( 'All', 'sportspress' ); ?>" value="<?php echo esc_attr( $number ); ?>"> <?php esc_attr_e( 'players', 'sportspress' ); ?></p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -27,7 +27,7 @@ class SP_Meta_Box_List_Shortcode {
|
||||
}
|
||||
?>
|
||||
<p class="howto">
|
||||
<?php _e( 'Copy this code and paste it into your post, page or text widget content.', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Copy this code and paste it into your post, page or text widget content.', 'sportspress' ); ?>
|
||||
</p>
|
||||
<p><input type="text" value="<?php sp_shortcode_template( 'player_' . $the_format, $post->ID ); ?>" readonly="readonly" class="code widefat"></p>
|
||||
<?php
|
||||
|
||||
@@ -31,26 +31,26 @@ class SP_Meta_Box_Metric_Details extends SP_Meta_Box_Config {
|
||||
$visible = 1;
|
||||
}
|
||||
?>
|
||||
<p><strong><?php _e( 'Variable', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Variable', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<input name="sp_default_key" type="hidden" id="sp_default_key" value="<?php echo esc_attr( $post->post_name ); ?>">
|
||||
<input name="sp_key" type="text" id="sp_key" value="<?php echo esc_attr( $post->post_name ); ?>">
|
||||
</p>
|
||||
<p>
|
||||
<strong><?php _e( 'Visible', 'sportspress' ); ?></strong>
|
||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php _e( 'Display in player profile?', 'sportspress' ); ?>"></i>
|
||||
<strong><?php esc_attr_e( 'Visible', 'sportspress' ); ?></strong>
|
||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php esc_attr_e( 'Display in player profile?', 'sportspress' ); ?>"></i>
|
||||
</p>
|
||||
<ul class="sp-visible-selector">
|
||||
<li>
|
||||
<label class="selectit">
|
||||
<input name="sp_visible" id="sp_visible_yes" type="radio" value="1" <?php checked( $visible ); ?>>
|
||||
<?php _e( 'Yes', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Yes', 'sportspress' ); ?>
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label class="selectit">
|
||||
<input name="sp_visible" id="sp_visible_no" type="radio" value="0" <?php checked( ! $visible ); ?>>
|
||||
<?php _e( 'No', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'No', 'sportspress' ); ?>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -37,13 +37,13 @@ class SP_Meta_Box_Outcome_Details extends SP_Meta_Box_Config {
|
||||
$condition = get_post_meta( $post->ID, 'sp_condition', true );
|
||||
$main_result = get_option( 'sportspress_primary_result', null );
|
||||
$result = get_page_by_path( $main_result, ARRAY_A, 'sp_result' );
|
||||
$label = sp_array_value( $result, 'post_title', __( 'Primary', 'sportspress' ) );
|
||||
$label = sp_array_value( $result, 'post_title', esc_attr__( 'Primary', 'sportspress' ) );
|
||||
|
||||
if ( '' === $color ) {
|
||||
$color = '#888888';
|
||||
}
|
||||
?>
|
||||
<p><strong><?php _e( 'Variable', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Variable', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<input name="sp_default_key" type="hidden" id="sp_default_key" value="<?php echo esc_attr( $post->post_name ); ?>">
|
||||
<input name="sp_key" type="text" id="sp_key" value="<?php echo esc_attr( $post->post_name ); ?>"
|
||||
@@ -52,31 +52,31 @@ class SP_Meta_Box_Outcome_Details extends SP_Meta_Box_Config {
|
||||
?>
|
||||
readonly="readonly"<?php } ?>>
|
||||
</p>
|
||||
<p><strong><?php _e( 'Abbreviation', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Abbreviation', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<input name="sp_abbreviation" type="text" id="sp_abbreviation" value="<?php echo esc_attr( $abbreviation ); ?>" placeholder="<?php echo esc_attr( sp_substr( $post->post_title, 0, 1 ) ); ?>">
|
||||
</p>
|
||||
<p><strong><?php _e( 'Color', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Color', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<div class="sp-color-box">
|
||||
<input name="sp_color" id="sp_color" type="text" value="<?php echo esc_attr( $color ); ?>" class="colorpick">
|
||||
<div id="sp_color" class="colorpickdiv"></div>
|
||||
</div>
|
||||
</p>
|
||||
<p><strong><?php _e( 'Condition', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Condition', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<select name="sp_condition">
|
||||
<?php
|
||||
$options = array(
|
||||
'0' => '—',
|
||||
'>' => sprintf( __( 'Most %s', 'sportspress' ), $label ),
|
||||
'<' => sprintf( __( 'Least %s', 'sportspress' ), $label ),
|
||||
'=' => sprintf( __( 'Equal %s', 'sportspress' ), $label ),
|
||||
'else' => sprintf( __( 'Default', 'sportspress' ), $label ),
|
||||
'>' => sprintf( esc_attr__( 'Most %s', 'sportspress' ), $label ),
|
||||
'<' => sprintf( esc_attr__( 'Least %s', 'sportspress' ), $label ),
|
||||
'=' => sprintf( esc_attr__( 'Equal %s', 'sportspress' ), $label ),
|
||||
'else' => sprintf( esc_attr__( 'Default', 'sportspress' ), $label ),
|
||||
);
|
||||
|
||||
foreach ( $options as $key => $value ) :
|
||||
printf( '<option value="%s" %s>%s</option>', $key, selected( true, $key == $condition, false ), $value );
|
||||
printf( '<option value="%s" %s>%s</option>', esc_attr( $key ), selected( true, $key == $condition, false ), esc_attr( $value ) );
|
||||
endforeach;
|
||||
?>
|
||||
</select>
|
||||
|
||||
@@ -56,7 +56,7 @@ class SP_Meta_Box_Performance_Details extends SP_Meta_Box_Config {
|
||||
$sendoff = false;
|
||||
}
|
||||
?>
|
||||
<p><strong><?php _e( 'Variable', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Variable', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<input name="sp_default_key" type="hidden" id="sp_default_key" value="<?php echo esc_attr( $post->post_name ); ?>">
|
||||
<input name="sp_key" type="text" id="sp_key" value="<?php echo esc_attr( $post->post_name ); ?>"
|
||||
@@ -65,96 +65,96 @@ class SP_Meta_Box_Performance_Details extends SP_Meta_Box_Config {
|
||||
?>
|
||||
readonly="readonly"<?php } ?>>
|
||||
</p>
|
||||
<p><strong><?php _e( 'Singular', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Singular', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<input name="sp_singular" type="text" id="sp_singular" placeholder="<?php echo esc_attr( $post->post_title ); ?>" value="<?php echo esc_attr( $singular ); ?>">
|
||||
</p>
|
||||
<p><strong><?php _e( 'Category', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Category', 'sportspress' ); ?></strong></p>
|
||||
<p class="sp-section-selector">
|
||||
<select name="sp_section">
|
||||
<?php
|
||||
$options = apply_filters(
|
||||
'sportspress_performance_sections',
|
||||
array(
|
||||
-1 => __( 'All', 'sportspress' ),
|
||||
0 => __( 'Offense', 'sportspress' ),
|
||||
1 => __(
|
||||
-1 => esc_attr__( 'All', 'sportspress' ),
|
||||
0 => esc_attr__( 'Offense', 'sportspress' ),
|
||||
1 => esc_attr__(
|
||||
'Defense',
|
||||
'sportspress'
|
||||
),
|
||||
)
|
||||
);
|
||||
foreach ( $options as $key => $value ) :
|
||||
printf( '<option value="%s" %s>%s</option>', $key, selected( $key == $section, true, false ), $value );
|
||||
printf( '<option value="%s" %s>%s</option>', esc_attr( $key ), selected( $key == $section, true, false ), esc_attr( $value ) );
|
||||
endforeach;
|
||||
?>
|
||||
</select>
|
||||
</p>
|
||||
<p><strong><?php _e( 'Format', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Format', 'sportspress' ); ?></strong></p>
|
||||
<p class="sp-format-selector">
|
||||
<select name="sp_format">
|
||||
<?php
|
||||
$options = apply_filters(
|
||||
'sportspress_performance_formats',
|
||||
array(
|
||||
'number' => __( 'Number', 'sportspress' ),
|
||||
'time' => __( 'Time', 'sportspress' ),
|
||||
'text' => __( 'Text', 'sportspress' ),
|
||||
'equation' => __( 'Equation', 'sportspress' ),
|
||||
'checkbox' => __(
|
||||
'number' => esc_attr__( 'Number', 'sportspress' ),
|
||||
'time' => esc_attr__( 'Time', 'sportspress' ),
|
||||
'text' => esc_attr__( 'Text', 'sportspress' ),
|
||||
'equation' => esc_attr__( 'Equation', 'sportspress' ),
|
||||
'checkbox' => esc_attr__(
|
||||
'Checkbox',
|
||||
'sportspress'
|
||||
),
|
||||
)
|
||||
);
|
||||
foreach ( $options as $key => $value ) :
|
||||
printf( '<option value="%s" %s>%s</option>', $key, selected( $key == $format, true, false ), $value );
|
||||
printf( '<option value="%s" %s>%s</option>', esc_attr( $key ), selected( $key == $format, true, false ), esc_attr( $value ) );
|
||||
endforeach;
|
||||
?>
|
||||
</select>
|
||||
</p>
|
||||
<div id="sp_precisiondiv">
|
||||
<p><strong><?php _e( 'Decimal Places', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Decimal Places', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<input name="sp_precision" type="text" size="4" id="sp_precision" value="<?php echo esc_attr( $precision ); ?>" placeholder="0">
|
||||
</p>
|
||||
</div>
|
||||
<div id="sp_timeddiv">
|
||||
<p>
|
||||
<strong><?php _e( 'Timed', 'sportspress' ); ?></strong>
|
||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php _e( 'Record minutes?', 'sportspress' ); ?>"></i>
|
||||
<strong><?php esc_attr_e( 'Timed', 'sportspress' ); ?></strong>
|
||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php esc_attr_e( 'Record minutes?', 'sportspress' ); ?>"></i>
|
||||
</p>
|
||||
<ul class="sp-timed-selector">
|
||||
<li>
|
||||
<label class="selectit">
|
||||
<input name="sp_timed" id="sp_timed_yes" type="radio" value="1" <?php checked( $timed ); ?>>
|
||||
<?php _e( 'Yes', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Yes', 'sportspress' ); ?>
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label class="selectit">
|
||||
<input name="sp_timed" id="sp_timed_no" type="radio" value="0" <?php checked( ! $timed ); ?>>
|
||||
<?php _e( 'No', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'No', 'sportspress' ); ?>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="sp_sendoffdiv">
|
||||
<p>
|
||||
<strong><?php _e( 'Send Off', 'sportspress' ); ?></strong>
|
||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php _e( "Don't count minutes after?", 'sportspress' ); ?>"></i>
|
||||
<strong><?php esc_attr_e( 'Send Off', 'sportspress' ); ?></strong>
|
||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php esc_attr_e( "Don't count minutes after?", 'sportspress' ); ?>"></i>
|
||||
</p>
|
||||
<ul class="sp-sendoff-selector">
|
||||
<li>
|
||||
<label class="selectit">
|
||||
<input name="sp_sendoff" id="sp_sendoff_yes" type="radio" value="1" <?php checked( $sendoff ); ?>>
|
||||
<?php _e( 'Yes', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Yes', 'sportspress' ); ?>
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label class="selectit">
|
||||
<input name="sp_sendoff" id="sp_sendoff_no" type="radio" value="0" <?php checked( ! $sendoff ); ?>>
|
||||
<?php _e( 'No', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'No', 'sportspress' ); ?>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -167,20 +167,20 @@ class SP_Meta_Box_Performance_Details extends SP_Meta_Box_Config {
|
||||
}
|
||||
?>
|
||||
<p>
|
||||
<strong><?php _e( 'Visible', 'sportspress' ); ?></strong>
|
||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php _e( 'Display in player profile?', 'sportspress' ); ?>"></i>
|
||||
<strong><?php esc_attr_e( 'Visible', 'sportspress' ); ?></strong>
|
||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php esc_attr_e( 'Display in player profile?', 'sportspress' ); ?>"></i>
|
||||
</p>
|
||||
<ul class="sp-visible-selector">
|
||||
<li>
|
||||
<label class="selectit">
|
||||
<input name="sp_visible" id="sp_visible_yes" type="radio" value="1" <?php checked( $visible ); ?>>
|
||||
<?php _e( 'Yes', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Yes', 'sportspress' ); ?>
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label class="selectit">
|
||||
<input name="sp_visible" id="sp_visible_no" type="radio" value="0" <?php checked( ! $visible ); ?>>
|
||||
<?php _e( 'No', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'No', 'sportspress' ); ?>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -83,11 +83,11 @@ class SP_Meta_Box_Player_Details {
|
||||
$current_teams = array_filter( get_post_meta( $post->ID, 'sp_current_team', false ) );
|
||||
?>
|
||||
|
||||
<p><strong><?php _e( 'Squad Number', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Squad Number', 'sportspress' ); ?></strong></p>
|
||||
<p><input type="text" size="4" id="sp_number" name="sp_number" value="<?php echo esc_attr( $number ); ?>"></p>
|
||||
|
||||
<p><strong><?php _e( 'Nationality', 'sportspress' ); ?></strong></p>
|
||||
<p><select id="sp_nationality" name="sp_nationality[]" data-placeholder="<?php printf( __( 'Select %s', 'sportspress' ), __( 'Nationality', 'sportspress' ) ); ?>" class="widefat chosen-select
|
||||
<p><strong><?php esc_attr_e( 'Nationality', 'sportspress' ); ?></strong></p>
|
||||
<p><select id="sp_nationality" name="sp_nationality[]" data-placeholder="<?php printf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Nationality', 'sportspress' ) ); ?>" class="widefat chosen-select
|
||||
<?php
|
||||
if ( is_rtl() ) :
|
||||
?>
|
||||
@@ -103,7 +103,7 @@ class SP_Meta_Box_Player_Details {
|
||||
</select></p>
|
||||
|
||||
<?php if ( taxonomy_exists( 'sp_position' ) ) { ?>
|
||||
<p><strong><?php _e( 'Positions', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Positions', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<?php
|
||||
$args = array(
|
||||
@@ -111,7 +111,7 @@ class SP_Meta_Box_Player_Details {
|
||||
'name' => 'tax_input[sp_position][]',
|
||||
'selected' => $position_ids,
|
||||
'values' => 'term_id',
|
||||
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Positions', 'sportspress' ) ),
|
||||
'placeholder' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Positions', 'sportspress' ) ),
|
||||
'class' => 'widefat',
|
||||
'property' => 'multiple',
|
||||
'chosen' => true,
|
||||
@@ -121,7 +121,7 @@ class SP_Meta_Box_Player_Details {
|
||||
</p>
|
||||
<?php } ?>
|
||||
|
||||
<p><strong><?php _e( 'Current Teams', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Current Teams', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<?php
|
||||
$args = array(
|
||||
@@ -129,7 +129,7 @@ class SP_Meta_Box_Player_Details {
|
||||
'name' => 'sp_current_team[]',
|
||||
'selected' => $current_teams,
|
||||
'values' => 'ID',
|
||||
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Teams', 'sportspress' ) ),
|
||||
'placeholder' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Teams', 'sportspress' ) ),
|
||||
'class' => 'sp-current-teams widefat',
|
||||
'property' => 'multiple',
|
||||
'chosen' => true,
|
||||
@@ -138,7 +138,7 @@ class SP_Meta_Box_Player_Details {
|
||||
?>
|
||||
</p>
|
||||
|
||||
<p><strong><?php _e( 'Past Teams', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Past Teams', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<?php
|
||||
$args = array(
|
||||
@@ -146,7 +146,7 @@ class SP_Meta_Box_Player_Details {
|
||||
'name' => 'sp_past_team[]',
|
||||
'selected' => $past_teams,
|
||||
'values' => 'ID',
|
||||
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Teams', 'sportspress' ) ),
|
||||
'placeholder' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Teams', 'sportspress' ) ),
|
||||
'class' => 'sp-past-teams widefat',
|
||||
'property' => 'multiple',
|
||||
'chosen' => true,
|
||||
@@ -156,7 +156,7 @@ class SP_Meta_Box_Player_Details {
|
||||
</p>
|
||||
|
||||
<?php if ( taxonomy_exists( 'sp_league' ) ) { ?>
|
||||
<p><strong><?php _e( 'Leagues', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Leagues', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<?php
|
||||
$args = array(
|
||||
@@ -164,7 +164,7 @@ class SP_Meta_Box_Player_Details {
|
||||
'name' => 'tax_input[sp_league][]',
|
||||
'selected' => $league_ids,
|
||||
'values' => 'term_id',
|
||||
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Leagues', 'sportspress' ) ),
|
||||
'placeholder' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Leagues', 'sportspress' ) ),
|
||||
'class' => 'widefat',
|
||||
'property' => 'multiple',
|
||||
'chosen' => true,
|
||||
@@ -175,7 +175,7 @@ class SP_Meta_Box_Player_Details {
|
||||
<?php } ?>
|
||||
|
||||
<?php if ( taxonomy_exists( 'sp_season' ) ) { ?>
|
||||
<p><strong><?php _e( 'Seasons', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Seasons', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<?php
|
||||
$args = array(
|
||||
@@ -183,7 +183,7 @@ class SP_Meta_Box_Player_Details {
|
||||
'name' => 'tax_input[sp_season][]',
|
||||
'selected' => $season_ids,
|
||||
'values' => 'term_id',
|
||||
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Seasons', 'sportspress' ) ),
|
||||
'placeholder' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Seasons', 'sportspress' ) ),
|
||||
'class' => 'widefat',
|
||||
'property' => 'multiple',
|
||||
'chosen' => true,
|
||||
|
||||
@@ -42,7 +42,7 @@ class SP_Meta_Box_Player_Metrics {
|
||||
<?php
|
||||
endforeach;
|
||||
else :
|
||||
sp_post_adder( 'sp_metric', __( 'Add New', 'sportspress' ) );
|
||||
sp_post_adder( 'sp_metric', esc_attr__( 'Add New', 'sportspress' ) );
|
||||
endif;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,14 +23,14 @@ class SP_Meta_Box_Player_Shortcode {
|
||||
public static function output( $post ) {
|
||||
?>
|
||||
<p class="howto">
|
||||
<?php _e( 'Copy this code and paste it into your post, page or text widget content.', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Copy this code and paste it into your post, page or text widget content.', 'sportspress' ); ?>
|
||||
</p>
|
||||
<p>
|
||||
<strong><?php _e( 'Details', 'sportspress' ); ?></strong>
|
||||
<strong><?php esc_attr_e( 'Details', 'sportspress' ); ?></strong>
|
||||
</p>
|
||||
<p><input type="text" value="<?php sp_shortcode_template( 'player_details', $post->ID ); ?>" readonly="readonly" class="code widefat"></p>
|
||||
<p>
|
||||
<strong><?php _e( 'Statistics', 'sportspress' ); ?></strong>
|
||||
<strong><?php esc_attr_e( 'Statistics', 'sportspress' ); ?></strong>
|
||||
</p>
|
||||
<p><input type="text" value="<?php sp_shortcode_template( 'player_statistics', $post->ID ); ?>" readonly="readonly" class="code widefat"></p>
|
||||
<?php
|
||||
|
||||
@@ -45,7 +45,7 @@ class SP_Meta_Box_Player_Statistics {
|
||||
endforeach;
|
||||
if ( $show_career_totals ) {
|
||||
?>
|
||||
<p><strong><?php _e( 'Career Total', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Career Total', 'sportspress' ); ?></strong></p>
|
||||
<?php
|
||||
list( $columns, $data, $placeholders, $merged, $seasons_teams, $has_checkboxes, $formats, $total_types ) = $player->data( 0, true );
|
||||
self::table( $post->ID, 0, $columns, $data, $placeholders, $merged, $seasons_teams, false, false, $formats, $total_types );
|
||||
@@ -54,11 +54,11 @@ class SP_Meta_Box_Player_Statistics {
|
||||
// Determine order of sections
|
||||
if ( 1 == $sections ) {
|
||||
$section_order = array(
|
||||
1 => __( 'Defense', 'sportspress' ),
|
||||
0 => __( 'Offense', 'sportspress' ),
|
||||
1 => esc_attr__( 'Defense', 'sportspress' ),
|
||||
0 => esc_attr__( 'Offense', 'sportspress' ),
|
||||
);
|
||||
} else {
|
||||
$section_order = array( __( 'Offense', 'sportspress' ), __( 'Defense', 'sportspress' ) );
|
||||
$section_order = array( esc_attr__( 'Offense', 'sportspress' ), esc_attr__( 'Defense', 'sportspress' ) );
|
||||
}
|
||||
|
||||
$s = 0;
|
||||
@@ -75,7 +75,7 @@ class SP_Meta_Box_Player_Statistics {
|
||||
endforeach;
|
||||
if ( $show_career_totals ) {
|
||||
?>
|
||||
<p><strong><?php _e( 'Career Total', 'sportspress' ); ?> — <?php echo esc_html( $section_label ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Career Total', 'sportspress' ); ?> — <?php echo esc_html( $section_label ); ?></strong></p>
|
||||
<?php
|
||||
list( $columns, $data, $placeholders, $merged, $seasons_teams, $has_checkboxes, $formats, $total_types ) = $player->data( 0, true, $section_id );
|
||||
self::table( $post->ID, 0, $columns, $data, $placeholders, $merged, $seasons_teams, $has_checkboxes && $i == 0 && $s == 0, $s == 0, $formats, $total_types );
|
||||
@@ -113,10 +113,10 @@ class SP_Meta_Box_Player_Statistics {
|
||||
<table class="widefat sp-data-table sp-player-statistics-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php _e( 'Season', 'sportspress' ); ?></th>
|
||||
<th><?php esc_attr_e( 'Season', 'sportspress' ); ?></th>
|
||||
<?php if ( $team_select && apply_filters( 'sportspress_player_team_statistics', $league_id ) ) : ?>
|
||||
<th>
|
||||
<?php _e( 'Team', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Team', 'sportspress' ); ?>
|
||||
</th>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
@@ -133,7 +133,7 @@ class SP_Meta_Box_Player_Statistics {
|
||||
<?php $div_stats = sp_array_value( $data, 0, array() ); ?>
|
||||
<tr class="sp-row sp-total">
|
||||
<td>
|
||||
<label><strong><?php _e( 'Total', 'sportspress' ); ?></strong></label>
|
||||
<label><strong><?php esc_attr_e( 'Total', 'sportspress' ); ?></strong></label>
|
||||
</td>
|
||||
<?php if ( $team_select && apply_filters( 'sportspress_player_team_statistics', $league_id ) ) { ?>
|
||||
<td> </td>
|
||||
@@ -158,10 +158,10 @@ class SP_Meta_Box_Player_Statistics {
|
||||
echo $value ? esc_html( $value ) : esc_html( $placeholder );
|
||||
} else {
|
||||
if ( 'time' === sp_array_value( $formats, $column, 'number' ) ) {
|
||||
echo '<input class="sp-convert-time-input" type="text" name="sp_times[' . $league_id . '][0][' . $column . ']" value="' . ( '' === $value ? '' : esc_attr( $timeval ) ) . '" placeholder="' . esc_attr( $placeholder ) . '"' . ( $readonly ? ' disabled="disabled"' : '' ) . ' />';
|
||||
echo '<input class="sp-convert-time-output" type="hidden" name="sp_statistics[' . $league_id . '][0][' . $column . ']" value="' . esc_attr( $value ) . '" data-sp-format="' . sp_array_value( $formats, $column, 'number' ) . '" data-sp-total-type="' . sp_array_value( $total_types, $column, 'total' ) . '" />';
|
||||
echo '<input class="sp-convert-time-input" type="text" name="sp_times[' . esc_attr( $league_id ) . '][0][' . esc_attr( $column ) . ']" value="' . ( '' === $value ? '' : esc_attr( $timeval ) ) . '" placeholder="' . esc_attr( $placeholder ) . '"' . ( $readonly ? ' disabled="disabled"' : '' ) . ' />'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
echo '<input class="sp-convert-time-output" type="hidden" name="sp_statistics[' . esc_attr( $league_id ) . '][0][' . esc_attr( $column ) . ']" value="' . esc_attr( $value ) . '" data-sp-format="' . esc_attr( sp_array_value( $formats, $column, 'number' ) ) . '" data-sp-total-type="' . esc_attr( sp_array_value( $total_types, $column, 'total' ) ) . '" />';
|
||||
} else {
|
||||
echo '<input type="text" name="sp_statistics[' . $league_id . '][0][' . $column . ']" value="' . esc_attr( $value ) . '" placeholder="' . esc_attr( $placeholder ) . '"' . ( $readonly ? ' disabled="disabled"' : '' ) . ' data-sp-format="' . sp_array_value( $formats, $column, 'number' ) . '" data-sp-total-type="' . sp_array_value( $total_types, $column, 'total' ) . '" />';
|
||||
echo '<input type="text" name="sp_statistics[' . esc_attr( $league_id ) . '][0][' . esc_attr( $column ) . ']" value="' . esc_attr( $value ) . '" placeholder="' . esc_attr( $placeholder ) . '"' . ( $readonly ? ' disabled="disabled"' : '' ) . ' data-sp-format="' . esc_attr( sp_array_value( $formats, $column, 'number' ) ) . '" data-sp-total-type="' . esc_attr( sp_array_value( $total_types, $column, 'total' ) ) . '" />';
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -187,7 +187,7 @@ class SP_Meta_Box_Player_Statistics {
|
||||
if ( $i % 2 == 0 ) {
|
||||
echo ' alternate';}
|
||||
?>
|
||||
<?php echo implode( ' ', apply_filters( 'sportspress_meta_box_player_statistics_row_classes', array(), $league_id, $div_id ) ); ?>" data-league="<?php echo (int) $league_id; ?>" data-season="<?php echo (int) $div_id; ?>">
|
||||
<?php echo esc_attr( implode( ' ', apply_filters( 'sportspress_meta_box_player_statistics_row_classes', array(), $league_id, $div_id ) ) ); ?>" data-league="<?php echo (int) $league_id; ?>" data-season="<?php echo (int) $div_id; ?>">
|
||||
<td>
|
||||
<label>
|
||||
<?php if ( ! apply_filters( 'sportspress_player_team_statistics', $league_id ) ) : ?>
|
||||
@@ -197,9 +197,9 @@ class SP_Meta_Box_Player_Statistics {
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if ( 0 === $div_id ) {
|
||||
_e( 'Total', 'sportspress' );
|
||||
esc_attr_e( 'Total', 'sportspress' );
|
||||
} elseif ( 'WP_Error' != get_class( $div ) ) {
|
||||
echo apply_filters( 'sportspress_meta_box_player_statistics_season_name', $div->name, $league_id, $div_id, $div_stats );
|
||||
echo esc_attr( apply_filters( 'sportspress_meta_box_player_statistics_season_name', $div->name, $league_id, $div_id, $div_stats ) );
|
||||
}
|
||||
?>
|
||||
</label>
|
||||
@@ -214,7 +214,7 @@ class SP_Meta_Box_Player_Statistics {
|
||||
$args = array(
|
||||
'post_type' => 'sp_team',
|
||||
'name' => 'sp_leagues[' . $league_id . '][' . $div_id . ']',
|
||||
'show_option_none' => __( '— None —', 'sportspress' ),
|
||||
'show_option_none' => esc_attr__( '— None —', 'sportspress' ),
|
||||
'sort_order' => 'ASC',
|
||||
'sort_column' => 'menu_order',
|
||||
'selected' => $value,
|
||||
@@ -235,7 +235,7 @@ class SP_Meta_Box_Player_Statistics {
|
||||
),
|
||||
);
|
||||
if ( ! sp_dropdown_pages( $args ) ) :
|
||||
_e( '— None —', 'sportspress' );
|
||||
esc_attr_e( '— None —', 'sportspress' );
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
@@ -275,10 +275,10 @@ class SP_Meta_Box_Player_Statistics {
|
||||
echo $timeval ? esc_html( $timeval ) : esc_html( $placeholder );
|
||||
} else {
|
||||
if ( 'time' === sp_array_value( $formats, $column, 'number' ) ) {
|
||||
echo '<input class="sp-convert-time-input" type="text" name="sp_times[' . $league_id . '][' . $div_id . '][' . $column . ']" value="' . ( '' === $value ? '' : esc_attr( $timeval ) ) . '" placeholder="' . esc_attr( $placeholder ) . '"' . ( $readonly ? ' disabled="disabled"' : '' ) . ' data-column="' . $column . '" />';
|
||||
echo '<input class="sp-convert-time-output" type="hidden" name="sp_statistics[' . $league_id . '][' . $div_id . '][' . $column . ']" value="' . esc_attr( $value ) . '" />';
|
||||
echo '<input class="sp-convert-time-input" type="text" name="sp_times[' . esc_attr( $league_id ) . '][' . esc_attr( $div_id ) . '][' . esc_attr( $column ) . ']" value="' . ( '' === $value ? '' : esc_attr( $timeval ) ) . '" placeholder="' . esc_attr( $placeholder ) . '"' . ( $readonly ? ' disabled="disabled"' : '' ) . ' data-column="' . esc_attr( $column ) . '" />'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
echo '<input class="sp-convert-time-output" type="hidden" name="sp_statistics[' . esc_attr( $league_id ) . '][' . esc_attr( $div_id ) . '][' . esc_attr( $column ) . ']" value="' . esc_attr( $value ) . '" />';
|
||||
} else {
|
||||
echo '<input type="text" name="sp_statistics[' . $league_id . '][' . $div_id . '][' . $column . ']" value="' . esc_attr( $value ) . '" placeholder="' . esc_attr( $placeholder ) . '"' . ( $readonly ? ' disabled="disabled"' : '' ) . ' data-column="' . $column . '" />';
|
||||
echo '<input type="text" name="sp_statistics[' . esc_attr( $league_id ) . '][' . esc_attr( $div_id ) . '][' . esc_attr( $column ) . ']" value="' . esc_attr( $value ) . '" placeholder="' . esc_attr( $placeholder ) . '"' . ( $readonly ? ' disabled="disabled"' : '' ) . ' data-column="' . esc_attr( $column ) . '" />';
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -34,7 +34,7 @@ class SP_Meta_Box_Result_Details extends SP_Meta_Box_Config {
|
||||
$readonly = false;
|
||||
}
|
||||
?>
|
||||
<p><strong><?php _e( 'Variable', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Variable', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<input name="sp_default_key" type="hidden" id="sp_default_key" value="<?php echo esc_attr( $post->post_name ); ?>">
|
||||
<input name="sp_key" type="text" id="sp_key" value="<?php echo esc_attr( $post->post_name ); ?>"
|
||||
@@ -43,7 +43,7 @@ class SP_Meta_Box_Result_Details extends SP_Meta_Box_Config {
|
||||
?>
|
||||
readonly="readonly"<?php } ?>> <span class="description">(for, against)</span>
|
||||
</p>
|
||||
<p><strong><?php _e( 'Decimal Places', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Decimal Places', 'sportspress' ); ?></strong></p>
|
||||
<p class="sp-precision-selector">
|
||||
<input name="sp_precision" type="text" size="4" id="sp_precision" value="<?php echo esc_attr( $precision ); ?>" placeholder="0">
|
||||
</p>
|
||||
|
||||
@@ -31,26 +31,26 @@ class SP_Meta_Box_Spec_Details extends SP_Meta_Box_Config {
|
||||
$visible = 1;
|
||||
}
|
||||
?>
|
||||
<p><strong><?php _e( 'Variable', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Variable', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<input name="sp_default_key" type="hidden" id="sp_default_key" value="<?php echo esc_attr( $post->post_name ); ?>">
|
||||
<input name="sp_key" type="text" id="sp_key" value="<?php echo esc_attr( $post->post_name ); ?>">
|
||||
</p>
|
||||
<p>
|
||||
<strong><?php _e( 'Visible', 'sportspress' ); ?></strong>
|
||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php _e( 'Display in event pages?', 'sportspress' ); ?>"></i>
|
||||
<strong><?php esc_attr_e( 'Visible', 'sportspress' ); ?></strong>
|
||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php esc_attr_e( 'Display in event pages?', 'sportspress' ); ?>"></i>
|
||||
</p>
|
||||
<ul class="sp-visible-selector">
|
||||
<li>
|
||||
<label class="selectit">
|
||||
<input name="sp_visible" id="sp_visible_yes" type="radio" value="1" <?php checked( $visible ); ?>>
|
||||
<?php _e( 'Yes', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Yes', 'sportspress' ); ?>
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label class="selectit">
|
||||
<input name="sp_visible" id="sp_visible_no" type="radio" value="0" <?php checked( ! $visible ); ?>>
|
||||
<?php _e( 'No', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'No', 'sportspress' ); ?>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -62,7 +62,7 @@ class SP_Meta_Box_Staff_Details {
|
||||
$past_teams = array_filter( get_post_meta( $post->ID, 'sp_past_team', false ) );
|
||||
$current_teams = array_filter( get_post_meta( $post->ID, 'sp_current_team', false ) );
|
||||
?>
|
||||
<p><strong><?php _e( 'Jobs', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Jobs', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<?php
|
||||
$args = array(
|
||||
@@ -70,19 +70,19 @@ class SP_Meta_Box_Staff_Details {
|
||||
'name' => 'tax_input[sp_role][]',
|
||||
'selected' => $role_ids,
|
||||
'values' => 'term_id',
|
||||
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Jobs', 'sportspress' ) ),
|
||||
'placeholder' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Jobs', 'sportspress' ) ),
|
||||
'class' => 'widefat',
|
||||
'property' => 'multiple',
|
||||
'chosen' => true,
|
||||
);
|
||||
if ( ! sp_dropdown_taxonomies( $args ) ) :
|
||||
sp_taxonomy_adder( 'sp_role', 'sp_staff', __( 'Add New', 'sportspress' ) );
|
||||
sp_taxonomy_adder( 'sp_role', 'sp_staff', esc_attr__( 'Add New', 'sportspress' ) );
|
||||
endif;
|
||||
?>
|
||||
</p>
|
||||
|
||||
<p><strong><?php _e( 'Nationality', 'sportspress' ); ?></strong></p>
|
||||
<p><select id="sp_nationality" name="sp_nationality[]" data-placeholder="<?php printf( __( 'Select %s', 'sportspress' ), __( 'Nationality', 'sportspress' ) ); ?>" class="widefat chosen-select
|
||||
<p><strong><?php esc_attr_e( 'Nationality', 'sportspress' ); ?></strong></p>
|
||||
<p><select id="sp_nationality" name="sp_nationality[]" data-placeholder="<?php printf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Nationality', 'sportspress' ) ); ?>" class="widefat chosen-select
|
||||
<?php
|
||||
if ( is_rtl() ) :
|
||||
?>
|
||||
@@ -97,7 +97,7 @@ class SP_Meta_Box_Staff_Details {
|
||||
<?php endforeach; ?>
|
||||
</select></p>
|
||||
|
||||
<p><strong><?php _e( 'Current Teams', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Current Teams', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<?php
|
||||
$args = array(
|
||||
@@ -105,7 +105,7 @@ class SP_Meta_Box_Staff_Details {
|
||||
'name' => 'sp_current_team[]',
|
||||
'selected' => $current_teams,
|
||||
'values' => 'ID',
|
||||
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Teams', 'sportspress' ) ),
|
||||
'placeholder' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Teams', 'sportspress' ) ),
|
||||
'class' => 'sp-current-teams widefat',
|
||||
'property' => 'multiple',
|
||||
'chosen' => true,
|
||||
@@ -114,7 +114,7 @@ class SP_Meta_Box_Staff_Details {
|
||||
?>
|
||||
</p>
|
||||
|
||||
<p><strong><?php _e( 'Past Teams', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Past Teams', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<?php
|
||||
$args = array(
|
||||
@@ -122,7 +122,7 @@ class SP_Meta_Box_Staff_Details {
|
||||
'name' => 'sp_past_team[]',
|
||||
'selected' => $past_teams,
|
||||
'values' => 'ID',
|
||||
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Teams', 'sportspress' ) ),
|
||||
'placeholder' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Teams', 'sportspress' ) ),
|
||||
'class' => 'sp-past-teams widefat',
|
||||
'property' => 'multiple',
|
||||
'chosen' => true,
|
||||
@@ -131,7 +131,7 @@ class SP_Meta_Box_Staff_Details {
|
||||
?>
|
||||
</p>
|
||||
|
||||
<p><strong><?php _e( 'Leagues', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Leagues', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<?php
|
||||
$args = array(
|
||||
@@ -139,7 +139,7 @@ class SP_Meta_Box_Staff_Details {
|
||||
'name' => 'tax_input[sp_league][]',
|
||||
'selected' => $league_ids,
|
||||
'values' => 'term_id',
|
||||
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Leagues', 'sportspress' ) ),
|
||||
'placeholder' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Leagues', 'sportspress' ) ),
|
||||
'class' => 'widefat',
|
||||
'property' => 'multiple',
|
||||
'chosen' => true,
|
||||
@@ -148,7 +148,7 @@ class SP_Meta_Box_Staff_Details {
|
||||
?>
|
||||
</p>
|
||||
|
||||
<p><strong><?php _e( 'Seasons', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Seasons', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<?php
|
||||
$args = array(
|
||||
@@ -156,7 +156,7 @@ class SP_Meta_Box_Staff_Details {
|
||||
'name' => 'tax_input[sp_season][]',
|
||||
'selected' => $season_ids,
|
||||
'values' => 'term_id',
|
||||
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Seasons', 'sportspress' ) ),
|
||||
'placeholder' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Seasons', 'sportspress' ) ),
|
||||
'class' => 'widefat',
|
||||
'property' => 'multiple',
|
||||
'chosen' => true,
|
||||
|
||||
@@ -23,7 +23,7 @@ class SP_Meta_Box_Staff_Shortcode {
|
||||
public static function output( $post ) {
|
||||
?>
|
||||
<p class="howto">
|
||||
<?php _e( 'Copy this code and paste it into your post, page or text widget content.', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Copy this code and paste it into your post, page or text widget content.', 'sportspress' ); ?>
|
||||
</p>
|
||||
<p><input type="text" value="<?php sp_shortcode_template( 'staff_profile', $post->ID ); ?>" readonly="readonly" class="code widefat"></p>
|
||||
<?php
|
||||
|
||||
@@ -46,91 +46,91 @@ class SP_Meta_Box_Statistic_Details extends SP_Meta_Box_Config {
|
||||
$visible = 1;
|
||||
}
|
||||
?>
|
||||
<p><strong><?php _e( 'Key', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Key', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<input name="sp_default_key" type="hidden" id="sp_default_key" value="<?php echo esc_attr( $post->post_name ); ?>">
|
||||
<input name="sp_key" type="text" id="sp_key" value="<?php echo esc_attr( $post->post_name ); ?>">
|
||||
</p>
|
||||
<p><strong><?php _e( 'Decimal Places', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Decimal Places', 'sportspress' ); ?></strong></p>
|
||||
<p class="sp-precision-selector">
|
||||
<input name="sp_precision" type="text" size="4" id="sp_precision" value="<?php echo esc_attr( $precision ); ?>" placeholder="0">
|
||||
</p>
|
||||
<p><strong><?php _e( 'Category', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Category', 'sportspress' ); ?></strong></p>
|
||||
<p class="sp-section-selector">
|
||||
<select name="sp_section">
|
||||
<?php
|
||||
$options = apply_filters(
|
||||
'sportspress_performance_sections',
|
||||
array(
|
||||
-1 => __( 'All', 'sportspress' ),
|
||||
0 => __( 'Offense', 'sportspress' ),
|
||||
1 => __(
|
||||
-1 => esc_attr__( 'All', 'sportspress' ),
|
||||
0 => esc_attr__( 'Offense', 'sportspress' ),
|
||||
1 => esc_attr__(
|
||||
'Defense',
|
||||
'sportspress'
|
||||
),
|
||||
)
|
||||
);
|
||||
foreach ( $options as $key => $value ) :
|
||||
printf( '<option value="%s" %s>%s</option>', $key, selected( $key == $section, true, false ), $value );
|
||||
printf( '<option value="%s" %s>%s</option>', esc_attr( $key ), selected( $key == $section, true, false ), esc_attr( $value ) );
|
||||
endforeach;
|
||||
?>
|
||||
</select>
|
||||
</p>
|
||||
<p><strong><?php _e( 'Format', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Format', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<select name="sp_format">
|
||||
<?php
|
||||
$options = apply_filters(
|
||||
'sportspress_statistic_formats',
|
||||
array(
|
||||
'number' => __( 'Number', 'sportspress' ),
|
||||
'time' => __(
|
||||
'number' => esc_attr__( 'Number', 'sportspress' ),
|
||||
'time' => esc_attr__(
|
||||
'Time',
|
||||
'sportspress'
|
||||
),
|
||||
)
|
||||
);
|
||||
foreach ( $options as $key => $value ) :
|
||||
printf( '<option value="%s" %s>%s</option>', $key, selected( $key == $format, true, false ), $value );
|
||||
printf( '<option value="%s" %s>%s</option>', esc_attr( $key ), selected( $key == $format, true, false ), esc_attr( $value ) );
|
||||
endforeach;
|
||||
?>
|
||||
</select>
|
||||
</p>
|
||||
<p><strong><?php _e( 'Type', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Type', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<select name="sp_type">
|
||||
<?php
|
||||
$options = apply_filters(
|
||||
'sportspress_statistic_total_types',
|
||||
array(
|
||||
'total' => __( 'Total', 'sportspress' ),
|
||||
'average' => __(
|
||||
'total' => esc_attr__( 'Total', 'sportspress' ),
|
||||
'average' => esc_attr__(
|
||||
'Average',
|
||||
'sportspress'
|
||||
),
|
||||
)
|
||||
);
|
||||
foreach ( $options as $key => $value ) :
|
||||
printf( '<option value="%s" %s>%s</option>', $key, selected( $key == $total, true, false ), $value );
|
||||
printf( '<option value="%s" %s>%s</option>', esc_attr( $key ), selected( $key == $total, true, false ), esc_attr( $value ) );
|
||||
endforeach;
|
||||
?>
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<strong><?php _e( 'Visible', 'sportspress' ); ?></strong>
|
||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php _e( 'Display in player profile?', 'sportspress' ); ?>"></i>
|
||||
<strong><?php esc_attr_e( 'Visible', 'sportspress' ); ?></strong>
|
||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php esc_attr_e( 'Display in player profile?', 'sportspress' ); ?>"></i>
|
||||
</p>
|
||||
<ul class="sp-visible-selector">
|
||||
<li>
|
||||
<label class="selectit">
|
||||
<input name="sp_visible" id="sp_visible_yes" type="radio" value="1" <?php checked( $visible ); ?>>
|
||||
<?php _e( 'Yes', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Yes', 'sportspress' ); ?>
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label class="selectit">
|
||||
<input name="sp_visible" id="sp_visible_no" type="radio" value="0" <?php checked( ! $visible ); ?>>
|
||||
<?php _e( 'No', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'No', 'sportspress' ); ?>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -64,7 +64,7 @@ class SP_Meta_Box_Table_Data {
|
||||
|
||||
<?php if ( $readonly ) { ?>
|
||||
<p>
|
||||
<strong><?php echo get_the_title( $id ); ?></strong>
|
||||
<strong><?php echo esc_attr( get_the_title( $id ) ); ?></strong>
|
||||
<a class="add-new-h2 sp-add-new-h2" href="
|
||||
<?php
|
||||
echo esc_url(
|
||||
@@ -79,13 +79,13 @@ class SP_Meta_Box_Table_Data {
|
||||
)
|
||||
);
|
||||
?>
|
||||
"><?php _e( 'Edit', 'sportspress' ); ?></a>
|
||||
"><?php esc_attr_e( 'Edit', 'sportspress' ); ?></a>
|
||||
</p>
|
||||
<?php } else { ?>
|
||||
<input type="hidden" name="sp_highlight" value="0">
|
||||
<ul class="subsubsub sp-table-bar">
|
||||
<li><a href="#sp-table-values" class="current"><?php _e( 'Values', 'sportspress' ); ?></a></li> |
|
||||
<li><a href="#sp-table-adjustments" class=""><?php _e( 'Adjustments', 'sportspress' ); ?></a></li>
|
||||
<li><a href="#sp-table-values" class="current"><?php esc_attr_e( 'Values', 'sportspress' ); ?></a></li> |
|
||||
<li><a href="#sp-table-adjustments" class=""><?php esc_attr_e( 'Adjustments', 'sportspress' ); ?></a></li>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
|
||||
@@ -94,9 +94,9 @@ class SP_Meta_Box_Table_Data {
|
||||
<thead>
|
||||
<tr>
|
||||
<?php if ( ! $readonly ) { ?>
|
||||
<th class="radio"><span class="dashicons <?php echo $icon_class; ?> sp-tip" title="<?php _e( 'Highlight', 'sportspress' ); ?>"></span></th>
|
||||
<th class="radio"><span class="dashicons <?php echo esc_attr( $icon_class ); ?> sp-tip" title="<?php esc_attr_e( 'Highlight', 'sportspress' ); ?>"></span></th>
|
||||
<?php } ?>
|
||||
<th><?php _e( 'Team', 'sportspress' ); ?></th>
|
||||
<th><?php esc_attr_e( 'Team', 'sportspress' ); ?></th>
|
||||
<?php foreach ( $columns as $key => $label ) : ?>
|
||||
<th><label for="sp_columns_<?php echo esc_attr( $key ); ?>">
|
||||
<?php if ( ! $readonly ) { ?>
|
||||
@@ -140,12 +140,12 @@ class SP_Meta_Box_Table_Data {
|
||||
<?php } else { ?>
|
||||
<span class="sp-default-value">
|
||||
<span class="sp-default-value-input"><?php echo esc_html( $default_name ); ?></span>
|
||||
<a class="dashicons dashicons-edit sp-edit" title="<?php _e( 'Edit', 'sportspress' ); ?>"></a>
|
||||
<a class="dashicons dashicons-edit sp-edit" title="<?php esc_attr_e( 'Edit', 'sportspress' ); ?>"></a>
|
||||
</span>
|
||||
<span class="hidden sp-custom-value">
|
||||
<input type="text" name="sp_teams[<?php echo esc_attr( $team_id ); ?>][name]" class="name sp-custom-value-input" value="<?php echo esc_attr( sp_array_value( $team_stats, 'name', '' ) ); ?>" placeholder="<?php echo esc_attr( get_the_title( $team_id ) ); ?>" size="6">
|
||||
<a class="button button-secondary sp-cancel"><?php _e( 'Cancel', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary sp-save"><?php _e( 'Save', 'sportspress' ); ?></a>
|
||||
<a class="button button-secondary sp-cancel"><?php esc_attr_e( 'Cancel', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary sp-save"><?php esc_attr_e( 'Save', 'sportspress' ); ?></a>
|
||||
</span>
|
||||
<?php } ?>
|
||||
</td>
|
||||
@@ -167,10 +167,10 @@ class SP_Meta_Box_Table_Data {
|
||||
<td colspan="
|
||||
<?php
|
||||
$colspan = sizeof( $columns ) + ( $readonly ? 1 : 2 );
|
||||
echo $colspan;
|
||||
echo esc_attr( $colspan );
|
||||
?>
|
||||
">
|
||||
<?php printf( __( 'Select %s', 'sportspress' ), __( 'Data', 'sportspress' ) ); ?>
|
||||
<?php printf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Data', 'sportspress' ) ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
@@ -183,7 +183,7 @@ class SP_Meta_Box_Table_Data {
|
||||
<table class="widefat sp-data-table sp-league-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php _e( 'Team', 'sportspress' ); ?></th>
|
||||
<th><?php esc_attr_e( 'Team', 'sportspress' ); ?></th>
|
||||
<?php foreach ( $columns as $key => $label ) : ?>
|
||||
<th><?php echo esc_html( $label ); ?></th>
|
||||
<?php endforeach; ?>
|
||||
@@ -205,7 +205,7 @@ class SP_Meta_Box_Table_Data {
|
||||
?>
|
||||
">
|
||||
<td>
|
||||
<?php echo get_the_title( $team_id ); ?>
|
||||
<?php echo esc_attr( get_the_title( $team_id ) ); ?>
|
||||
</td>
|
||||
<?php
|
||||
foreach ( $columns as $column => $label ) :
|
||||
@@ -223,10 +223,10 @@ class SP_Meta_Box_Table_Data {
|
||||
<td colspan="
|
||||
<?php
|
||||
$colspan = sizeof( $columns ) + 1;
|
||||
echo $colspan;
|
||||
echo esc_attr( $colspan );
|
||||
?>
|
||||
">
|
||||
<?php printf( __( 'Select %s', 'sportspress' ), __( 'Data', 'sportspress' ) ); ?>
|
||||
<?php printf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Data', 'sportspress' ) ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@@ -39,11 +39,11 @@ class SP_Meta_Box_Table_Details {
|
||||
}
|
||||
?>
|
||||
<div>
|
||||
<p><strong><?php _e( 'Heading', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Heading', 'sportspress' ); ?></strong></p>
|
||||
<p><input type="text" id="sp_caption" name="sp_caption" value="<?php echo esc_attr( $caption ); ?>" placeholder="<?php echo esc_attr( get_the_title() ); ?>"></p>
|
||||
|
||||
<div class="sp-date-selector">
|
||||
<p><strong><?php _e( 'Date', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Date', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<?php
|
||||
$args = array(
|
||||
@@ -56,21 +56,21 @@ class SP_Meta_Box_Table_Details {
|
||||
</p>
|
||||
<div class="sp-date-range">
|
||||
<p class="sp-date-range-absolute">
|
||||
<input type="text" class="sp-datepicker-from" name="sp_date_from" value="<?php echo $date_from ? esc_attr( $date_from ) : date_i18n( 'Y-m-d' ); ?>" size="10">
|
||||
<input type="text" class="sp-datepicker-from" name="sp_date_from" value="<?php echo $date_from ? esc_attr( $date_from ) : esc_attr( date_i18n( 'Y-m-d' ) ); ?>" size="10">
|
||||
:
|
||||
<input type="text" class="sp-datepicker-to" name="sp_date_to" value="<?php echo $date_to ? esc_attr( $date_to ) : date_i18n( 'Y-m-d' ); ?>" size="10">
|
||||
<input type="text" class="sp-datepicker-to" name="sp_date_to" value="<?php echo $date_to ? esc_attr( $date_to ) : esc_attr( date_i18n( 'Y-m-d' ) ); ?>" size="10">
|
||||
</p>
|
||||
|
||||
<p class="sp-date-range-relative">
|
||||
<?php _e( 'Past', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Past', 'sportspress' ); ?>
|
||||
<input type="number" min="0" step="1" class="tiny-text" name="sp_date_past" value="<?php echo '' !== $date_past ? esc_attr( $date_past ) : 7; ?>">
|
||||
<?php _e( 'days', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'days', 'sportspress' ); ?>
|
||||
</p>
|
||||
|
||||
<p class="sp-date-relative">
|
||||
<label>
|
||||
<input type="checkbox" name="sp_date_relative" value="1" id="sp_date_relative" <?php checked( $date_relative ); ?>>
|
||||
<?php _e( 'Relative', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Relative', 'sportspress' ); ?>
|
||||
</label>
|
||||
</p>
|
||||
</div>
|
||||
@@ -87,29 +87,29 @@ class SP_Meta_Box_Table_Details {
|
||||
</strong></p>
|
||||
<p class="sp-select-setting">
|
||||
<select name="sp_select">
|
||||
<option value="auto" <?php selected( 'auto', $select ); ?>><?php _e( 'Auto', 'sportspress' ); ?></option>
|
||||
<option value="manual" <?php selected( 'manual', $select ); ?>><?php _e( 'Manual', 'sportspress' ); ?></option>
|
||||
<option value="auto" <?php selected( 'auto', $select ); ?>><?php esc_attr_e( 'Auto', 'sportspress' ); ?></option>
|
||||
<option value="manual" <?php selected( 'manual', $select ); ?>><?php esc_attr_e( 'Manual', 'sportspress' ); ?></option>
|
||||
</select>
|
||||
</p>
|
||||
<?php
|
||||
if ( 'manual' == $select ) {
|
||||
sp_post_checklist( $post->ID, $post_type, ( 'auto' == $select ? 'none' : 'block' ), array( 'sp_league', 'sp_season' ), null, 'sp_team' );
|
||||
sp_post_adder( $post_type, __( 'Add New', 'sportspress' ) );
|
||||
sp_post_adder( $post_type, esc_attr__( 'Add New', 'sportspress' ) );
|
||||
}
|
||||
?>
|
||||
<p><strong><?php _e( 'Event Status (with results)', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Event Status (with results)', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<input type="checkbox" name="sp_event_status[]" value="publish" <?php echo ( in_array( 'publish', $event_status ) ) ? 'checked' : false; ?>> Published/Played<br>
|
||||
<input type="checkbox" name="sp_event_status[]" value="future" <?php echo ( in_array( 'future', $event_status ) ) ? 'checked' : false; ?>> Scheduled/Future<br>
|
||||
</p>
|
||||
</div>
|
||||
<p><strong><?php _e( 'Sort by', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Sort by', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<?php
|
||||
$args = array(
|
||||
'prepend_options' => array(
|
||||
'default' => __( 'Default', 'sportspress' ),
|
||||
'name' => __( 'Name', 'sportspress' ),
|
||||
'default' => esc_attr__( 'Default', 'sportspress' ),
|
||||
'name' => esc_attr__( 'Name', 'sportspress' ),
|
||||
),
|
||||
'post_type' => array( 'sp_column' ),
|
||||
'name' => 'sp_orderby',
|
||||
@@ -120,11 +120,11 @@ class SP_Meta_Box_Table_Details {
|
||||
?>
|
||||
</p>
|
||||
<div id="sp_order" <?php echo ( $orderby === 'default' || $orderby === '' ? 'style="display: none;"' : '' ); ?>>
|
||||
<p><strong><?php _e( 'Sort Order', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Sort Order', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<select name="sp_order">
|
||||
<option value="ASC" <?php selected( 'ASC', $order ); ?>><?php _e( 'Ascending', 'sportspress' ); ?></option>
|
||||
<option value="DESC" <?php selected( 'DESC', $order ); ?>><?php _e( 'Descending', 'sportspress' ); ?></option>
|
||||
<option value="ASC" <?php selected( 'ASC', $order ); ?>><?php esc_attr_e( 'Ascending', 'sportspress' ); ?></option>
|
||||
<option value="DESC" <?php selected( 'DESC', $order ); ?>><?php esc_attr_e( 'Descending', 'sportspress' ); ?></option>
|
||||
</select>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -26,8 +26,8 @@ class SP_Meta_Box_Table_Mode {
|
||||
<div id="post-formats-select">
|
||||
<?php
|
||||
foreach ( array(
|
||||
'team' => __( 'Team vs team', 'sportspress' ),
|
||||
'player' => __( 'Player vs player', 'sportspress' ),
|
||||
'team' => esc_attr__( 'Team vs team', 'sportspress' ),
|
||||
'player' => esc_attr__( 'Player vs player', 'sportspress' ),
|
||||
) as $key => $mode ) :
|
||||
?>
|
||||
<input type="radio" name="sp_mode" class="post-format" id="post-format-<?php echo esc_attr( $key ); ?>" value="<?php echo esc_attr( $key ); ?>" <?php checked( $the_mode, $key ); ?>> <label for="post-format-<?php echo esc_attr( $key ); ?>" class="post-format-icon post-format-<?php echo esc_attr( $key ); ?>"><?php echo esc_html( $mode ); ?></label><br>
|
||||
|
||||
@@ -27,7 +27,7 @@ class SP_Meta_Box_Table_Shortcode {
|
||||
}
|
||||
?>
|
||||
<p class="howto">
|
||||
<?php _e( 'Copy this code and paste it into your post, page or text widget content.', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Copy this code and paste it into your post, page or text widget content.', 'sportspress' ); ?>
|
||||
</p>
|
||||
<p><input type="text" value="<?php sp_shortcode_template( 'team_' . $the_format, $post->ID ); ?>" readonly="readonly" class="code widefat"></p>
|
||||
<?php
|
||||
|
||||
@@ -39,7 +39,7 @@ class SP_Meta_Box_Team_Columns {
|
||||
endforeach;
|
||||
endif;
|
||||
?>
|
||||
<p><strong><?php _e( 'Total', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Total', 'sportspress' ); ?></strong></p>
|
||||
<?php
|
||||
list( $columns, $data, $placeholders ) = $team->columns( 0 );
|
||||
self::table( 0, $columns, $data, $placeholders );
|
||||
@@ -61,7 +61,7 @@ endif;
|
||||
<table class="widefat sp-data-table sp-team-column-table sp-select-all-range">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php _e( 'Season', 'sportspress' ); ?></th>
|
||||
<th><?php esc_attr_e( 'Season', 'sportspress' ); ?></th>
|
||||
<?php foreach ( $columns as $label ) : ?>
|
||||
<th><?php echo esc_html( $label ); ?></th>
|
||||
<?php endforeach; ?>
|
||||
@@ -83,7 +83,7 @@ endif;
|
||||
<label for="sp_leagues_<?php echo esc_attr( $league_id ); ?>_<?php echo esc_attr( $div_id ); ?>">
|
||||
<?php
|
||||
if ( 'WP_Error' == get_class( $div ) ) :
|
||||
_e( 'Total', 'sportspress' );
|
||||
esc_attr_e( 'Total', 'sportspress' );
|
||||
else :
|
||||
echo esc_html( $div->name );
|
||||
endif;
|
||||
@@ -98,7 +98,7 @@ endif;
|
||||
<?php
|
||||
$value = sp_array_value( sp_array_value( $data, $div_id, array() ), $column, null );
|
||||
$placeholder = sp_array_value( sp_array_value( $placeholders, $div_id, array() ), $column, 0 );
|
||||
echo '<input type="text" name="sp_columns[' . $league_id . '][' . $div_id . '][' . $column . ']" value="' . $value . '" placeholder="' . $placeholder . '" />';
|
||||
echo '<input type="text" name="sp_columns[' . esc_attr( $league_id ) . '][' . esc_attr( $div_id ) . '][' . esc_attr( $column ) . ']" value="' . esc_attr( $value ) . '" placeholder="' . esc_attr( $placeholder ) . '" />';
|
||||
?>
|
||||
</td>
|
||||
<?php endforeach; ?>
|
||||
|
||||
@@ -60,7 +60,7 @@ class SP_Meta_Box_Team_Details {
|
||||
?>
|
||||
|
||||
<?php if ( taxonomy_exists( 'sp_league' ) ) { ?>
|
||||
<p><strong><?php _e( 'Leagues', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Leagues', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<?php
|
||||
$args = array(
|
||||
@@ -68,7 +68,7 @@ class SP_Meta_Box_Team_Details {
|
||||
'name' => 'tax_input[sp_league][]',
|
||||
'selected' => $league_ids,
|
||||
'values' => 'term_id',
|
||||
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Leagues', 'sportspress' ) ),
|
||||
'placeholder' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Leagues', 'sportspress' ) ),
|
||||
'class' => 'widefat',
|
||||
'property' => 'multiple',
|
||||
'chosen' => true,
|
||||
@@ -79,7 +79,7 @@ class SP_Meta_Box_Team_Details {
|
||||
<?php } ?>
|
||||
|
||||
<?php if ( taxonomy_exists( 'sp_season' ) ) { ?>
|
||||
<p><strong><?php _e( 'Seasons', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Seasons', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<?php
|
||||
$args = array(
|
||||
@@ -87,7 +87,7 @@ class SP_Meta_Box_Team_Details {
|
||||
'name' => 'tax_input[sp_season][]',
|
||||
'selected' => $season_ids,
|
||||
'values' => 'term_id',
|
||||
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Seasons', 'sportspress' ) ),
|
||||
'placeholder' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Seasons', 'sportspress' ) ),
|
||||
'class' => 'widefat',
|
||||
'property' => 'multiple',
|
||||
'chosen' => true,
|
||||
@@ -98,7 +98,7 @@ class SP_Meta_Box_Team_Details {
|
||||
<?php } ?>
|
||||
|
||||
<?php if ( taxonomy_exists( 'sp_venue' ) ) { ?>
|
||||
<p><strong><?php _e( 'Home', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Home', 'sportspress' ); ?></strong></p>
|
||||
<p>
|
||||
<?php
|
||||
$args = array(
|
||||
@@ -106,7 +106,7 @@ class SP_Meta_Box_Team_Details {
|
||||
'name' => 'tax_input[sp_venue][]',
|
||||
'selected' => $venue_ids,
|
||||
'values' => 'term_id',
|
||||
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Venue', 'sportspress' ) ),
|
||||
'placeholder' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Venue', 'sportspress' ) ),
|
||||
'class' => 'widefat',
|
||||
'property' => 'multiple',
|
||||
'chosen' => true,
|
||||
@@ -116,14 +116,14 @@ class SP_Meta_Box_Team_Details {
|
||||
</p>
|
||||
<?php } ?>
|
||||
|
||||
<p><strong><?php _e( 'Site URL', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Site URL', 'sportspress' ); ?></strong></p>
|
||||
<p><input type="text" class="widefat" id="sp_url" name="sp_url" value="<?php echo esc_url( $url ); ?>"></p>
|
||||
<p><label class="selectit"><input type="checkbox" name="sp_redirect" value="1" <?php checked( $redirect ); ?>> <?php _e( 'Redirect', 'sportspress' ); ?></label></p>
|
||||
<p><label class="selectit"><input type="checkbox" name="sp_redirect" value="1" <?php checked( $redirect ); ?>> <?php esc_attr_e( 'Redirect', 'sportspress' ); ?></label></p>
|
||||
|
||||
<p><strong><?php _e( 'Short Name', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Short Name', 'sportspress' ); ?></strong></p>
|
||||
<p><input type="text" id="sp_short_name" name="sp_short_name" value="<?php echo esc_attr( $short_name ); ?>"></p>
|
||||
|
||||
<p><strong><?php _e( 'Abbreviation', 'sportspress' ); ?></strong></p>
|
||||
<p><strong><?php esc_attr_e( 'Abbreviation', 'sportspress' ); ?></strong></p>
|
||||
<p><input type="text" id="sp_abbreviation" name="sp_abbreviation" value="<?php echo esc_attr( $abbreviation ); ?>"></p>
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ class SP_Meta_Box_Team_Lists {
|
||||
|
||||
else :
|
||||
|
||||
printf( __( 'No results found.', 'sportspress' ) );
|
||||
printf( esc_attr__( 'No results found.', 'sportspress' ) );
|
||||
|
||||
endif;
|
||||
}
|
||||
@@ -54,19 +54,19 @@ class SP_Meta_Box_Team_Lists {
|
||||
<tr>
|
||||
<th class="check-column"><input class="sp-select-all" type="checkbox"></th>
|
||||
<th class="column-list">
|
||||
<?php _e( 'Player List', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Player List', 'sportspress' ); ?>
|
||||
</th>
|
||||
<th class="column-players">
|
||||
<?php _e( 'Players', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Players', 'sportspress' ); ?>
|
||||
</th>
|
||||
<th class="column-league">
|
||||
<?php _e( 'League', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'League', 'sportspress' ); ?>
|
||||
</th>
|
||||
<th class="column-season">
|
||||
<?php _e( 'Season', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Season', 'sportspress' ); ?>
|
||||
</th>
|
||||
<th class="column-layout">
|
||||
<?php _e( 'Layout', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Layout', 'sportspress' ); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -86,16 +86,16 @@ class SP_Meta_Box_Team_Lists {
|
||||
?>
|
||||
">
|
||||
<td>
|
||||
<input type="checkbox" name="sp_list[]" id="sp_list_<?php echo $list->ID; ?>" value="<?php echo $list->ID; ?>" <?php checked( in_array( $list->ID, $checked ) ); ?>>
|
||||
<input type="checkbox" name="sp_list[]" id="sp_list_<?php echo esc_attr( $list->ID ); ?>" value="<?php echo esc_attr( $list->ID ); ?>" <?php checked( in_array( $list->ID, $checked ) ); ?>>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php echo get_edit_post_link( $list->ID ); ?>">
|
||||
<a href="<?php echo esc_url( get_edit_post_link( $list->ID ) ); ?>">
|
||||
<?php echo esc_html( $list->post_title ); ?>
|
||||
</a>
|
||||
</td>
|
||||
<td><?php echo sizeof( $players ); ?></td>
|
||||
<td><?php echo get_the_terms( $list->ID, 'sp_league' ) ? the_terms( $list->ID, 'sp_league' ) : '—'; ?></td>
|
||||
<td><?php echo get_the_terms( $list->ID, 'sp_season' ) ? the_terms( $list->ID, 'sp_season' ) : '—'; ?></td>
|
||||
<td><?php echo esc_attr( sizeof( $players ) ); ?></td>
|
||||
<td><?php echo get_the_terms( $list->ID, 'sp_league' ) ? wp_kses_post( the_terms( $list->ID, 'sp_league' ) ) : '—'; ?></td>
|
||||
<td><?php echo get_the_terms( $list->ID, 'sp_season' ) ? wp_kses_post( the_terms( $list->ID, 'sp_season' ) ) : '—'; ?></td>
|
||||
<td><?php echo esc_html( sp_array_value( SP()->formats->list, $format, '—' ) ); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
@@ -105,7 +105,7 @@ class SP_Meta_Box_Team_Lists {
|
||||
?>
|
||||
<tr class="sp-row alternate">
|
||||
<td colspan="6">
|
||||
<?php _e( 'No results found.', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'No results found.', 'sportspress' ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
@@ -114,7 +114,7 @@ class SP_Meta_Box_Team_Lists {
|
||||
?>
|
||||
<tr class="sp-row alternate">
|
||||
<td colspan="6">
|
||||
<?php printf( __( 'Select %s', 'sportspress' ), __( 'Details', 'sportspress' ) ); ?>
|
||||
<?php printf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Details', 'sportspress' ) ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@@ -31,7 +31,7 @@ class SP_Meta_Box_Team_Staff {
|
||||
|
||||
else :
|
||||
|
||||
printf( __( 'No results found.', 'sportspress' ) );
|
||||
printf( esc_attr__( 'No results found.', 'sportspress' ) );
|
||||
|
||||
endif;
|
||||
}
|
||||
@@ -54,16 +54,16 @@ class SP_Meta_Box_Team_Staff {
|
||||
<tr>
|
||||
<th class="check-column"><input class="sp-select-all" type="checkbox"></th>
|
||||
<th class="column-staff">
|
||||
<?php _e( 'Staff', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Staff', 'sportspress' ); ?>
|
||||
</th>
|
||||
<th class="column-role">
|
||||
<?php _e( 'Job', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Job', 'sportspress' ); ?>
|
||||
</th>
|
||||
<th class="column-league">
|
||||
<?php _e( 'League', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'League', 'sportspress' ); ?>
|
||||
</th>
|
||||
<th class="column-season">
|
||||
<?php _e( 'Season', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Season', 'sportspress' ); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -82,16 +82,16 @@ class SP_Meta_Box_Team_Staff {
|
||||
?>
|
||||
">
|
||||
<td>
|
||||
<input type="checkbox" name="sp_staff[]" id="sp_staff_<?php echo $staff->ID; ?>" value="<?php echo $staff->ID; ?>" <?php checked( in_array( $staff->ID, $checked ) ); ?>>
|
||||
<input type="checkbox" name="sp_staff[]" id="sp_staff_<?php echo esc_attr( $staff->ID ); ?>" value="<?php echo esc_attr( $staff->ID ); ?>" <?php checked( in_array( $staff->ID, $checked ) ); ?>>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php echo get_edit_post_link( $staff->ID ); ?>">
|
||||
<a href="<?php echo esc_url( get_edit_post_link( $staff->ID ) ); ?>">
|
||||
<?php echo esc_html( $staff->post_title ); ?>
|
||||
</a>
|
||||
</td>
|
||||
<td><?php echo get_the_terms( $staff->ID, 'sp_role' ) ? the_terms( $staff->ID, 'sp_role' ) : '—'; ?></td>
|
||||
<td><?php echo get_the_terms( $staff->ID, 'sp_league' ) ? the_terms( $staff->ID, 'sp_league' ) : '—'; ?></td>
|
||||
<td><?php echo get_the_terms( $staff->ID, 'sp_season' ) ? the_terms( $staff->ID, 'sp_season' ) : '—'; ?></td>
|
||||
<td><?php echo get_the_terms( $staff->ID, 'sp_role' ) ? wp_kses_post( the_terms( $staff->ID, 'sp_role' ) ) : '—'; ?></td>
|
||||
<td><?php echo get_the_terms( $staff->ID, 'sp_league' ) ? wp_kses_post( the_terms( $staff->ID, 'sp_league' ) ) : '—'; ?></td>
|
||||
<td><?php echo get_the_terms( $staff->ID, 'sp_season' ) ? wp_kses_post( the_terms( $staff->ID, 'sp_season' ) ) : '—'; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$i++;
|
||||
@@ -100,7 +100,7 @@ class SP_Meta_Box_Team_Staff {
|
||||
?>
|
||||
<tr class="sp-row alternate">
|
||||
<td colspan="5">
|
||||
<?php _e( 'No results found.', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'No results found.', 'sportspress' ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
@@ -109,7 +109,7 @@ class SP_Meta_Box_Team_Staff {
|
||||
?>
|
||||
<tr class="sp-row alternate">
|
||||
<td colspan="5">
|
||||
<?php printf( __( 'Select %s', 'sportspress' ), __( 'Details', 'sportspress' ) ); ?>
|
||||
<?php printf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Details', 'sportspress' ) ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@@ -31,7 +31,7 @@ class SP_Meta_Box_Team_Tables {
|
||||
|
||||
else :
|
||||
|
||||
printf( __( 'No results found.', 'sportspress' ) );
|
||||
printf( esc_attr__( 'No results found.', 'sportspress' ) );
|
||||
|
||||
endif;
|
||||
}
|
||||
@@ -54,16 +54,16 @@ class SP_Meta_Box_Team_Tables {
|
||||
<tr>
|
||||
<th class="check-column"><input class="sp-select-all" type="checkbox"></th>
|
||||
<th class="column-table">
|
||||
<?php _e( 'League Table', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'League Table', 'sportspress' ); ?>
|
||||
</th>
|
||||
<th class="column-teams">
|
||||
<?php _e( 'Teams', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Teams', 'sportspress' ); ?>
|
||||
</th>
|
||||
<th class="column-league">
|
||||
<?php _e( 'League', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'League', 'sportspress' ); ?>
|
||||
</th>
|
||||
<th class="column-season">
|
||||
<?php _e( 'Season', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'Season', 'sportspress' ); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -83,16 +83,16 @@ class SP_Meta_Box_Team_Tables {
|
||||
?>
|
||||
">
|
||||
<td>
|
||||
<input type="checkbox" name="sp_table[]" id="sp_table_<?php echo $table->ID; ?>" value="<?php echo $table->ID; ?>" <?php checked( in_array( $table->ID, $checked ) ); ?>>
|
||||
<input type="checkbox" name="sp_table[]" id="sp_table_<?php echo esc_attr( $table->ID ); ?>" value="<?php echo esc_attr( $table->ID ); ?>" <?php checked( in_array( $table->ID, $checked ) ); ?>>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php echo get_edit_post_link( $table->ID ); ?>">
|
||||
<a href="<?php echo esc_url( get_edit_post_link( $table->ID ) ); ?>">
|
||||
<?php echo esc_html( $table->post_title ); ?>
|
||||
</a>
|
||||
</td>
|
||||
<td><?php echo sizeof( $teams ); ?></td>
|
||||
<td><?php echo get_the_terms( $table->ID, 'sp_league' ) ? the_terms( $table->ID, 'sp_league' ) : '—'; ?></td>
|
||||
<td><?php echo get_the_terms( $table->ID, 'sp_season' ) ? the_terms( $table->ID, 'sp_season' ) : '—'; ?></td>
|
||||
<td><?php echo esc_attr( sizeof( $teams ) ); ?></td>
|
||||
<td><?php echo get_the_terms( $table->ID, 'sp_league' ) ? wp_kses_post( the_terms( $table->ID, 'sp_league' ) ) : '—'; ?></td>
|
||||
<td><?php echo get_the_terms( $table->ID, 'sp_season' ) ? wp_kses_post( the_terms( $table->ID, 'sp_season' ) ) : '—'; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$i++;
|
||||
@@ -101,7 +101,7 @@ class SP_Meta_Box_Team_Tables {
|
||||
?>
|
||||
<tr class="sp-row alternate">
|
||||
<td colspan="6">
|
||||
<?php _e( 'No results found.', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'No results found.', 'sportspress' ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
@@ -110,7 +110,7 @@ class SP_Meta_Box_Team_Tables {
|
||||
?>
|
||||
<tr class="sp-row alternate">
|
||||
<td colspan="5">
|
||||
<?php printf( __( 'Select %s', 'sportspress' ), __( 'Details', 'sportspress' ) ); ?>
|
||||
<?php printf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Details', 'sportspress' ) ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@@ -24,7 +24,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->id = 'events';
|
||||
$this->label = __( 'Events', 'sportspress' );
|
||||
$this->label = esc_attr__( 'Events', 'sportspress' );
|
||||
$this->template = 'event';
|
||||
|
||||
add_filter( 'sportspress_settings_tabs_array', array( $this, 'add_settings_page' ), 20 );
|
||||
@@ -45,7 +45,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
$settings = array_merge(
|
||||
array(
|
||||
array(
|
||||
'title' => __( 'Event Options', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Event Options', 'sportspress' ),
|
||||
'type' => 'title',
|
||||
'desc' => '',
|
||||
'id' => 'event_options',
|
||||
@@ -56,8 +56,8 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
array_merge(
|
||||
array(
|
||||
array(
|
||||
'title' => __( 'Link', 'sportspress' ),
|
||||
'desc' => __( 'Link events', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Link', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Link events', 'sportspress' ),
|
||||
'id' => 'sportspress_link_events',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
@@ -71,8 +71,8 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
array( 'type' => 'event_tabs' ),
|
||||
|
||||
array(
|
||||
'title' => __( 'Details', 'sportspress' ),
|
||||
'desc' => __( 'Date', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Details', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Date', 'sportspress' ),
|
||||
'id' => 'sportspress_event_show_date',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
@@ -80,7 +80,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Time', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Time', 'sportspress' ),
|
||||
'id' => 'sportspress_event_show_time',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
@@ -88,7 +88,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Match Day', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Match Day', 'sportspress' ),
|
||||
'id' => 'sportspress_event_show_day',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
@@ -96,7 +96,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Full Time', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Full Time', 'sportspress' ),
|
||||
'id' => 'sportspress_event_show_full_time',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
@@ -106,23 +106,23 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'title' => __( 'Default mode', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Default mode', 'sportspress' ),
|
||||
'id' => 'sportspress_mode',
|
||||
'default' => 'team',
|
||||
'type' => 'radio',
|
||||
'options' => array(
|
||||
'team' => __( 'Team vs team', 'sportspress' ),
|
||||
'player' => __( 'Player vs player', 'sportspress' ),
|
||||
'team' => esc_attr__( 'Team vs team', 'sportspress' ),
|
||||
'player' => esc_attr__( 'Player vs player', 'sportspress' ),
|
||||
),
|
||||
'desc_tip' => _x( 'Who competes in events?', 'mode setting description', 'sportspress' ),
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Limit', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Limit', 'sportspress' ),
|
||||
'id' => 'sportspress_event_teams',
|
||||
'class' => 'small-text',
|
||||
'default' => '2',
|
||||
'desc' => __( 'teams', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'teams', 'sportspress' ),
|
||||
'type' => 'number',
|
||||
'custom_attributes' => array(
|
||||
'min' => 0,
|
||||
@@ -133,8 +133,8 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
array( 'type' => 'delimiter' ),
|
||||
|
||||
array(
|
||||
'title' => __( 'Teams', 'sportspress' ),
|
||||
'desc' => __( 'Filter by league', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Teams', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Filter by league', 'sportspress' ),
|
||||
'id' => 'sportspress_event_filter_teams_by_league',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
@@ -142,7 +142,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Filter by season', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Filter by season', 'sportspress' ),
|
||||
'id' => 'sportspress_event_filter_teams_by_season',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
@@ -150,11 +150,11 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Full Time', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Full Time', 'sportspress' ),
|
||||
'id' => 'sportspress_event_minutes',
|
||||
'class' => 'small-text',
|
||||
'default' => '90',
|
||||
'desc' => __( 'mins', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'mins', 'sportspress' ),
|
||||
'type' => 'number',
|
||||
'custom_attributes' => array(
|
||||
'min' => 0,
|
||||
@@ -163,8 +163,8 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Comments', 'sportspress' ),
|
||||
'desc' => __( 'Allow people to post comments on new articles', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Comments', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Allow people to post comments on new articles', 'sportspress' ),
|
||||
'id' => 'sportspress_event_comment_status',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
@@ -180,7 +180,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'title' => __( 'Venues', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Venues', 'sportspress' ),
|
||||
'type' => 'title',
|
||||
'desc' => '',
|
||||
'id' => 'venue_options',
|
||||
@@ -190,34 +190,34 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
'sportspress_venue_options',
|
||||
array(
|
||||
array(
|
||||
'title' => __( 'Link', 'sportspress' ),
|
||||
'desc' => __( 'Link venues', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Link', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Link venues', 'sportspress' ),
|
||||
'id' => 'sportspress_link_venues',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Venue Map', 'sportspress' ),
|
||||
'desc' => __( 'Display venue map', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Venue Map', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Display venue map', 'sportspress' ),
|
||||
'id' => 'sportspress_event_show_maps',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Type', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Type', 'sportspress' ),
|
||||
'id' => 'sportspress_map_type',
|
||||
'default' => 'ROADMAP',
|
||||
'type' => 'radio',
|
||||
'options' => array(
|
||||
'ROADMAP' => __( 'Default', 'sportspress' ),
|
||||
'SATELLITE' => __( 'Satellite', 'sportspress' ),
|
||||
'ROADMAP' => esc_attr__( 'Default', 'sportspress' ),
|
||||
'SATELLITE' => esc_attr__( 'Satellite', 'sportspress' ),
|
||||
),
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Zoom', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Zoom', 'sportspress' ),
|
||||
'id' => 'sportspress_map_zoom',
|
||||
'class' => 'small-text',
|
||||
'default' => '15',
|
||||
@@ -239,7 +239,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'title' => __( 'Teams', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Teams', 'sportspress' ),
|
||||
'type' => 'title',
|
||||
'desc' => '',
|
||||
'id' => 'event_logo_options',
|
||||
@@ -249,27 +249,27 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
'sportspress_event_logo_options',
|
||||
array(
|
||||
array(
|
||||
'title' => __( 'Order', 'sportspress' ),
|
||||
'desc' => __( 'Reverse order', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Order', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Reverse order', 'sportspress' ),
|
||||
'id' => 'sportspress_event_reverse_teams',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Layout', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Layout', 'sportspress' ),
|
||||
'id' => 'sportspress_event_logos_format',
|
||||
'default' => 'inline',
|
||||
'type' => 'radio',
|
||||
'options' => array(
|
||||
'inline' => __( 'Inline', 'sportspress' ),
|
||||
'block' => __( 'Block', 'sportspress' ),
|
||||
'inline' => esc_attr__( 'Inline', 'sportspress' ),
|
||||
'block' => esc_attr__( 'Block', 'sportspress' ),
|
||||
),
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Display', 'sportspress' ),
|
||||
'desc' => __( 'Name', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Display', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Name', 'sportspress' ),
|
||||
'id' => 'sportspress_event_logos_show_team_names',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
@@ -277,7 +277,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Time', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Time', 'sportspress' ),
|
||||
'id' => 'sportspress_event_logos_show_time',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
@@ -285,7 +285,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Results', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Results', 'sportspress' ),
|
||||
'id' => 'sportspress_event_logos_show_results',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
@@ -301,7 +301,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'title' => __( 'Players', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Players', 'sportspress' ),
|
||||
'type' => 'title',
|
||||
'desc' => '',
|
||||
'id' => 'eventplayer_options',
|
||||
@@ -311,13 +311,13 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
'sportspress_eventplayer_options',
|
||||
array(
|
||||
array(
|
||||
'title' => __( 'Order', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Order', 'sportspress' ),
|
||||
'id' => 'sportspress_event_player_sort',
|
||||
'default' => 'jersey',
|
||||
'type' => 'radio',
|
||||
'options' => array(
|
||||
'jersey' => __( 'Jersey (e.g. "33. John Doe")', 'sportspress' ),
|
||||
'name' => __( 'Name (e.g. "John Doe (33)")', 'sportspress' ),
|
||||
'jersey' => esc_attr__( 'Jersey (e.g. "33. John Doe")', 'sportspress' ),
|
||||
'name' => esc_attr__( 'Name (e.g. "John Doe (33)")', 'sportspress' ),
|
||||
),
|
||||
'desc_tip' => 'When editing an event, this determines how the checklist of players are sorted in the Teams metabox. This does not affect the Box Score section.',
|
||||
),
|
||||
@@ -332,7 +332,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'title' => __( 'Event Results', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Event Results', 'sportspress' ),
|
||||
'type' => 'title',
|
||||
'desc' => '',
|
||||
'id' => 'result_options',
|
||||
@@ -342,19 +342,19 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
'sportspress_result_options',
|
||||
array(
|
||||
array(
|
||||
'title' => __( 'Columns', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Columns', 'sportspress' ),
|
||||
'id' => 'sportspress_event_result_columns',
|
||||
'default' => 'auto',
|
||||
'type' => 'radio',
|
||||
'options' => array(
|
||||
'auto' => __( 'Auto', 'sportspress' ),
|
||||
'manual' => __( 'Manual', 'sportspress' ),
|
||||
'auto' => esc_attr__( 'Auto', 'sportspress' ),
|
||||
'manual' => esc_attr__( 'Manual', 'sportspress' ),
|
||||
),
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Outcome', 'sportspress' ),
|
||||
'desc' => __( 'Display outcome', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Outcome', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Display outcome', 'sportspress' ),
|
||||
'id' => 'sportspress_event_show_outcome',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
@@ -369,7 +369,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'title' => __( 'Box Score', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Box Score', 'sportspress' ),
|
||||
'type' => 'title',
|
||||
'desc' => '',
|
||||
'id' => 'performance_options',
|
||||
@@ -380,8 +380,8 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
array_merge(
|
||||
array(
|
||||
array(
|
||||
'title' => __( 'Rows', 'sportspress' ),
|
||||
'desc' => __( 'Staff', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Rows', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Staff', 'sportspress' ),
|
||||
'id' => 'sportspress_event_show_staff',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
@@ -389,7 +389,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Players', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Players', 'sportspress' ),
|
||||
'id' => 'sportspress_event_show_players',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
@@ -397,7 +397,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Total', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Total', 'sportspress' ),
|
||||
'id' => 'sportspress_event_show_total',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
@@ -405,29 +405,29 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Columns', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Columns', 'sportspress' ),
|
||||
'id' => 'sportspress_event_performance_columns',
|
||||
'default' => 'auto',
|
||||
'type' => 'radio',
|
||||
'options' => array(
|
||||
'auto' => __( 'Auto', 'sportspress' ),
|
||||
'manual' => __( 'Manual', 'sportspress' ),
|
||||
'auto' => esc_attr__( 'Auto', 'sportspress' ),
|
||||
'manual' => esc_attr__( 'Manual', 'sportspress' ),
|
||||
),
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Mode', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Mode', 'sportspress' ),
|
||||
'id' => 'sportspress_event_performance_mode',
|
||||
'default' => 'values',
|
||||
'type' => 'radio',
|
||||
'options' => array(
|
||||
'values' => __( 'Values', 'sportspress' ),
|
||||
'icons' => __( 'Icons', 'sportspress' ),
|
||||
'values' => esc_attr__( 'Values', 'sportspress' ),
|
||||
'icons' => esc_attr__( 'Icons', 'sportspress' ),
|
||||
),
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Awards', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Awards', 'sportspress' ),
|
||||
'id' => 'sportspress_event_performance_stars_type',
|
||||
'default' => 0,
|
||||
'type' => 'radio',
|
||||
@@ -440,8 +440,8 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Positions', 'sportspress' ),
|
||||
'desc' => __( 'Top-level only', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Positions', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Top-level only', 'sportspress' ),
|
||||
'id' => 'sportspress_event_hide_child_positions',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
@@ -451,8 +451,8 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
'sportspress_event_performance_display_options',
|
||||
array(
|
||||
array(
|
||||
'title' => __( 'Display', 'sportspress' ),
|
||||
'desc' => __( 'Squad Number', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Display', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Squad Number', 'sportspress' ),
|
||||
'id' => 'sportspress_event_show_player_numbers',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
@@ -460,7 +460,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Position', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Position', 'sportspress' ),
|
||||
'id' => 'sportspress_event_show_position',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
@@ -468,7 +468,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Minutes', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Minutes', 'sportspress' ),
|
||||
'id' => 'sportspress_event_performance_show_minutes',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
@@ -478,25 +478,25 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'title' => __( 'Performance', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Performance', 'sportspress' ),
|
||||
'id' => 'sportspress_event_performance_sections',
|
||||
'default' => -1,
|
||||
'type' => 'radio',
|
||||
'options' => array(
|
||||
-1 => __( 'Combined', 'sportspress' ),
|
||||
0 => __( 'Offense', 'sportspress' ) . ' → ' . __( 'Defense', 'sportspress' ),
|
||||
1 => __( 'Defense', 'sportspress' ) . ' → ' . __( 'Offense', 'sportspress' ),
|
||||
-1 => esc_attr__( 'Combined', 'sportspress' ),
|
||||
0 => esc_attr__( 'Offense', 'sportspress' ) . ' → ' . esc_attr__( 'Defense', 'sportspress' ),
|
||||
1 => esc_attr__( 'Defense', 'sportspress' ) . ' → ' . esc_attr__( 'Offense', 'sportspress' ),
|
||||
),
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Total', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Total', 'sportspress' ),
|
||||
'id' => 'sportspress_event_total_performance',
|
||||
'default' => 'all',
|
||||
'type' => 'radio',
|
||||
'options' => array(
|
||||
'all' => __( 'All', 'sportspress' ),
|
||||
'primary' => __( 'Primary', 'sportspress' ),
|
||||
'all' => esc_attr__( 'All', 'sportspress' ),
|
||||
'primary' => esc_attr__( 'Primary', 'sportspress' ),
|
||||
),
|
||||
),
|
||||
)
|
||||
@@ -537,9 +537,9 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
||||
$limit = 2;
|
||||
}
|
||||
if ( 3 >= $limit ) {
|
||||
$example = str_repeat( __( 'Team', 'sportspress' ) . ' %1$s ', $limit );
|
||||
$example = str_repeat( esc_attr__( 'Team', 'sportspress' ) . ' %1$s ', $limit );
|
||||
} else {
|
||||
$example = str_repeat( __( 'Team', 'sportspress' ) . ' %1$s ', 3 ) . '…';
|
||||
$example = str_repeat( esc_attr__( 'Team', 'sportspress' ) . ' %1$s ', 3 ) . '…';
|
||||
}
|
||||
$example = rtrim( $example, ' %1$s ' );
|
||||
?>
|
||||
|
||||
@@ -24,7 +24,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->id = 'general';
|
||||
$this->label = __( 'General', 'sportspress' );
|
||||
$this->label = esc_attr__( 'General', 'sportspress' );
|
||||
|
||||
add_filter( 'sportspress_settings_tabs_array', array( $this, 'add_settings_page' ), 20 );
|
||||
add_action( 'sportspress_settings_' . $this->id, array( $this, 'output' ) );
|
||||
@@ -42,7 +42,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
||||
|
||||
$presets = SP_Admin_Sports::get_preset_options();
|
||||
|
||||
$leagues = array( '' => __( '— Select —', 'sportspress' ) );
|
||||
$leagues = array( '' => esc_attr__( '— Select —', 'sportspress' ) );
|
||||
|
||||
$terms = get_terms(
|
||||
array(
|
||||
@@ -57,7 +57,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
||||
}
|
||||
}
|
||||
|
||||
$seasons = array( '' => __( '— Select —', 'sportspress' ) );
|
||||
$seasons = array( '' => esc_attr__( '— Select —', 'sportspress' ) );
|
||||
|
||||
$terms = get_terms(
|
||||
array(
|
||||
@@ -75,7 +75,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
||||
$settings = array_merge(
|
||||
array(
|
||||
array(
|
||||
'title' => __( 'General Options', 'sportspress' ),
|
||||
'title' => esc_attr__( 'General Options', 'sportspress' ),
|
||||
'type' => 'title',
|
||||
'desc' => '',
|
||||
'id' => 'general_options',
|
||||
@@ -87,7 +87,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
||||
array( 'type' => 'timezone' ),
|
||||
|
||||
array(
|
||||
'title' => __( 'Sport', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Sport', 'sportspress' ),
|
||||
'id' => 'sportspress_sport',
|
||||
'default' => 'none',
|
||||
'type' => 'sport',
|
||||
@@ -95,7 +95,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Main League', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Main League', 'sportspress' ),
|
||||
'id' => 'sportspress_league',
|
||||
'default' => null,
|
||||
'type' => 'select',
|
||||
@@ -103,7 +103,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Current Season', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Current Season', 'sportspress' ),
|
||||
'id' => 'sportspress_season',
|
||||
'default' => null,
|
||||
'type' => 'select',
|
||||
@@ -117,7 +117,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
||||
'id' => 'general_options',
|
||||
),
|
||||
array(
|
||||
'title' => __( 'Styles and Scripts', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Styles and Scripts', 'sportspress' ),
|
||||
'type' => 'title',
|
||||
'desc' => '',
|
||||
'id' => 'script_styling_options',
|
||||
@@ -134,24 +134,24 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
||||
$options,
|
||||
array(
|
||||
array(
|
||||
'title' => __( 'Align', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Align', 'sportspress' ),
|
||||
'id' => 'sportspress_table_text_align',
|
||||
'default' => 'default',
|
||||
'type' => 'radio',
|
||||
'options' => array(
|
||||
'default' => __( 'Default', 'sportspress' ),
|
||||
'left' => __( 'Left', 'sportspress' ),
|
||||
'center' => __( 'Center', 'sportspress' ),
|
||||
'right' => __( 'Right', 'sportspress' ),
|
||||
'default' => esc_attr__( 'Default', 'sportspress' ),
|
||||
'left' => esc_attr__( 'Left', 'sportspress' ),
|
||||
'center' => esc_attr__( 'Center', 'sportspress' ),
|
||||
'right' => esc_attr__( 'Right', 'sportspress' ),
|
||||
),
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Padding', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Padding', 'sportspress' ),
|
||||
'id' => 'sportspress_table_padding',
|
||||
'class' => 'small-text',
|
||||
'default' => null,
|
||||
'placeholder' => __( 'Auto', 'sportspress' ),
|
||||
'placeholder' => esc_attr__( 'Auto', 'sportspress' ),
|
||||
'desc' => 'px',
|
||||
'type' => 'number',
|
||||
'custom_attributes' => array(
|
||||
@@ -166,7 +166,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
||||
$options,
|
||||
array(
|
||||
array(
|
||||
'title' => __( 'Custom CSS', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Custom CSS', 'sportspress' ),
|
||||
'id' => 'sportspress_custom_css',
|
||||
'css' => 'width:100%; height: 130px;',
|
||||
'type' => 'textarea',
|
||||
@@ -176,29 +176,29 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
||||
'sportspress_general_script_options',
|
||||
array(
|
||||
array(
|
||||
'title' => __( 'Scripts', 'sportspress' ),
|
||||
'desc' => __( 'Live countdowns', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Scripts', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Live countdowns', 'sportspress' ),
|
||||
'id' => 'sportspress_enable_live_countdowns',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
'checkboxgroup' => 'start',
|
||||
'desc_tip' => __( 'This will enable a script allowing the countdowns to be animated.', 'sportspress' ),
|
||||
'desc_tip' => esc_attr__( 'This will enable a script allowing the countdowns to be animated.', 'sportspress' ),
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Shortcode menu', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Shortcode menu', 'sportspress' ),
|
||||
'id' => 'sportspress_rich_editing',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
'checkboxgroup' => 'end',
|
||||
'desc_tip' => __( 'This will enable a shortcode menu to be displayed in the visual editor.', 'sportspress' ),
|
||||
'desc_tip' => esc_attr__( 'This will enable a shortcode menu to be displayed in the visual editor.', 'sportspress' ),
|
||||
),
|
||||
)
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'title' => __( 'Tables', 'sportspress' ),
|
||||
'desc' => __( 'Responsive', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Tables', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Responsive', 'sportspress' ),
|
||||
'id' => 'sportspress_enable_responsive_tables',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
@@ -206,7 +206,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Scrollable', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Scrollable', 'sportspress' ),
|
||||
'id' => 'sportspress_enable_scrollable_tables',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
@@ -214,7 +214,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Sortable', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Sortable', 'sportspress' ),
|
||||
'id' => 'sportspress_enable_sortable_tables',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
@@ -222,23 +222,23 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Widgets', 'sportspress' ),
|
||||
'desc' => __( 'Unique', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Widgets', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Unique', 'sportspress' ),
|
||||
'id' => 'sportspress_widget_unique',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
'desc_tip' => __( 'Hide widget when same as content.', 'sportspress' ),
|
||||
'desc_tip' => esc_attr__( 'Hide widget when same as content.', 'sportspress' ),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
if ( apply_filters( 'sportspress_enable_header', false ) ) {
|
||||
$options[] = array(
|
||||
'title' => __( 'Header Offset', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Header Offset', 'sportspress' ),
|
||||
'id' => 'sportspress_header_offset',
|
||||
'class' => 'small-text',
|
||||
'default' => null,
|
||||
'placeholder' => __( 'Auto', 'sportspress' ),
|
||||
'placeholder' => esc_attr__( 'Auto', 'sportspress' ),
|
||||
'desc' => 'px',
|
||||
'type' => 'number',
|
||||
'custom_attributes' => array(
|
||||
@@ -442,11 +442,11 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
||||
}
|
||||
|
||||
// Show inputs
|
||||
$this->color_picker( __( 'Primary', 'sportspress' ), 'sportspress_frontend_css_primary', $colors['primary'] );
|
||||
$this->color_picker( __( 'Background', 'sportspress' ), 'sportspress_frontend_css_background', $colors['background'] );
|
||||
$this->color_picker( __( 'Text', 'sportspress' ), 'sportspress_frontend_css_text', $colors['text'] );
|
||||
$this->color_picker( __( 'Heading', 'sportspress' ), 'sportspress_frontend_css_heading', $colors['heading'] );
|
||||
$this->color_picker( __( 'Link', 'sportspress' ), 'sportspress_frontend_css_link', $colors['link'] );
|
||||
$this->color_picker( esc_attr__( 'Primary', 'sportspress' ), 'sportspress_frontend_css_primary', $colors['primary'] );
|
||||
$this->color_picker( esc_attr__( 'Background', 'sportspress' ), 'sportspress_frontend_css_background', $colors['background'] );
|
||||
$this->color_picker( esc_attr__( 'Text', 'sportspress' ), 'sportspress_frontend_css_text', $colors['text'] );
|
||||
$this->color_picker( esc_attr__( 'Heading', 'sportspress' ), 'sportspress_frontend_css_heading', $colors['heading'] );
|
||||
$this->color_picker( esc_attr__( 'Link', 'sportspress' ), 'sportspress_frontend_css_link', $colors['link'] );
|
||||
|
||||
if ( ( $styles = SP_Frontend_Scripts::get_styles() ) && array_key_exists( 'sportspress-general', $styles ) ) :
|
||||
?>
|
||||
|
||||
@@ -29,7 +29,7 @@ if ( ! class_exists( 'SP_Settings_Licenses' ) ) :
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->id = 'licenses';
|
||||
$this->label = __( 'Licenses', 'sportspress' );
|
||||
$this->label = esc_attr__( 'Licenses', 'sportspress' );
|
||||
|
||||
$this->licenses = apply_filters(
|
||||
'sportspress_licenses',
|
||||
@@ -159,7 +159,7 @@ if ( ! class_exists( 'SP_Settings_Licenses' ) ) :
|
||||
|
||||
// Make sure the response came back okay
|
||||
if ( is_wp_error( $response ) ) {
|
||||
SP_Admin_Settings::add_error( __( 'Sorry, there has been an error.', 'sportspress' ) );
|
||||
SP_Admin_Settings::add_error( esc_attr__( 'Sorry, there has been an error.', 'sportspress' ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -172,9 +172,9 @@ if ( ! class_exists( 'SP_Settings_Licenses' ) ) :
|
||||
// Update License or display error
|
||||
if ( 'valid' == $license_data->license ) {
|
||||
update_site_option( 'sportspress_' . $id . '_license_key', $license );
|
||||
SP_Admin_Settings::add_override( __( 'License activated.', 'sportspress' ) );
|
||||
SP_Admin_Settings::add_override( esc_attr__( 'License activated.', 'sportspress' ) );
|
||||
} else {
|
||||
SP_Admin_Settings::add_error( __( 'License invalid.', 'sportspress' ) );
|
||||
SP_Admin_Settings::add_error( esc_attr__( 'License invalid.', 'sportspress' ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ if ( ! class_exists( 'SP_Settings_Licenses' ) ) :
|
||||
|
||||
// make sure the response came back okay
|
||||
if ( is_wp_error( $response ) ) {
|
||||
SP_Admin_Settings::add_error( __( 'Sorry, there has been an error.', 'sportspress' ) );
|
||||
SP_Admin_Settings::add_error( esc_attr__( 'Sorry, there has been an error.', 'sportspress' ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -224,9 +224,9 @@ if ( ! class_exists( 'SP_Settings_Licenses' ) ) :
|
||||
// $license_data->license will be either "deactivated" or "failed"
|
||||
if ( $license_data->license == 'deactivated' ) {
|
||||
delete_site_option( 'sportspress_' . $id . '_license_status' );
|
||||
SP_Admin_Settings::add_override( __( 'License deactivated.', 'sportspress' ) );
|
||||
SP_Admin_Settings::add_override( esc_attr__( 'License deactivated.', 'sportspress' ) );
|
||||
} else {
|
||||
SP_Admin_Settings::add_error( __( 'Sorry, there has been an error.', 'sportspress' ) );
|
||||
SP_Admin_Settings::add_error( esc_attr__( 'Sorry, there has been an error.', 'sportspress' ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,17 +29,17 @@ if ( ! class_exists( 'SP_Settings_Modules' ) ) :
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->id = 'modules';
|
||||
$this->label = __( 'Modules', 'sportspress' );
|
||||
$this->label = esc_attr__( 'Modules', 'sportspress' );
|
||||
|
||||
$this->sections = apply_filters(
|
||||
'sportspress_module_sections',
|
||||
array(
|
||||
'general' => __( 'General', 'sportspress' ),
|
||||
'event' => __( 'Events', 'sportspress' ),
|
||||
'team' => __( 'Teams', 'sportspress' ),
|
||||
'player_staff' => __( 'Players', 'sportspress' ) . ' & ' . __( 'Staff', 'sportspress' ),
|
||||
'admin' => __( 'Dashboard', 'sportspress' ),
|
||||
'other' => __( 'Other', 'sportspress' ),
|
||||
'general' => esc_attr__( 'General', 'sportspress' ),
|
||||
'event' => esc_attr__( 'Events', 'sportspress' ),
|
||||
'team' => esc_attr__( 'Teams', 'sportspress' ),
|
||||
'player_staff' => esc_attr__( 'Players', 'sportspress' ) . ' & ' . esc_attr__( 'Staff', 'sportspress' ),
|
||||
'admin' => esc_attr__( 'Dashboard', 'sportspress' ),
|
||||
'other' => esc_attr__( 'Other', 'sportspress' ),
|
||||
)
|
||||
);
|
||||
|
||||
@@ -143,46 +143,46 @@ if ( ! class_exists( 'SP_Settings_Modules' ) ) :
|
||||
$categories = array(
|
||||
'documentation' => array(
|
||||
'icon' => 'sp-icon-book',
|
||||
'label' => __( 'Documentation', 'sportspress' ),
|
||||
'label' => esc_attr__( 'Documentation', 'sportspress' ),
|
||||
'links' => array(
|
||||
'http://tboy.co/installation' => __( 'Getting Started', 'sportspress' ),
|
||||
'http://tboy.co/manuals' => __( 'Manuals', 'sportspress' ),
|
||||
'http://tboy.co/videos' => __( 'Videos', 'sportspress' ),
|
||||
'http://tboy.co/installation' => esc_attr__( 'Getting Started', 'sportspress' ),
|
||||
'http://tboy.co/manuals' => esc_attr__( 'Manuals', 'sportspress' ),
|
||||
'http://tboy.co/videos' => esc_attr__( 'Videos', 'sportspress' ),
|
||||
),
|
||||
),
|
||||
'help' => array(
|
||||
'icon' => 'dashicons dashicons-heart',
|
||||
'label' => __( 'Help', 'sportspress' ),
|
||||
'label' => esc_attr__( 'Help', 'sportspress' ),
|
||||
'links' => array(
|
||||
'http://tboy.co/forums' => __( 'Support Forums', 'sportspress' ),
|
||||
'http://tboy.co/ideas' => __( 'Feature Requests', 'sportspress' ),
|
||||
'http://tboy.co/forums' => esc_attr__( 'Support Forums', 'sportspress' ),
|
||||
'http://tboy.co/ideas' => esc_attr__( 'Feature Requests', 'sportspress' ),
|
||||
),
|
||||
),
|
||||
'social' => array(
|
||||
'icon' => 'dashicons dashicons-share',
|
||||
'label' => __( 'Connect', 'sportspress' ),
|
||||
'label' => esc_attr__( 'Connect', 'sportspress' ),
|
||||
'links' => array(
|
||||
'http://tboy.co/twitter' => __( 'Twitter', 'sportspress' ),
|
||||
'http://tboy.co/facebook' => __( 'Facebook', 'sportspress' ),
|
||||
'http://tboy.co/youtube' => __( 'YouTube', 'sportspress' ),
|
||||
'http://tboy.co/gplus' => __( 'Google+', 'sportspress' ),
|
||||
'http://tboy.co/twitter' => esc_attr__( 'Twitter', 'sportspress' ),
|
||||
'http://tboy.co/facebook' => esc_attr__( 'Facebook', 'sportspress' ),
|
||||
'http://tboy.co/youtube' => esc_attr__( 'YouTube', 'sportspress' ),
|
||||
'http://tboy.co/gplus' => esc_attr__( 'Google+', 'sportspress' ),
|
||||
),
|
||||
),
|
||||
'developers' => array(
|
||||
'icon' => 'dashicons dashicons-editor-code',
|
||||
'label' => __( 'Developers', 'sportspress' ),
|
||||
'label' => esc_attr__( 'Developers', 'sportspress' ),
|
||||
'links' => array(
|
||||
'http://tboy.co/developers' => __( 'Reference', 'sportspress' ),
|
||||
'http://tboy.co/slack' => __( 'Slack', 'sportspress' ),
|
||||
'http://tboy.co/github' => __( 'GitHub', 'sportspress' ),
|
||||
'http://tboy.co/developers' => esc_attr__( 'Reference', 'sportspress' ),
|
||||
'http://tboy.co/slack' => esc_attr__( 'Slack', 'sportspress' ),
|
||||
'http://tboy.co/github' => esc_attr__( 'GitHub', 'sportspress' ),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
if ( class_exists( 'SportsPress_Pro' ) ) {
|
||||
$categories['help']['links']['http://support.themeboy.com/'] = __( 'Premium Support', 'sportspress' );
|
||||
$categories['help']['links']['http://support.themeboy.com/'] = esc_attr__( 'Premium Support', 'sportspress' );
|
||||
} else {
|
||||
$categories['help']['links'][ apply_filters( 'sportspress_pro_url', 'http://tboy.co/pro' ) ] = '<span class="sp-desc-tip" title="' . __( 'Upgrade to Pro', 'sportspress' ) . '">' . __( 'Premium Support', 'sportspress' ) . '</span>';
|
||||
$categories['help']['links'][ apply_filters( 'sportspress_pro_url', 'http://tboy.co/pro' ) ] = '<span class="sp-desc-tip" title="' . esc_attr__( 'Upgrade to Pro', 'sportspress' ) . '">' . esc_attr__( 'Premium Support', 'sportspress' ) . '</span>';
|
||||
}
|
||||
|
||||
$categories = apply_filters( 'sportspress_modules_welcome_links', $categories );
|
||||
@@ -218,7 +218,7 @@ if ( ! class_exists( 'SP_Settings_Modules' ) ) :
|
||||
<table class="sp-modules-table widefat" cellspacing="0">
|
||||
<thead>
|
||||
<tr><th>
|
||||
<?php echo esc_html( sp_array_value( $this->sections, $section, __( 'Modules', 'sportspress' ) ) ); ?>
|
||||
<?php echo esc_html( sp_array_value( $this->sections, $section, esc_attr__( 'Modules', 'sportspress' ) ) ); ?>
|
||||
</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -226,7 +226,7 @@ if ( ! class_exists( 'SP_Settings_Modules' ) ) :
|
||||
<?php if ( isset( $module['class'] ) && ! class_exists( $module['class'] ) ) { ?>
|
||||
<tr class="sp-module-unavailable"><td>
|
||||
<input type="checkbox" disabled="disabled">
|
||||
<span class="sp-desc-tip" title="<?php echo esc_attr( sp_array_value( $module, 'tip', __( 'Upgrade to Pro', 'sportspress' ) ) ); ?>">
|
||||
<span class="sp-desc-tip" title="<?php echo esc_attr( sp_array_value( $module, 'tip', esc_attr__( 'Upgrade to Pro', 'sportspress' ) ) ); ?>">
|
||||
<i class="<?php echo esc_attr( sp_array_value( $module, 'icon', 'dashicons dashicons-admin-generic' ) ); ?>"></i>
|
||||
<?php echo esc_html( sp_array_value( $module, 'label', $id ) ); ?>
|
||||
</span>
|
||||
@@ -234,7 +234,7 @@ if ( ! class_exists( 'SP_Settings_Modules' ) ) :
|
||||
<span class="sp-desc">
|
||||
<?php echo wp_kses_post( $module['desc'] ); ?>
|
||||
<?php if ( array_key_exists( 'link', $module ) ) { ?>
|
||||
<a href="<?php echo esc_url( apply_filters( 'sportspress_pro_url', $module['link'] ) ); ?>" target="_blank"><?php echo esc_html( sp_array_value( $module, 'action', __( 'Learn more', 'sportspress' ) ) ); ?></a>
|
||||
<a href="<?php echo esc_url( apply_filters( 'sportspress_pro_url', $module['link'] ) ); ?>" target="_blank"><?php echo esc_html( sp_array_value( $module, 'action', esc_attr__( 'Learn more', 'sportspress' ) ) ); ?></a>
|
||||
<?php } ?>
|
||||
</span>
|
||||
<?php } ?>
|
||||
|
||||
@@ -24,7 +24,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) :
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->id = 'players';
|
||||
$this->label = __( 'Players', 'sportspress' );
|
||||
$this->label = esc_attr__( 'Players', 'sportspress' );
|
||||
$this->template = 'player';
|
||||
|
||||
add_filter( 'sportspress_settings_tabs_array', array( $this, 'add_settings_page' ), 20 );
|
||||
@@ -44,7 +44,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) :
|
||||
$settings = array_merge(
|
||||
array(
|
||||
array(
|
||||
'title' => __( 'Player Options', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Player Options', 'sportspress' ),
|
||||
'type' => 'title',
|
||||
'desc' => '',
|
||||
'id' => 'player_options',
|
||||
@@ -58,16 +58,16 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) :
|
||||
array( 'type' => 'player_tabs' ),
|
||||
|
||||
array(
|
||||
'title' => __( 'Link', 'sportspress' ),
|
||||
'desc' => __( 'Link players', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Link', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Link players', 'sportspress' ),
|
||||
'id' => 'sportspress_link_players',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Details', 'sportspress' ),
|
||||
'desc' => __( 'Squad Number', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Details', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Squad Number', 'sportspress' ),
|
||||
'id' => 'sportspress_player_show_number',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
@@ -75,7 +75,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Name', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Name', 'sportspress' ),
|
||||
'id' => 'sportspress_player_show_name',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
@@ -83,7 +83,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Nationality', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Nationality', 'sportspress' ),
|
||||
'id' => 'sportspress_player_show_nationality',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
@@ -91,7 +91,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Position', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Position', 'sportspress' ),
|
||||
'id' => 'sportspress_player_show_positions',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
@@ -99,7 +99,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Current Team', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Current Team', 'sportspress' ),
|
||||
'id' => 'sportspress_player_show_current_teams',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
@@ -107,7 +107,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Past Teams', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Past Teams', 'sportspress' ),
|
||||
'id' => 'sportspress_player_show_past_teams',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
@@ -115,7 +115,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Leagues', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Leagues', 'sportspress' ),
|
||||
'id' => 'sportspress_player_show_leagues',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
@@ -123,7 +123,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Seasons', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Seasons', 'sportspress' ),
|
||||
'id' => 'sportspress_player_show_seasons',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
@@ -131,8 +131,8 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Nationality', 'sportspress' ),
|
||||
'desc' => __( 'Display national flags', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Nationality', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Display national flags', 'sportspress' ),
|
||||
'id' => 'sportspress_player_show_flags',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
@@ -147,49 +147,49 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) :
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'title' => __( 'Statistics', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Statistics', 'sportspress' ),
|
||||
'type' => 'title',
|
||||
'desc' => '',
|
||||
'id' => 'player_statistic_options',
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Columns', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Columns', 'sportspress' ),
|
||||
'id' => 'sportspress_player_columns',
|
||||
'default' => 'auto',
|
||||
'type' => 'radio',
|
||||
'options' => array(
|
||||
'auto' => __( 'Auto', 'sportspress' ),
|
||||
'manual' => __( 'Manual', 'sportspress' ),
|
||||
'auto' => esc_attr__( 'Auto', 'sportspress' ),
|
||||
'manual' => esc_attr__( 'Manual', 'sportspress' ),
|
||||
),
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Mode', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Mode', 'sportspress' ),
|
||||
'id' => 'sportspress_player_statistics_mode',
|
||||
'default' => 'values',
|
||||
'type' => 'radio',
|
||||
'options' => array(
|
||||
'values' => __( 'Values', 'sportspress' ),
|
||||
'icons' => __( 'Icons', 'sportspress' ),
|
||||
'values' => esc_attr__( 'Values', 'sportspress' ),
|
||||
'icons' => esc_attr__( 'Icons', 'sportspress' ),
|
||||
),
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Categories', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Categories', 'sportspress' ),
|
||||
'id' => 'sportspress_player_performance_sections',
|
||||
'default' => -1,
|
||||
'type' => 'radio',
|
||||
'options' => array(
|
||||
-1 => __( 'Combined', 'sportspress' ),
|
||||
0 => __( 'Offense', 'sportspress' ) . ' → ' . __( 'Defense', 'sportspress' ),
|
||||
1 => __( 'Defense', 'sportspress' ) . ' → ' . __( 'Offense', 'sportspress' ),
|
||||
-1 => esc_attr__( 'Combined', 'sportspress' ),
|
||||
0 => esc_attr__( 'Offense', 'sportspress' ) . ' → ' . esc_attr__( 'Defense', 'sportspress' ),
|
||||
1 => esc_attr__( 'Defense', 'sportspress' ) . ' → ' . esc_attr__( 'Offense', 'sportspress' ),
|
||||
),
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Display', 'sportspress' ),
|
||||
'desc' => __( 'Total', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Display', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Total', 'sportspress' ),
|
||||
'id' => 'sportspress_player_show_total',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
@@ -197,7 +197,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Career Total', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Career Total', 'sportspress' ),
|
||||
'id' => 'sportspress_player_show_career_total',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
|
||||
@@ -24,7 +24,7 @@ if ( ! class_exists( 'SP_Settings_Staff' ) ) :
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->id = 'staff';
|
||||
$this->label = __( 'Staff', 'sportspress' );
|
||||
$this->label = esc_attr__( 'Staff', 'sportspress' );
|
||||
$this->template = 'staff';
|
||||
|
||||
add_filter( 'sportspress_settings_tabs_array', array( $this, 'add_settings_page' ), 20 );
|
||||
@@ -46,7 +46,7 @@ if ( ! class_exists( 'SP_Settings_Staff' ) ) :
|
||||
array_merge(
|
||||
array(
|
||||
array(
|
||||
'title' => __( 'Staff Options', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Staff Options', 'sportspress' ),
|
||||
'type' => 'title',
|
||||
'desc' => '',
|
||||
'id' => 'staff_options',
|
||||
@@ -60,16 +60,16 @@ if ( ! class_exists( 'SP_Settings_Staff' ) ) :
|
||||
array( 'type' => 'staff_tabs' ),
|
||||
|
||||
array(
|
||||
'title' => __( 'Link', 'sportspress' ),
|
||||
'desc' => __( 'Link staff', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Link', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Link staff', 'sportspress' ),
|
||||
'id' => 'sportspress_link_staff',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Details', 'sportspress' ),
|
||||
'desc' => __( 'Nationality', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Details', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Nationality', 'sportspress' ),
|
||||
'id' => 'sportspress_staff_show_nationality',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
@@ -77,7 +77,7 @@ if ( ! class_exists( 'SP_Settings_Staff' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Current Team', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Current Team', 'sportspress' ),
|
||||
'id' => 'sportspress_staff_show_current_teams',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
@@ -85,7 +85,7 @@ if ( ! class_exists( 'SP_Settings_Staff' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Past Teams', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Past Teams', 'sportspress' ),
|
||||
'id' => 'sportspress_staff_show_past_teams',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
@@ -93,8 +93,8 @@ if ( ! class_exists( 'SP_Settings_Staff' ) ) :
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Nationality', 'sportspress' ),
|
||||
'desc' => __( 'Display national flags', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Nationality', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Display national flags', 'sportspress' ),
|
||||
'id' => 'sportspress_staff_show_flags',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
|
||||
@@ -24,7 +24,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->id = 'status';
|
||||
$this->label = __( 'System Status', 'sportspress' );
|
||||
$this->label = esc_attr__( 'System Status', 'sportspress' );
|
||||
|
||||
if ( defined( 'WP_DEBUG' ) && true === WP_DEBUG && current_user_can( 'manage_options' ) ) {
|
||||
add_filter( 'sportspress_settings_tabs_array', array( $this, 'add_settings_page' ), 99 );
|
||||
@@ -105,7 +105,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
$memory = sp_let_to_num( WP_MEMORY_LIMIT );
|
||||
|
||||
if ( $memory < 67108864 ) {
|
||||
echo '<mark class="error">' . sprintf( esc_html__( '%1$s - We recommend setting memory to at least 64MB. See: <a href="%2$s">Increasing memory allocated to PHP</a>', 'sportspress' ), esc_html( size_format( $memory ) ), 'http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP' ) . '</mark>';
|
||||
echo '<mark class="error">' . wp_kses_post( sprintf( esc_attr__( '%1$s - We recommend setting memory to at least 64MB. See: <a href="%2$s">Increasing memory allocated to PHP</a>', 'sportspress' ), esc_html( size_format( $memory ) ), 'http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP' ) ) . '</mark>';
|
||||
} else {
|
||||
echo '<mark class="yes">' . esc_html( size_format( $memory ) ) . '</mark>';
|
||||
}
|
||||
@@ -164,9 +164,9 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
<?php
|
||||
$default_timezone = date_default_timezone_get();
|
||||
if ( 'UTC' !== $default_timezone ) {
|
||||
echo '<mark class="error">' . sprintf( esc_html__( 'Default timezone is %s - it should be UTC', 'sportspress' ), $default_timezone ) . '</mark>';
|
||||
echo '<mark class="error">' . sprintf( esc_html__( 'Default timezone is %s - it should be UTC', 'sportspress' ), esc_attr( $default_timezone ) ) . '</mark>';
|
||||
} else {
|
||||
echo '<mark class="yes">' . sprintf( esc_html__( 'Default timezone is %s', 'sportspress' ), $default_timezone ) . '</mark>';
|
||||
echo '<mark class="yes">' . sprintf( esc_html__( 'Default timezone is %s', 'sportspress' ), esc_attr( $default_timezone ) ) . '</mark>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
@@ -175,28 +175,28 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
$posting = array();
|
||||
|
||||
// fsockopen/cURL
|
||||
$posting['fsockopen_curl']['name'] = __( 'fsockopen/cURL', 'sportspress' );
|
||||
$posting['fsockopen_curl']['name'] = esc_attr__( 'fsockopen/cURL', 'sportspress' );
|
||||
if ( function_exists( 'fsockopen' ) || function_exists( 'curl_init' ) ) {
|
||||
if ( function_exists( 'fsockopen' ) && function_exists( 'curl_init' ) ) {
|
||||
$posting['fsockopen_curl']['note'] = __( 'Your server has fsockopen and cURL enabled.', 'sportspress' );
|
||||
$posting['fsockopen_curl']['note'] = esc_attr__( 'Your server has fsockopen and cURL enabled.', 'sportspress' );
|
||||
} elseif ( function_exists( 'fsockopen' ) ) {
|
||||
$posting['fsockopen_curl']['note'] = __( 'Your server has fsockopen enabled, cURL is disabled.', 'sportspress' );
|
||||
$posting['fsockopen_curl']['note'] = esc_attr__( 'Your server has fsockopen enabled, cURL is disabled.', 'sportspress' );
|
||||
} else {
|
||||
$posting['fsockopen_curl']['note'] = __( 'Your server has cURL enabled, fsockopen is disabled.', 'sportspress' );
|
||||
$posting['fsockopen_curl']['note'] = esc_attr__( 'Your server has cURL enabled, fsockopen is disabled.', 'sportspress' );
|
||||
}
|
||||
$posting['fsockopen_curl']['success'] = true;
|
||||
} else {
|
||||
$posting['fsockopen_curl']['note'] = __( 'Your server does not have fsockopen or cURL enabled - PayPal IPN and other scripts which communicate with other servers will not work. Contact your hosting provider.', 'sportspress' ) . '</mark>';
|
||||
$posting['fsockopen_curl']['note'] = esc_attr__( 'Your server does not have fsockopen or cURL enabled - PayPal IPN and other scripts which communicate with other servers will not work. Contact your hosting provider.', 'sportspress' ) . '</mark>';
|
||||
$posting['fsockopen_curl']['success'] = false;
|
||||
}
|
||||
|
||||
// SOAP
|
||||
$posting['soap_client']['name'] = __( 'SOAP Client', 'sportspress' );
|
||||
$posting['soap_client']['name'] = esc_attr__( 'SOAP Client', 'sportspress' );
|
||||
if ( class_exists( 'SoapClient' ) ) {
|
||||
$posting['soap_client']['note'] = __( 'Your server has the SOAP Client class enabled.', 'sportspress' );
|
||||
$posting['soap_client']['note'] = esc_attr__( 'Your server has the SOAP Client class enabled.', 'sportspress' );
|
||||
$posting['soap_client']['success'] = true;
|
||||
} else {
|
||||
$posting['soap_client']['note'] = sprintf( __( 'Your server does not have the <a href="%s">SOAP Client</a> class enabled - some gateway plugins which use SOAP may not work as expected.', 'sportspress' ), 'http://php.net/manual/en/class.soapclient.php' ) . '</mark>';
|
||||
$posting['soap_client']['note'] = sprintf( esc_attr__( 'Your server does not have the <a href="%s">SOAP Client</a> class enabled - some gateway plugins which use SOAP may not work as expected.', 'sportspress' ), 'http://php.net/manual/en/class.soapclient.php' ) . '</mark>';
|
||||
$posting['soap_client']['success'] = false;
|
||||
}
|
||||
|
||||
@@ -248,7 +248,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
// link the plugin name to the plugin url if available
|
||||
$plugin_name = $plugin_data['Name'];
|
||||
if ( ! empty( $plugin_data['PluginURI'] ) ) {
|
||||
$plugin_name = '<a href="' . esc_url( $plugin_data['PluginURI'] ) . '" title="' . __( 'Visit plugin homepage', 'sportspress' ) . '">' . $plugin_name . '</a>';
|
||||
$plugin_name = '<a href="' . esc_url( $plugin_data['PluginURI'] ) . '" title="' . esc_attr__( 'Visit plugin homepage', 'sportspress' ) . '">' . $plugin_name . '</a>';
|
||||
}
|
||||
|
||||
if ( strstr( $dirname, 'sportspress' ) ) {
|
||||
@@ -277,11 +277,11 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
}
|
||||
|
||||
if ( ! empty( $version_data['version'] ) && version_compare( $version_data['version'], $plugin_data['Version'], '>' ) ) {
|
||||
$version_string = ' – <strong style="color:red;">' . $version_data['version'] . ' ' . __( 'is available', 'sportspress' ) . '</strong>';
|
||||
$version_string = ' – <strong style="color:red;">' . $version_data['version'] . ' ' . esc_attr__( 'is available', 'sportspress' ) . '</strong>';
|
||||
}
|
||||
}
|
||||
|
||||
$sp_plugins[] = $plugin_name . ' ' . __( 'by', 'sportspress' ) . ' ' . $plugin_data['Author'] . ' ' . __( 'version', 'sportspress' ) . ' ' . $plugin_data['Version'] . $version_string;
|
||||
$sp_plugins[] = $plugin_name . ' ' . esc_attr__( 'by', 'sportspress' ) . ' ' . $plugin_data['Author'] . ' ' . esc_attr__( 'version', 'sportspress' ) . ' ' . $plugin_data['Version'] . $version_string;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -306,7 +306,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?php esc_html_e( 'Sport', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo get_option( 'sportspress_sport', __( 'None', 'sportspress' ) ); ?></td>
|
||||
<td><?php echo esc_attr( get_option( 'sportspress_sport', __( 'None', 'sportspress' ) ) ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php esc_html_e( 'Event Outcomes', 'sportspress' ); ?>:</td>
|
||||
@@ -636,7 +636,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
$theme_version = $status->get_file_version( $theme_file );
|
||||
|
||||
if ( $core_version && ( empty( $theme_version ) || version_compare( $theme_version, $core_version, '<' ) ) ) {
|
||||
$found_files[ $plugin_name ][] = sprintf( __( '<code>%1$s</code> version <strong style="color:red">%2$s</strong> is out of date. The core version is %3$s', 'sportspress' ), basename( $theme_file ), $theme_version ? $theme_version : '-', $core_version );
|
||||
$found_files[ $plugin_name ][] = sprintf( esc_attr__( '<code>%1$s</code> version <strong style="color:red">%2$s</strong> is out of date. The core version is %3$s', 'sportspress' ), basename( $theme_file ), $theme_version ? $theme_version : '-', $core_version );
|
||||
} else {
|
||||
$found_files[ $plugin_name ][] = sprintf( '<code>%s</code>', basename( $theme_file ) );
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ if ( ! class_exists( 'SP_Settings_Teams' ) ) :
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->id = 'teams';
|
||||
$this->label = __( 'Teams', 'sportspress' );
|
||||
$this->label = esc_attr__( 'Teams', 'sportspress' );
|
||||
$this->template = 'team';
|
||||
|
||||
add_filter( 'sportspress_settings_tabs_array', array( $this, 'add_settings_page' ), 20 );
|
||||
@@ -44,7 +44,7 @@ if ( ! class_exists( 'SP_Settings_Teams' ) ) :
|
||||
$settings = array_merge(
|
||||
array(
|
||||
array(
|
||||
'title' => __( 'Team Options', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Team Options', 'sportspress' ),
|
||||
'type' => 'title',
|
||||
'desc' => '',
|
||||
'id' => 'team_options',
|
||||
@@ -58,40 +58,40 @@ if ( ! class_exists( 'SP_Settings_Teams' ) ) :
|
||||
array( 'type' => 'team_tabs' ),
|
||||
|
||||
array(
|
||||
'title' => __( 'Staff', 'sportspress' ),
|
||||
'desc' => __( 'Link staff', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Staff', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Link staff', 'sportspress' ),
|
||||
'id' => 'sportspress_team_link_staff',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Link', 'sportspress' ),
|
||||
'desc' => __( 'Link teams', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Link', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Link teams', 'sportspress' ),
|
||||
'id' => 'sportspress_link_teams',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Venue', 'sportspress' ),
|
||||
'desc' => __( 'Link venues', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Venue', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Link venues', 'sportspress' ),
|
||||
'id' => 'sportspress_team_link_venues',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Visit Site', 'sportspress' ),
|
||||
'desc' => __( 'Open link in a new window/tab', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Visit Site', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Open link in a new window/tab', 'sportspress' ),
|
||||
'id' => 'sportspress_team_site_target_blank',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Comments', 'sportspress' ),
|
||||
'desc' => __( 'Allow people to post comments on Team page', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Comments', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'Allow people to post comments on Team page', 'sportspress' ),
|
||||
'id' => 'sportspress_team_comment_status',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
|
||||
@@ -24,7 +24,7 @@ if ( ! class_exists( 'SP_Settings_Text' ) ) :
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->id = 'text';
|
||||
$this->label = __( 'Text', 'sportspress' );
|
||||
$this->label = esc_attr__( 'Text', 'sportspress' );
|
||||
|
||||
add_filter( 'sportspress_settings_tabs_array', array( $this, 'add_settings_page' ), 20 );
|
||||
add_action( 'sportspress_settings_' . $this->id, array( $this, 'output' ) );
|
||||
@@ -40,9 +40,9 @@ if ( ! class_exists( 'SP_Settings_Text' ) ) :
|
||||
|
||||
$settings = array(
|
||||
array(
|
||||
'title' => __( 'Text', 'sportspress' ),
|
||||
'title' => esc_attr__( 'Text', 'sportspress' ),
|
||||
'type' => 'title',
|
||||
'desc' => __( 'The following options affect how words are displayed on the frontend.', 'sportspress' ),
|
||||
'desc' => esc_attr__( 'The following options affect how words are displayed on the frontend.', 'sportspress' ),
|
||||
'id' => 'text_options',
|
||||
),
|
||||
);
|
||||
|
||||
@@ -4,7 +4,7 @@ $columns = get_option( 'sportspress_player_columns', 'auto' );
|
||||
|
||||
<div class="wrap sportspress sportspress-config-wrap">
|
||||
<h2>
|
||||
<?php _e( 'Configure', 'sportspress' ); ?>
|
||||
<?php esc_html_e( 'Configure', 'sportspress' ); ?>
|
||||
</h2>
|
||||
<table class="form-table">
|
||||
<tbody>
|
||||
@@ -20,18 +20,18 @@ $columns = get_option( 'sportspress_player_columns', 'auto' );
|
||||
?>
|
||||
<tr valign="top">
|
||||
<th scope="row" class="titledesc">
|
||||
<?php _e( 'Event Outcomes', 'sportspress' ); ?>
|
||||
<p class="description"><?php _e( 'Used for events.', 'sportspress' ); ?></p>
|
||||
<?php esc_html_e( 'Event Outcomes', 'sportspress' ); ?>
|
||||
<p class="description"><?php esc_html_e( 'Used for events.', 'sportspress' ); ?></p>
|
||||
</th>
|
||||
<td class="forminp">
|
||||
<table class="widefat sp-admin-config-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Variable', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Abbreviation', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Condition', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Label', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Variable', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Abbreviation', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Condition', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Description', 'sportspress' ); ?></th>
|
||||
<th scope="col" class="edit"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -50,20 +50,20 @@ $columns = get_option( 'sportspress_player_columns', 'auto' );
|
||||
<td><?php echo esc_html( sp_get_post_abbreviation( $row->ID ) ); ?></td>
|
||||
<td><?php echo esc_html( sp_get_post_condition( $row->ID ) ); ?></td>
|
||||
<td><p class="description"><?php echo wp_kses_post( $row->post_excerpt ); ?></p></td>
|
||||
<td class="edit"><a class="button" href="<?php echo get_edit_post_link( $row->ID ); ?>"><?php _e( 'Edit', 'sportspress' ); ?></s></td>
|
||||
<td class="edit"><a class="button" href="<?php echo esc_url( get_edit_post_link( $row->ID ) ); ?>"><?php esc_html_e( 'Edit', 'sportspress' ); ?></s></td>
|
||||
</tr>
|
||||
<?php
|
||||
$i++;
|
||||
endforeach; else :
|
||||
?>
|
||||
<tr class="alternate">
|
||||
<td colspan="6"><?php _e( 'No results found.', 'sportspress' ); ?></td>
|
||||
<td colspan="6"><?php esc_html_e( 'No results found.', 'sportspress' ); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="tablenav bottom">
|
||||
<a class="button alignleft" href="<?php echo admin_url( 'edit.php?post_type=sp_outcome' ); ?>"><?php _e( 'View All', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary alignright" href="<?php echo admin_url( 'post-new.php?post_type=sp_outcome' ); ?>"><?php _e( 'Add New', 'sportspress' ); ?></a>
|
||||
<a class="button alignleft" href="<?php echo esc_url( admin_url( 'edit.php?post_type=sp_outcome' ) ); ?>"><?php esc_html_e( 'View All', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary alignright" href="<?php echo esc_url( admin_url( 'post-new.php?post_type=sp_outcome' ) ); ?>"><?php esc_html_e( 'Add New', 'sportspress' ); ?></a>
|
||||
<br class="clear">
|
||||
</div>
|
||||
</td>
|
||||
@@ -86,22 +86,22 @@ endforeach; else :
|
||||
?>
|
||||
<tr valign="top">
|
||||
<th scope="row" class="titledesc">
|
||||
<?php _e( 'Event Results', 'sportspress' ); ?>
|
||||
<p class="description"><?php _e( 'Used for events.', 'sportspress' ); ?></p>
|
||||
<?php esc_html_e( 'Event Results', 'sportspress' ); ?>
|
||||
<p class="description"><?php esc_html_e( 'Used for events.', 'sportspress' ); ?></p>
|
||||
</th>
|
||||
<td class="forminp">
|
||||
<legend class="screen-reader-text"><span><?php _e( 'Event Results', 'sportspress' ); ?></span></legend>
|
||||
<legend class="screen-reader-text"><span><?php esc_html_e( 'Event Results', 'sportspress' ); ?></span></legend>
|
||||
<form>
|
||||
<?php wp_nonce_field( 'sp-save-primary-result', 'sp-primary-result-nonce', false ); ?>
|
||||
<table class="widefat sp-admin-config-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="radio" scope="col"><?php _e( 'Primary', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Variables', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Equation', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Decimal Places', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
||||
<th class="radio" scope="col"><?php esc_html_e( 'Primary', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Label', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Variables', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Equation', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Decimal Places', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Description', 'sportspress' ); ?></th>
|
||||
<th scope="col" class="edit"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -113,9 +113,9 @@ endforeach; else :
|
||||
if ( sizeof( $data ) > 0 ) :
|
||||
$default = end( $data );
|
||||
reset( $data );
|
||||
printf( __( 'Default (%s)', 'sportspress' ), $default->post_title );
|
||||
printf( esc_html__( 'Default (%s)', 'sportspress' ), esc_html( $default->post_title ) );
|
||||
else :
|
||||
_e( 'Default', 'sportspress' );
|
||||
esc_attr_e( 'Default', 'sportspress' );
|
||||
endif;
|
||||
?>
|
||||
</label></th>
|
||||
@@ -137,21 +137,21 @@ endforeach; else :
|
||||
<td><?php echo esc_html( sp_get_post_equation( $row->ID ) ); ?></td>
|
||||
<td><?php echo esc_html( sp_get_post_precision( $row->ID ) ); ?></td>
|
||||
<td><p class="description"><?php echo wp_kses_post( $row->post_excerpt ); ?></p></td>
|
||||
<td class="edit"><a class="button" href="<?php echo get_edit_post_link( $row->ID ); ?>"><?php _e( 'Edit', 'sportspress' ); ?></s></td>
|
||||
<td class="edit"><a class="button" href="<?php echo esc_url( get_edit_post_link( $row->ID ) ); ?>"><?php esc_html_e( 'Edit', 'sportspress' ); ?></s></td>
|
||||
</tr>
|
||||
<?php
|
||||
$i++;
|
||||
endforeach; else :
|
||||
?>
|
||||
<tr class="alternate">
|
||||
<td colspan="7"><?php _e( 'No results found.', 'sportspress' ); ?></td>
|
||||
<td colspan="7"><?php esc_html_e( 'No results found.', 'sportspress' ); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</form>
|
||||
<div class="tablenav bottom">
|
||||
<a class="button alignleft" href="<?php echo admin_url( 'edit.php?post_type=sp_result' ); ?>"><?php _e( 'View All', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary alignright" href="<?php echo admin_url( 'post-new.php?post_type=sp_result' ); ?>"><?php _e( 'Add New', 'sportspress' ); ?></a>
|
||||
<a class="button alignleft" href="<?php echo esc_url( admin_url( 'edit.php?post_type=sp_result' ) ); ?>"><?php esc_html_e( 'View All', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary alignright" href="<?php echo esc_url( admin_url( 'post-new.php?post_type=sp_result' ) ); ?>"><?php esc_html_e( 'Add New', 'sportspress' ); ?></a>
|
||||
<br class="clear">
|
||||
</div>
|
||||
</td>
|
||||
@@ -179,29 +179,29 @@ endforeach; else :
|
||||
?>
|
||||
<tr valign="top">
|
||||
<th scope="row" class="titledesc">
|
||||
<?php _e( 'Player Performance', 'sportspress' ); ?>
|
||||
<p class="description"><?php _e( 'Used for events.', 'sportspress' ); ?></p>
|
||||
<?php esc_html_e( 'Player Performance', 'sportspress' ); ?>
|
||||
<p class="description"><?php esc_html_e( 'Used for events.', 'sportspress' ); ?></p>
|
||||
</th>
|
||||
<td class="forminp">
|
||||
<legend class="screen-reader-text"><span><?php _e( 'Player Performance', 'sportspress' ); ?></span></legend>
|
||||
<legend class="screen-reader-text"><span><?php esc_html_e( 'Player Performance', 'sportspress' ); ?></span></legend>
|
||||
<form>
|
||||
<?php wp_nonce_field( 'sp-save-primary-performance', 'sp-primary-performance-nonce', false ); ?>
|
||||
<table class="widefat sp-admin-config-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="radio" scope="col"><?php _e( 'Primary', 'sportspress' ); ?></th>
|
||||
<th class="icon" scope="col"><?php _e( 'Icon', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Variable', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Category', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Format', 'sportspress' ); ?></th>
|
||||
<th class="radio" scope="col"><?php esc_html_e( 'Primary', 'sportspress' ); ?></th>
|
||||
<th class="icon" scope="col"><?php esc_html_e( 'Icon', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Label', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Variable', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Category', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Format', 'sportspress' ); ?></th>
|
||||
<?php if ( 'auto' === $columns ) { ?>
|
||||
<th scope="col">
|
||||
<?php _e( 'Visible', 'sportspress' ); ?>
|
||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php _e( 'Display in player profile?', 'sportspress' ); ?>"></i>
|
||||
<?php esc_html_e( 'Visible', 'sportspress' ); ?>
|
||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php esc_html_e( 'Display in player profile?', 'sportspress' ); ?>"></i>
|
||||
</th>
|
||||
<?php } ?>
|
||||
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Description', 'sportspress' ); ?></th>
|
||||
<th scope="col" class="edit"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -209,13 +209,13 @@ endforeach; else :
|
||||
<tr>
|
||||
<th class="radio"><input type="radio" class="sp-primary-performance-option" id="sportspress_primary_performance_0" name="sportspress_primary_performance" value="0" <?php checked( $selection, 0 ); ?>></th>
|
||||
<th class="icon"> </td>
|
||||
<th colspan="<?php echo $colspan - 1; ?>"><label for="sportspress_primary_performance_0">
|
||||
<th colspan="<?php echo esc_html( $colspan - 1 ); ?>"><label for="sportspress_primary_performance_0">
|
||||
<?php
|
||||
if ( sizeof( $data ) > 0 ) :
|
||||
$default = reset( $data );
|
||||
printf( __( 'Default (%s)', 'sportspress' ), $default->post_title );
|
||||
printf( esc_html__( 'Default (%s)', 'sportspress' ), esc_html( $default->post_title ) );
|
||||
else :
|
||||
_e( 'Default', 'sportspress' );
|
||||
esc_attr_e( 'Default', 'sportspress' );
|
||||
endif;
|
||||
?>
|
||||
</label></th>
|
||||
@@ -246,7 +246,7 @@ endforeach; else :
|
||||
$icon = ' ';
|
||||
}
|
||||
|
||||
echo apply_filters( 'sportspress_performance_icon', $icon, $row->ID );
|
||||
echo wp_kses_post( apply_filters( 'sportspress_performance_icon', $icon, $row->ID ) );
|
||||
?>
|
||||
</td>
|
||||
<td class="row-title"><?php echo esc_html( $row->post_title ); ?></td>
|
||||
@@ -266,21 +266,21 @@ endforeach; else :
|
||||
</td>
|
||||
<?php } ?>
|
||||
<td><p class="description"><?php echo wp_kses_post( $row->post_excerpt ); ?></p></td>
|
||||
<td class="edit"><a class="button" href="<?php echo get_edit_post_link( $row->ID ); ?>"><?php _e( 'Edit', 'sportspress' ); ?></s></td>
|
||||
<td class="edit"><a class="button" href="<?php echo esc_url( get_edit_post_link( $row->ID ) ); ?>"><?php esc_html_e( 'Edit', 'sportspress' ); ?></s></td>
|
||||
</tr>
|
||||
<?php
|
||||
$i++;
|
||||
endforeach; else :
|
||||
?>
|
||||
<tr class="alternate">
|
||||
<td colspan="<?php echo $colspan; ?>"><?php _e( 'No results found.', 'sportspress' ); ?></td>
|
||||
<td colspan="<?php echo esc_attr( $colspan ); ?>"><?php esc_html_e( 'No results found.', 'sportspress' ); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</form>
|
||||
<div class="tablenav bottom">
|
||||
<a class="button alignleft" href="<?php echo admin_url( 'edit.php?post_type=sp_performance' ); ?>"><?php _e( 'View All', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary alignright" href="<?php echo admin_url( 'post-new.php?post_type=sp_performance' ); ?>"><?php _e( 'Add New', 'sportspress' ); ?></a>
|
||||
<a class="button alignleft" href="<?php echo esc_url( admin_url( 'edit.php?post_type=sp_performance' ) ); ?>"><?php esc_html_e( 'View All', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary alignright" href="<?php echo esc_url( admin_url( 'post-new.php?post_type=sp_performance' ) ); ?>"><?php esc_html_e( 'Add New', 'sportspress' ); ?></a>
|
||||
<br class="clear">
|
||||
</div>
|
||||
</td>
|
||||
@@ -301,18 +301,18 @@ endforeach; else :
|
||||
?>
|
||||
<tr valign="top">
|
||||
<th scope="row" class="titledesc">
|
||||
<?php _e( 'Table Columns', 'sportspress' ); ?>
|
||||
<p class="description"><?php _e( 'Used for league tables.', 'sportspress' ); ?></p>
|
||||
<?php esc_html_e( 'Table Columns', 'sportspress' ); ?>
|
||||
<p class="description"><?php esc_html_e( 'Used for league tables.', 'sportspress' ); ?></p>
|
||||
</th>
|
||||
<td class="forminp">
|
||||
<table class="widefat sp-admin-config-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Equation', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Decimal Places', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Sort Order', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Label', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Equation', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Decimal Places', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Sort Order', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Description', 'sportspress' ); ?></th>
|
||||
<th scope="col" class="edit"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -331,20 +331,20 @@ endforeach; else :
|
||||
<td><?php echo esc_html( sp_get_post_precision( $row->ID ) ); ?></td>
|
||||
<td><?php echo esc_html( sp_get_post_order( $row->ID ) ); ?></td>
|
||||
<td><p class="description"><?php echo wp_kses_post( $row->post_excerpt ); ?></p></td>
|
||||
<td class="edit"><a class="button" href="<?php echo get_edit_post_link( $row->ID ); ?>"><?php _e( 'Edit', 'sportspress' ); ?></s></td>
|
||||
<td class="edit"><a class="button" href="<?php echo esc_url( get_edit_post_link( $row->ID ) ); ?>"><?php esc_html_e( 'Edit', 'sportspress' ); ?></s></td>
|
||||
</tr>
|
||||
<?php
|
||||
$i++;
|
||||
endforeach; else :
|
||||
?>
|
||||
<tr class="alternate">
|
||||
<td colspan="7"><?php _e( 'No results found.', 'sportspress' ); ?></td>
|
||||
<td colspan="7"><?php esc_html_e( 'No results found.', 'sportspress' ); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="tablenav bottom">
|
||||
<a class="button alignleft" href="<?php echo admin_url( 'edit.php?post_type=sp_column' ); ?>"><?php _e( 'View All', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary alignright" href="<?php echo admin_url( 'post-new.php?post_type=sp_column' ); ?>"><?php _e( 'Add New', 'sportspress' ); ?></a>
|
||||
<a class="button alignleft" href="<?php echo esc_url( admin_url( 'edit.php?post_type=sp_column' ) ); ?>"><?php esc_html_e( 'View All', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary alignright" href="<?php echo esc_url( admin_url( 'post-new.php?post_type=sp_column' ) ); ?>"><?php esc_html_e( 'Add New', 'sportspress' ); ?></a>
|
||||
<br class="clear">
|
||||
</div>
|
||||
</fieldset>
|
||||
@@ -366,16 +366,16 @@ endforeach; else :
|
||||
?>
|
||||
<tr valign="top">
|
||||
<th scope="row" class="titledesc">
|
||||
<?php _e( 'Player Metrics', 'sportspress' ); ?>
|
||||
<p class="description"><?php _e( 'Used for player lists.', 'sportspress' ); ?></p>
|
||||
<?php esc_html_e( 'Player Metrics', 'sportspress' ); ?>
|
||||
<p class="description"><?php esc_html_e( 'Used for player lists.', 'sportspress' ); ?></p>
|
||||
</th>
|
||||
<td class="forminp">
|
||||
<table class="widefat sp-admin-config-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Variable', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Label', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Variable', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Description', 'sportspress' ); ?></th>
|
||||
<th scope="col" class="edit"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -392,20 +392,20 @@ endforeach; else :
|
||||
<td class="row-title"><?php echo esc_html( $row->post_title ); ?></td>
|
||||
<td><code><?php echo esc_html( $row->post_name ); ?></code></td>
|
||||
<td><p class="description"><?php echo wp_kses_post( $row->post_excerpt ); ?></p></td>
|
||||
<td class="edit"><a class="button" href="<?php echo get_edit_post_link( $row->ID ); ?>"><?php _e( 'Edit', 'sportspress' ); ?></s></td>
|
||||
<td class="edit"><a class="button" href="<?php echo esc_url( get_edit_post_link( $row->ID ) ); ?>"><?php esc_html_e( 'Edit', 'sportspress' ); ?></s></td>
|
||||
</tr>
|
||||
<?php
|
||||
$i++;
|
||||
endforeach; else :
|
||||
?>
|
||||
<tr class="alternate">
|
||||
<td colspan="4"><?php _e( 'No results found.', 'sportspress' ); ?></td>
|
||||
<td colspan="4"><?php esc_html_e( 'No results found.', 'sportspress' ); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="tablenav bottom">
|
||||
<a class="button alignleft" href="<?php echo admin_url( 'edit.php?post_type=sp_metric' ); ?>"><?php _e( 'View All', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary alignright" href="<?php echo admin_url( 'post-new.php?post_type=sp_metric' ); ?>"><?php _e( 'Add New', 'sportspress' ); ?></a>
|
||||
<a class="button alignleft" href="<?php echo esc_url( admin_url( 'edit.php?post_type=sp_metric' ) ); ?>"><?php esc_html_e( 'View All', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary alignright" href="<?php echo esc_url( admin_url( 'post-new.php?post_type=sp_metric' ) ); ?>"><?php esc_html_e( 'Add New', 'sportspress' ); ?></a>
|
||||
<br class="clear">
|
||||
</div>
|
||||
</td>
|
||||
@@ -432,25 +432,25 @@ endforeach; else :
|
||||
?>
|
||||
<tr valign="top">
|
||||
<th scope="row" class="titledesc">
|
||||
<?php _e( 'Player Statistics', 'sportspress' ); ?>
|
||||
<p class="description"><?php _e( 'Used for player lists.', 'sportspress' ); ?></p>
|
||||
<?php esc_html_e( 'Player Statistics', 'sportspress' ); ?>
|
||||
<p class="description"><?php esc_html_e( 'Used for player lists.', 'sportspress' ); ?></p>
|
||||
</th>
|
||||
<td class="forminp">
|
||||
<table class="widefat sp-admin-config-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
||||
<th class="icon" scope="col"><?php _e( 'Icon', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Equation', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Decimal Places', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Category', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Label', 'sportspress' ); ?></th>
|
||||
<th class="icon" scope="col"><?php esc_html_e( 'Icon', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Equation', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Decimal Places', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Category', 'sportspress' ); ?></th>
|
||||
<?php if ( 'auto' === $columns ) { ?>
|
||||
<th scope="col">
|
||||
<?php _e( 'Visible', 'sportspress' ); ?>
|
||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php _e( 'Display in player profile?', 'sportspress' ); ?>"></i>
|
||||
<?php esc_html_e( 'Visible', 'sportspress' ); ?>
|
||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php esc_html_e( 'Display in player profile?', 'sportspress' ); ?>"></i>
|
||||
</th>
|
||||
<?php } ?>
|
||||
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Description', 'sportspress' ); ?></th>
|
||||
<th scope="col" class="edit"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -479,7 +479,7 @@ endforeach; else :
|
||||
$icon = ' ';
|
||||
}
|
||||
|
||||
echo apply_filters( 'sportspress_performance_icon', $icon, $row->ID );
|
||||
echo wp_kses_post( apply_filters( 'sportspress_performance_icon', $icon, $row->ID ) );
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo wp_kses_post( sp_get_post_equation( $row->ID ) ); ?></td>
|
||||
@@ -498,20 +498,20 @@ endforeach; else :
|
||||
</td>
|
||||
<?php } ?>
|
||||
<td><p class="description"><?php echo wp_kses_post( $row->post_excerpt ); ?></p></td>
|
||||
<td class="edit"><a class="button" href="<?php echo get_edit_post_link( $row->ID ); ?>"><?php _e( 'Edit', 'sportspress' ); ?></s></td>
|
||||
<td class="edit"><a class="button" href="<?php echo esc_url( get_edit_post_link( $row->ID ) ); ?>"><?php esc_html_e( 'Edit', 'sportspress' ); ?></s></td>
|
||||
</tr>
|
||||
<?php
|
||||
$i++;
|
||||
endforeach; else :
|
||||
?>
|
||||
<tr class="alternate">
|
||||
<td colspan="<?php echo $colspan; ?>"><?php _e( 'No results found.', 'sportspress' ); ?></td>
|
||||
<td colspan="<?php echo esc_attr( $colspan ); ?>"><?php esc_html_e( 'No results found.', 'sportspress' ); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="tablenav bottom">
|
||||
<a class="button alignleft" href="<?php echo admin_url( 'edit.php?post_type=sp_statistic' ); ?>"><?php _e( 'View All', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary alignright" href="<?php echo admin_url( 'post-new.php?post_type=sp_statistic' ); ?>"><?php _e( 'Add New', 'sportspress' ); ?></a>
|
||||
<a class="button alignleft" href="<?php echo esc_url( admin_url( 'edit.php?post_type=sp_statistic' ) ); ?>"><?php esc_html_e( 'View All', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary alignright" href="<?php echo esc_url( admin_url( 'post-new.php?post_type=sp_statistic' ) ); ?>"><?php esc_html_e( 'Add New', 'sportspress' ); ?></a>
|
||||
<br class="clear">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<div class="wrap sportspress">
|
||||
<h2><?php _e( 'System Status', 'sportspress' ); ?></h2>
|
||||
<h2><?php esc_attr_e( 'System Status', 'sportspress' ); ?></h2>
|
||||
</div>
|
||||
<div class="updated sportspress-message">
|
||||
<p><?php _e( 'Please include this information when requesting support:', 'sportspress' ); ?> </p>
|
||||
<p class="submit"><a href="#" class="button-primary debug-report"><?php _e( 'Get System Report', 'sportspress' ); ?></a></p>
|
||||
<p><?php esc_attr_e( 'Please include this information when requesting support:', 'sportspress' ); ?> </p>
|
||||
<p class="submit"><a href="#" class="button-primary debug-report"><?php esc_attr_e( 'Get System Report', 'sportspress' ); ?></a></p>
|
||||
<div id="debug-report"><textarea readonly="readonly"></textarea></div>
|
||||
</div>
|
||||
<br/>
|
||||
@@ -11,45 +11,45 @@
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php _e( 'Environment', 'sportspress' ); ?></th>
|
||||
<th colspan="2"><?php esc_attr_e( 'Environment', 'sportspress' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?php _e( 'Home URL', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo home_url(); ?></td>
|
||||
<td><?php esc_attr_e( 'Home URL', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo esc_url( home_url() ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Site URL', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo site_url(); ?></td>
|
||||
<td><?php esc_attr_e( 'Site URL', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo esc_url( site_url() ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'SP Version', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'SP Version', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo esc_html( SP()->version ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'WP Version', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'WP Version', 'sportspress' ); ?>:</td>
|
||||
<td><?php bloginfo( 'version' ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'WP Multisite Enabled', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'WP Multisite Enabled', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
if ( is_multisite() ) {
|
||||
_e( 'Yes', 'sportspress' );
|
||||
esc_attr_e( 'Yes', 'sportspress' );
|
||||
} else {
|
||||
_e( 'No', 'sportspress' );
|
||||
esc_attr_e( 'No', 'sportspress' );
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Web Server Info', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Web Server Info', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo esc_html( $_SERVER['SERVER_SOFTWARE'] ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'PHP Version', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'PHP Version', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
if ( function_exists( 'phpversion' ) ) {
|
||||
@@ -58,74 +58,74 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'WP Memory Limit', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'WP Memory Limit', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$memory = sp_let_to_num( WP_MEMORY_LIMIT );
|
||||
|
||||
if ( $memory < 67108864 ) {
|
||||
echo '<mark class="error">' . sprintf( __( '%1$s - We recommend setting memory to at least 64MB. See: <a href="%2$s">Increasing memory allocated to PHP</a>', 'sportspress' ), size_format( $memory ), 'http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP' ) . '</mark>';
|
||||
echo '<mark class="error">' . wp_kses_post( sprintf( esc_attr__( '%1$s - We recommend setting memory to at least 64MB. See: <a href="%2$s">Increasing memory allocated to PHP</a>', 'sportspress' ), esc_html( size_format( $memory ) ), 'http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP' ) ) . '</mark>';
|
||||
} else {
|
||||
echo '<mark class="yes">' . size_format( $memory ) . '</mark>';
|
||||
echo '<mark class="yes">' . esc_html( size_format( $memory ) ) . '</mark>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'WP Debug Mode', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'WP Debug Mode', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
|
||||
echo '<mark class="yes">' . __( 'Yes', 'sportspress' ) . '</mark>';
|
||||
echo '<mark class="yes">' . esc_html__( 'Yes', 'sportspress' ) . '</mark>';
|
||||
} else {
|
||||
echo '<mark class="no">' . __( 'No', 'sportspress' ) . '</mark>';
|
||||
echo '<mark class="no">' . esc_html__( 'No', 'sportspress' ) . '</mark>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'WP Language', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'WP Language', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
if ( defined( 'WPLANG' ) && WPLANG ) {
|
||||
echo WPLANG;
|
||||
echo esc_html( WPLANG );
|
||||
} else {
|
||||
_e( 'Default', 'sportspress' );
|
||||
esc_html_e( 'Default', 'sportspress' );
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'WP Max Upload Size', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo size_format( wp_max_upload_size() ); ?></td>
|
||||
<td><?php esc_attr_e( 'WP Max Upload Size', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo esc_html( size_format( wp_max_upload_size() ) ); ?></td>
|
||||
</tr>
|
||||
<?php if ( function_exists( 'ini_get' ) ) : ?>
|
||||
<tr>
|
||||
<td><?php _e( 'PHP Post Max Size', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo size_format( sp_let_to_num( ini_get( 'post_max_size' ) ) ); ?></td>
|
||||
<td><?php esc_attr_e( 'PHP Post Max Size', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo esc_html( size_format( sp_let_to_num( ini_get( 'post_max_size' ) ) ) ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'PHP Time Limit', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo ini_get( 'max_execution_time' ); ?></td>
|
||||
<td><?php esc_attr_e( 'PHP Time Limit', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo esc_html( ini_get( 'max_execution_time' ) ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'PHP Max Input Vars', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo ini_get( 'max_input_vars' ); ?></td>
|
||||
<td><?php esc_attr_e( 'PHP Max Input Vars', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo esc_html( ini_get( 'max_input_vars' ) ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'SUHOSIN Installed', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo extension_loaded( 'suhosin' ) ? __( 'Yes', 'sportspress' ) : __( 'No', 'sportspress' ); ?></td>
|
||||
<td><?php esc_attr_e( 'SUHOSIN Installed', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo extension_loaded( 'suhosin' ) ? esc_html__( 'Yes', 'sportspress' ) : esc_html__( 'No', 'sportspress' ); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<tr>
|
||||
<td><?php _e( 'Default Timezone', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Default Timezone', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$default_timezone = date_default_timezone_get();
|
||||
if ( 'UTC' !== $default_timezone ) {
|
||||
echo '<mark class="error">' . sprintf( __( 'Default timezone is %s - it should be UTC', 'sportspress' ), $default_timezone ) . '</mark>';
|
||||
echo '<mark class="error">' . sprintf( esc_html__( 'Default timezone is %s - it should be UTC', 'sportspress' ), esc_html( $default_timezone ) ) . '</mark>';
|
||||
} else {
|
||||
echo '<mark class="yes">' . sprintf( __( 'Default timezone is %s', 'sportspress' ), $default_timezone ) . '</mark>';
|
||||
echo '<mark class="yes">' . sprintf( esc_html__( 'Default timezone is %s', 'sportspress' ), esc_html( $default_timezone ) ) . '</mark>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
@@ -134,28 +134,28 @@
|
||||
$posting = array();
|
||||
|
||||
// fsockopen/cURL
|
||||
$posting['fsockopen_curl']['name'] = __( 'fsockopen/cURL', 'sportspress' );
|
||||
$posting['fsockopen_curl']['name'] = esc_attr__( 'fsockopen/cURL', 'sportspress' );
|
||||
if ( function_exists( 'fsockopen' ) || function_exists( 'curl_init' ) ) {
|
||||
if ( function_exists( 'fsockopen' ) && function_exists( 'curl_init' ) ) {
|
||||
$posting['fsockopen_curl']['note'] = __( 'Your server has fsockopen and cURL enabled.', 'sportspress' );
|
||||
$posting['fsockopen_curl']['note'] = esc_attr__( 'Your server has fsockopen and cURL enabled.', 'sportspress' );
|
||||
} elseif ( function_exists( 'fsockopen' ) ) {
|
||||
$posting['fsockopen_curl']['note'] = __( 'Your server has fsockopen enabled, cURL is disabled.', 'sportspress' );
|
||||
$posting['fsockopen_curl']['note'] = esc_attr__( 'Your server has fsockopen enabled, cURL is disabled.', 'sportspress' );
|
||||
} else {
|
||||
$posting['fsockopen_curl']['note'] = __( 'Your server has cURL enabled, fsockopen is disabled.', 'sportspress' );
|
||||
$posting['fsockopen_curl']['note'] = esc_attr__( 'Your server has cURL enabled, fsockopen is disabled.', 'sportspress' );
|
||||
}
|
||||
$posting['fsockopen_curl']['success'] = true;
|
||||
} else {
|
||||
$posting['fsockopen_curl']['note'] = __( 'Your server does not have fsockopen or cURL enabled - PayPal IPN and other scripts which communicate with other servers will not work. Contact your hosting provider.', 'sportspress' ) . '</mark>';
|
||||
$posting['fsockopen_curl']['note'] = esc_attr__( 'Your server does not have fsockopen or cURL enabled - PayPal IPN and other scripts which communicate with other servers will not work. Contact your hosting provider.', 'sportspress' ) . '</mark>';
|
||||
$posting['fsockopen_curl']['success'] = false;
|
||||
}
|
||||
|
||||
// SOAP
|
||||
$posting['soap_client']['name'] = __( 'SOAP Client', 'sportspress' );
|
||||
$posting['soap_client']['name'] = esc_attr__( 'SOAP Client', 'sportspress' );
|
||||
if ( class_exists( 'SoapClient' ) ) {
|
||||
$posting['soap_client']['note'] = __( 'Your server has the SOAP Client class enabled.', 'sportspress' );
|
||||
$posting['soap_client']['note'] = esc_attr__( 'Your server has the SOAP Client class enabled.', 'sportspress' );
|
||||
$posting['soap_client']['success'] = true;
|
||||
} else {
|
||||
$posting['soap_client']['note'] = sprintf( __( 'Your server does not have the <a href="%s">SOAP Client</a> class enabled - some gateway plugins which use SOAP may not work as expected.', 'sportspress' ), 'http://php.net/manual/en/class.soapclient.php' ) . '</mark>';
|
||||
$posting['soap_client']['note'] = sprintf( esc_attr__( 'Your server does not have the <a href="%s">SOAP Client</a> class enabled - some gateway plugins which use SOAP may not work as expected.', 'sportspress' ), 'http://php.net/manual/en/class.soapclient.php' ) . '</mark>';
|
||||
$posting['soap_client']['success'] = false;
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
<tr>
|
||||
<td><?php echo esc_html( $post['name'] ); ?>:</td>
|
||||
<td>
|
||||
<mark class="<?php echo $mark; ?>">
|
||||
<mark class="<?php echo esc_attr( $mark ); ?>">
|
||||
<?php echo wp_kses_data( $post['note'] ); ?>
|
||||
</mark>
|
||||
</td>
|
||||
@@ -179,13 +179,13 @@
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php _e( 'Plugins', 'sportspress' ); ?></th>
|
||||
<th colspan="2"><?php esc_attr_e( 'Plugins', 'sportspress' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?php _e( 'Installed Plugins', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Installed Plugins', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$active_plugins = (array) get_option( 'active_plugins', array() );
|
||||
@@ -207,7 +207,7 @@
|
||||
// link the plugin name to the plugin url if available
|
||||
$plugin_name = $plugin_data['Name'];
|
||||
if ( ! empty( $plugin_data['PluginURI'] ) ) {
|
||||
$plugin_name = '<a href="' . esc_url( $plugin_data['PluginURI'] ) . '" title="' . __( 'Visit plugin homepage', 'sportspress' ) . '">' . $plugin_name . '</a>';
|
||||
$plugin_name = '<a href="' . esc_url( $plugin_data['PluginURI'] ) . '" title="' . esc_attr__( 'Visit plugin homepage', 'sportspress' ) . '">' . $plugin_name . '</a>';
|
||||
}
|
||||
|
||||
if ( strstr( $dirname, 'sportspress' ) ) {
|
||||
@@ -236,11 +236,11 @@
|
||||
}
|
||||
|
||||
if ( ! empty( $version_data['version'] ) && version_compare( $version_data['version'], $plugin_data['Version'], '>' ) ) {
|
||||
$version_string = ' – <strong style="color:red;">' . $version_data['version'] . ' ' . __( 'is available', 'sportspress' ) . '</strong>';
|
||||
$version_string = ' – <strong style="color:red;">' . $version_data['version'] . ' ' . esc_attr__( 'is available', 'sportspress' ) . '</strong>';
|
||||
}
|
||||
}
|
||||
|
||||
$sp_plugins[] = $plugin_name . ' ' . __( 'by', 'sportspress' ) . ' ' . $plugin_data['Author'] . ' ' . __( 'version', 'sportspress' ) . ' ' . $plugin_data['Version'] . $version_string;
|
||||
$sp_plugins[] = $plugin_name . ' ' . esc_attr__( 'by', 'sportspress' ) . ' ' . $plugin_data['Author'] . ' ' . esc_attr__( 'version', 'sportspress' ) . ' ' . $plugin_data['Version'] . $version_string;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -248,7 +248,7 @@
|
||||
if ( sizeof( $sp_plugins ) == 0 ) {
|
||||
echo '-';
|
||||
} else {
|
||||
echo implode( ', <br/>', $sp_plugins );
|
||||
echo wp_kses_post( implode( ', <br/>', $sp_plugins ) );
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -258,17 +258,17 @@
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php _e( 'SP Configuration', 'sportspress' ); ?></th>
|
||||
<th colspan="2"><?php esc_attr_e( 'SP Configuration', 'sportspress' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?php _e( 'Sport', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo get_option( 'sportspress_sport', __( 'None', 'sportspress' ) ); ?></td>
|
||||
<td><?php esc_attr_e( 'Sport', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo esc_html( get_option( 'sportspress_sport', esc_attr__( 'None', 'sportspress' ) ) ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Event Outcomes', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Event Outcomes', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_posts = array();
|
||||
@@ -289,7 +289,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Event Results', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Event Results', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_posts = array();
|
||||
@@ -310,7 +310,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Player Performance', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Player Performance', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_posts = array();
|
||||
@@ -331,7 +331,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Table Columns', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Table Columns', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_posts = array();
|
||||
@@ -352,7 +352,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Player Metrics', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Player Metrics', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_posts = array();
|
||||
@@ -373,7 +373,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Player Statistics', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Player Statistics', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_posts = array();
|
||||
@@ -397,13 +397,13 @@
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php _e( 'SP Taxonomies', 'sportspress' ); ?></th>
|
||||
<th colspan="2"><?php esc_attr_e( 'SP Taxonomies', 'sportspress' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?php _e( 'Leagues', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Leagues', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_terms = array();
|
||||
@@ -416,7 +416,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Seasons', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Seasons', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_terms = array();
|
||||
@@ -429,7 +429,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Venues', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Venues', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_terms = array();
|
||||
@@ -442,7 +442,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Positions', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Positions', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_terms = array();
|
||||
@@ -458,7 +458,7 @@
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php _e( 'SP Post Types', 'sportspress' ); ?></th>
|
||||
<th colspan="2"><?php esc_attr_e( 'SP Post Types', 'sportspress' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -477,7 +477,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<?php $count = wp_count_posts( $post_type ); ?>
|
||||
<?php echo $count->publish; ?> publish, <?php echo $count->future; ?> future, <?php echo $count->draft; ?> draft, <?php echo $count->private; ?> private, <?php echo $count->trash; ?> trash, <?php echo $count->{'auto-draft'}; ?> auto-draft, <?php echo $count->inherit; ?> inherit
|
||||
<?php echo esc_html( $count->publish ); ?> publish, <?php echo esc_html( $count->future ); ?> future, <?php echo esc_html( $count->draft ); ?> draft, <?php echo esc_html( $count->private ); ?> private, <?php echo esc_html( $count->trash ); ?> trash, <?php echo esc_html( $count->{'auto-draft'} ); ?> auto-draft, <?php echo esc_html( $count->inherit ); ?> inherit
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
@@ -485,7 +485,7 @@
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php _e( 'Theme', 'sportspress' ); ?></th>
|
||||
<th colspan="2"><?php esc_attr_e( 'Theme', 'sportspress' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -527,7 +527,7 @@
|
||||
?>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?php _e( 'Theme Name', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Theme Name', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
echo esc_html( $active_theme->Name );
|
||||
@@ -535,19 +535,19 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Theme Version', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Theme Version', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
echo $active_theme->Version;
|
||||
echo esc_html( $active_theme->Version );
|
||||
|
||||
if ( ! empty( $theme_version_data['version'] ) && version_compare( $theme_version_data['version'], $active_theme->Version, '!=' ) ) {
|
||||
echo ' – <strong style="color:red;">' . $theme_version_data['version'] . ' ' . __( 'is available', 'sportspress' ) . '</strong>';
|
||||
echo ' – <strong style="color:red;">' . esc_html( $theme_version_data['version'] ) . ' ' . esc_html__( 'is available', 'sportspress' ) . '</strong>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Author URL', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Author URL', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
echo esc_url( $active_theme->{'Author URI'} );
|
||||
@@ -558,7 +558,7 @@
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php _e( 'Templates', 'sportspress' ); ?></th>
|
||||
<th colspan="2"><?php esc_attr_e( 'Templates', 'sportspress' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -592,7 +592,7 @@
|
||||
$theme_version = $this->get_file_version( $theme_file );
|
||||
|
||||
if ( $core_version && ( empty( $theme_version ) || version_compare( $theme_version, $core_version, '<' ) ) ) {
|
||||
$found_files[ $plugin_name ][] = sprintf( __( '<code>%1$s</code> version <strong style="color:red">%2$s</strong> is out of date. The core version is %3$s', 'sportspress' ), basename( $theme_file ), $theme_version ? $theme_version : '-', $core_version );
|
||||
$found_files[ $plugin_name ][] = sprintf( esc_attr__( '<code>%1$s</code> version <strong style="color:red">%2$s</strong> is out of date. The core version is %3$s', 'sportspress' ), basename( $theme_file ), $theme_version ? $theme_version : '-', $core_version );
|
||||
} else {
|
||||
$found_files[ $plugin_name ][] = sprintf( '<code>%s</code>', basename( $theme_file ) );
|
||||
}
|
||||
@@ -603,14 +603,14 @@
|
||||
if ( $found_files ) {
|
||||
foreach ( $found_files as $plugin_name => $found_plugin_files ) {
|
||||
?>
|
||||
<td><?php _e( 'Template Overrides', 'sportspress' ); ?> (<?php echo $plugin_name; ?>):</td>
|
||||
<td><?php echo implode( ', <br/>', $found_plugin_files ); ?></td>
|
||||
<td><?php esc_attr_e( 'Template Overrides', 'sportspress' ); ?> (<?php echo esc_html( $plugin_name ); ?>):</td>
|
||||
<td><?php echo wp_kses_post( implode( ', <br/>', $found_plugin_files ) ); ?></td>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
?>
|
||||
<td><?php _e( 'Template Overrides', 'sportspress' ); ?>:</td>
|
||||
<td><?php _e( 'No overrides present in theme.', 'sportspress' ); ?></td>
|
||||
<td><?php esc_attr_e( 'Template Overrides', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'No overrides present in theme.', 'sportspress' ); ?></td>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<div class="wrap sportspress">
|
||||
<h2><?php echo apply_filters( 'sportspress_logo', '<img src="' . plugin_dir_url( SP_PLUGIN_FILE ) . 'assets/images/modules/sportspress' . ( class_exists( 'SportsPress_Pro' ) ? '-pro' : '' ) . '.png" alt="' . __( 'SportsPress', 'sportspress' ) . '" class="sp-settings-logo">' ); ?></h2>
|
||||
<h2><?php echo wp_kses_post( apply_filters( 'sportspress_logo', '<img src="' . plugin_dir_url( SP_PLUGIN_FILE ) . 'assets/images/modules/sportspress' . ( class_exists( 'SportsPress_Pro' ) ? '-pro' : '' ) . '.png" alt="' . esc_attr__( 'SportsPress', 'sportspress' ) . '" class="sp-settings-logo">' ) ); ?></h2>
|
||||
<form method="post" id="mainform" action="" enctype="multipart/form-data">
|
||||
<h2 class="nav-tab-wrapper sp-nav-tab-wrapper">
|
||||
<?php
|
||||
foreach ( $tabs as $name => $label ) :
|
||||
?>
|
||||
<a href="<?php echo admin_url( 'admin.php?page=sportspress&tab=' . $name ); ?>" class="nav-tab <?php echo ( $current_tab == $name ? 'nav-tab-active' : '' ); ?>"><?php echo esc_html( $label ); ?></a><?php endforeach; ?>
|
||||
<a href="<?php echo esc_attr( admin_url( 'admin.php?page=sportspress&tab=' . $name ) ); ?>" class="nav-tab <?php echo ( $current_tab == $name ? 'nav-tab-active' : '' ); ?>"><?php echo esc_html( $label ); ?></a><?php endforeach; ?>
|
||||
<?php do_action( 'sportspress_settings_tabs' ); ?>
|
||||
</h2>
|
||||
<?php
|
||||
@@ -15,7 +15,7 @@
|
||||
?>
|
||||
<p class="submit">
|
||||
<?php if ( ! isset( $GLOBALS['hide_save_button'] ) ) : ?>
|
||||
<input name="save" class="button-primary" type="submit" value="<?php _e( 'Save Changes', 'sportspress' ); ?>" />
|
||||
<input name="save" class="button-primary" type="submit" value="<?php esc_attr_e( 'Save Changes', 'sportspress' ); ?>" />
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="subtab" id="last_tab" />
|
||||
<?php wp_nonce_field( 'sportspress-settings' ); ?>
|
||||
|
||||
@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
}
|
||||
?>
|
||||
<div id="message" class="updated sportspress-message">
|
||||
<p><strong><?php _e( 'Welcome to SportsPress', 'sportspress' ); ?></strong> – <?php _e( "Let's get started with some basic settings.", 'sportspress' ); ?></p>
|
||||
<p><strong><?php esc_attr_e( 'Welcome to SportsPress', 'sportspress' ); ?></strong> – <?php esc_attr_e( "Let's get started with some basic settings.", 'sportspress' ); ?></p>
|
||||
<p class="submit">
|
||||
<a class="button-primary" href="
|
||||
<?php
|
||||
@@ -20,7 +20,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
)
|
||||
);
|
||||
?>
|
||||
"><?php _e( 'Run the Setup Wizard', 'sportspress' ); ?></a>
|
||||
<a class="button-secondary" href="<?php echo add_query_arg( 'skip_install_sportspress', 'true' ); ?>"><?php _e( 'Hide this notice', 'sportspress' ); ?></a>
|
||||
"><?php esc_attr_e( 'Run the Setup Wizard', 'sportspress' ); ?></a>
|
||||
<a class="button-secondary" href="<?php echo esc_url( add_query_arg( 'skip_install_sportspress', 'true' ) ); ?>"><?php esc_attr_e( 'Hide this notice', 'sportspress' ); ?></a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -4,5 +4,5 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
}
|
||||
?>
|
||||
<div id="message" class="error">
|
||||
<p><?php _e( 'You are not allowed to edit this item.', 'sportspress' ); ?></p>
|
||||
<p><?php esc_attr_e( 'You are not allowed to edit this item.', 'sportspress' ); ?></p>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
}
|
||||
?>
|
||||
<div id="message" class="updated sportspress-message wc-connect">
|
||||
<p><?php _e( '<strong>Your theme has bundled outdated copies of SportsPress template files</strong> – if you encounter functionality issues on the frontend this could the reason. Ensure you update or remove them (in general we recommend only bundling the template files you actually need to customize). See the system report for full details.', 'sportspress' ); ?></p>
|
||||
<p><?php esc_attr_e( '<strong>Your theme has bundled outdated copies of SportsPress template files</strong> – if you encounter functionality issues on the frontend this could the reason. Ensure you update or remove them (in general we recommend only bundling the template files you actually need to customize). See the system report for full details.', 'sportspress' ); ?></p>
|
||||
<p class="submit"><a class="button-primary" href="
|
||||
<?php
|
||||
echo esc_url(
|
||||
@@ -17,5 +17,5 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
)
|
||||
);
|
||||
?>
|
||||
"><?php _e( 'System Status', 'sportspress' ); ?></a> <a class="skip button" href="<?php echo esc_url( add_query_arg( 'hide_template_files_notice', 'true' ) ); ?>"><?php _e( 'Hide this notice', 'sportspress' ); ?></a></p>
|
||||
"><?php esc_html_e( 'System Status', 'sportspress' ); ?></a> <a class="skip button" href="<?php echo esc_url( add_query_arg( 'hide_template_files_notice', 'true' ) ); ?>"><?php esc_html_e( 'Hide this notice', 'sportspress' ); ?></a></p>
|
||||
</div>
|
||||
|
||||
@@ -4,11 +4,11 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
}
|
||||
?>
|
||||
<div id="message" class="error sportspress-message">
|
||||
<p><?php _e( '<strong>Your theme does not declare SportsPress support</strong> – if you encounter layout issues please read our integration guide or choose a SportsPress theme :)', 'sportspress' ); ?></p>
|
||||
<p><?php _e( 'Have you tried the free Rookie theme yet?', 'sportspress' ); ?></p>
|
||||
<p><?php esc_attr_e( '<strong>Your theme does not declare SportsPress support</strong> – if you encounter layout issues please read our integration guide or choose a SportsPress theme :)', 'sportspress' ); ?></p>
|
||||
<p><?php esc_attr_e( 'Have you tried the free Rookie theme yet?', 'sportspress' ); ?></p>
|
||||
<p class="submit">
|
||||
<a class="button-primary" href="<?php echo add_query_arg( array( 'theme' => 'rookie' ), network_admin_url( 'theme-install.php' ) ); ?>"><?php _e( 'Install Now', 'sportspress' ); ?></a>
|
||||
<a class="button-secondary" href="http://tboy.co/integration"><?php _e( 'Theme Integration Guide', 'sportspress' ); ?></a>
|
||||
<a class="button" href="<?php echo add_query_arg( 'hide_theme_support_notice', 'true' ); ?>"><?php _e( 'Hide this notice', 'sportspress' ); ?></a>
|
||||
<a class="button-primary" href="<?php echo esc_url( add_query_arg( array( 'theme' => 'rookie' ), network_admin_url( 'theme-install.php' ) ) ); ?>"><?php esc_attr_e( 'Install Now', 'sportspress' ); ?></a>
|
||||
<a class="button-secondary" href="http://tboy.co/integration"><?php esc_attr_e( 'Theme Integration Guide', 'sportspress' ); ?></a>
|
||||
<a class="button" href="<?php echo esc_url( add_query_arg( 'hide_theme_support_notice', 'true' ) ); ?>"><?php esc_attr_e( 'Hide this notice', 'sportspress' ); ?></a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -70,7 +70,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||
'schema' => array(
|
||||
'description' => __( 'Teams', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Teams', 'sportspress' ),
|
||||
'type' => 'array',
|
||||
'context' => array( 'view', 'edit', 'embed' ),
|
||||
'arg_options' => array(
|
||||
@@ -86,7 +86,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
array(
|
||||
'get_callback' => 'SP_REST_API::get_post_data',
|
||||
'schema' => array(
|
||||
'description' => __( 'Main Results', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Main Results', 'sportspress' ),
|
||||
'type' => 'array',
|
||||
'context' => array( 'view', 'embed' ),
|
||||
'arg_options' => array(
|
||||
@@ -102,7 +102,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
array(
|
||||
'get_callback' => 'SP_REST_API::get_post_data',
|
||||
'schema' => array(
|
||||
'description' => __( 'Outcome', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Outcome', 'sportspress' ),
|
||||
'type' => 'array',
|
||||
'context' => array( 'view', 'embed' ),
|
||||
'arg_options' => array(
|
||||
@@ -118,7 +118,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
array(
|
||||
'get_callback' => 'SP_REST_API::get_post_data',
|
||||
'schema' => array(
|
||||
'description' => __( 'Winner', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Winner', 'sportspress' ),
|
||||
'type' => 'integer',
|
||||
'context' => array( 'view', 'embed' ),
|
||||
'arg_options' => array(
|
||||
@@ -135,7 +135,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
'get_callback' => 'SP_REST_API::get_post_data',
|
||||
'update_callback' => 'SP_REST_API::update_post_meta',
|
||||
'schema' => array(
|
||||
'description' => __( 'Format', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Format', 'sportspress' ),
|
||||
'type' => 'string',
|
||||
'context' => array( 'view', 'edit', 'embed' ),
|
||||
'arg_options' => array(
|
||||
@@ -152,7 +152,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
'get_callback' => 'SP_REST_API::get_post_data',
|
||||
'update_callback' => 'SP_REST_API::update_post_meta',
|
||||
'schema' => array(
|
||||
'description' => __( 'Mode', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Mode', 'sportspress' ),
|
||||
'type' => 'string',
|
||||
'context' => array( 'view', 'edit', 'embed' ),
|
||||
'arg_options' => array(
|
||||
@@ -169,7 +169,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
'get_callback' => 'SP_REST_API::get_post_data',
|
||||
'update_callback' => 'SP_REST_API::update_post_meta',
|
||||
'schema' => array(
|
||||
'description' => __( 'Match Day', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Match Day', 'sportspress' ),
|
||||
'type' => 'string',
|
||||
'context' => array( 'view', 'edit', 'embed' ),
|
||||
'arg_options' => array(
|
||||
@@ -186,7 +186,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
'get_callback' => 'SP_REST_API::get_post_data',
|
||||
'update_callback' => 'SP_REST_API::update_post_meta',
|
||||
'schema' => array(
|
||||
'description' => __( 'Full Time', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Full Time', 'sportspress' ),
|
||||
'type' => 'integer',
|
||||
'context' => array( 'view', 'edit', 'embed' ),
|
||||
'arg_options' => array(
|
||||
@@ -203,7 +203,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||
'schema' => array(
|
||||
'description' => __( 'Players', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Players', 'sportspress' ),
|
||||
'type' => 'array',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'arg_options' => array(
|
||||
@@ -220,7 +220,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||
'schema' => array(
|
||||
'description' => __( 'Offense', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Offense', 'sportspress' ),
|
||||
'type' => 'array',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'arg_options' => array(
|
||||
@@ -237,7 +237,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||
'schema' => array(
|
||||
'description' => __( 'Defense', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Defense', 'sportspress' ),
|
||||
'type' => 'array',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'arg_options' => array(
|
||||
@@ -254,7 +254,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||
'schema' => array(
|
||||
'description' => __( 'Staff', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Staff', 'sportspress' ),
|
||||
'type' => 'array',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'arg_options' => array(
|
||||
@@ -271,7 +271,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
'get_callback' => 'SP_REST_API::get_post_data',
|
||||
'update_callback' => 'SP_REST_API::update_post_meta_arrays',
|
||||
'schema' => array(
|
||||
'description' => __( 'Results', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Results', 'sportspress' ),
|
||||
'type' => 'object',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'arg_options' => array(
|
||||
@@ -288,7 +288,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
'get_callback' => 'SP_REST_API::get_post_data',
|
||||
'update_callback' => 'SP_REST_API::update_post_meta_arrays_multi',
|
||||
'schema' => array(
|
||||
'description' => __( 'Box Score', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Box Score', 'sportspress' ),
|
||||
'type' => 'object',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'arg_options' => array(
|
||||
@@ -305,7 +305,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||
'schema' => array(
|
||||
'description' => __( 'Staff', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Staff', 'sportspress' ),
|
||||
'type' => 'array',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'arg_options' => array(
|
||||
@@ -322,7 +322,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||
'schema' => array(
|
||||
'description' => __( 'League Tables', 'sportspress' ),
|
||||
'description' => esc_attr__( 'League Tables', 'sportspress' ),
|
||||
'type' => 'array',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'arg_options' => array(
|
||||
@@ -339,7 +339,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||
'schema' => array(
|
||||
'description' => __( 'Player Lists', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Player Lists', 'sportspress' ),
|
||||
'type' => 'array',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'arg_options' => array(
|
||||
@@ -355,7 +355,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
array(
|
||||
'get_callback' => 'SP_REST_API::get_post_ids_with_meta',
|
||||
'schema' => array(
|
||||
'description' => __( 'Events', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Events', 'sportspress' ),
|
||||
'type' => 'array',
|
||||
'context' => array( 'view' ),
|
||||
'arg_options' => array(
|
||||
@@ -372,7 +372,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
'get_callback' => 'SP_REST_API::get_post_meta',
|
||||
'update_callback' => 'SP_REST_API::update_post_meta',
|
||||
'schema' => array(
|
||||
'description' => __( 'Abbreviation', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Abbreviation', 'sportspress' ),
|
||||
'type' => 'string',
|
||||
'context' => array( 'view', 'edit', 'embed' ),
|
||||
'arg_options' => array(
|
||||
@@ -389,7 +389,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
'get_callback' => 'SP_REST_API::get_post_meta',
|
||||
'update_callback' => 'SP_REST_API::update_post_meta',
|
||||
'schema' => array(
|
||||
'description' => __( 'Site URL', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Site URL', 'sportspress' ),
|
||||
'type' => 'string',
|
||||
'context' => array( 'view', 'edit', 'embed' ),
|
||||
'arg_options' => array(
|
||||
@@ -406,7 +406,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
'get_callback' => 'SP_REST_API::get_post_meta',
|
||||
'update_callback' => 'SP_REST_API::update_post_meta',
|
||||
'schema' => array(
|
||||
'description' => __( 'Squad Number', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Squad Number', 'sportspress' ),
|
||||
'type' => 'integer',
|
||||
'context' => array( 'view', 'edit', 'embed' ),
|
||||
'arg_options' => array(
|
||||
@@ -423,7 +423,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||
'schema' => array(
|
||||
'description' => __( 'Teams', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Teams', 'sportspress' ),
|
||||
'type' => 'array',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'arg_options' => array(
|
||||
@@ -440,7 +440,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||
'schema' => array(
|
||||
'description' => __( 'Current Teams', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Current Teams', 'sportspress' ),
|
||||
'type' => 'array',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'arg_options' => array(
|
||||
@@ -457,7 +457,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||
'schema' => array(
|
||||
'description' => __( 'Past Teams', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Past Teams', 'sportspress' ),
|
||||
'type' => 'array',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'arg_options' => array(
|
||||
@@ -474,7 +474,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
'get_callback' => 'SP_REST_API::get_post_data',
|
||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||
'schema' => array(
|
||||
'description' => __( 'Nationalities', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Nationalities', 'sportspress' ),
|
||||
'type' => 'array',
|
||||
'context' => array( 'view', 'embed' ),
|
||||
'arg_options' => array(
|
||||
@@ -491,7 +491,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
'get_callback' => 'SP_REST_API::get_post_data',
|
||||
'update_callback' => 'SP_REST_API::update_post_meta_array',
|
||||
'schema' => array(
|
||||
'description' => __( 'Metrics', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Metrics', 'sportspress' ),
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'arg_options' => array(
|
||||
'sanitize_callback' => 'rest_sanitize_request_arg',
|
||||
@@ -507,7 +507,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
'get_callback' => 'SP_REST_API::get_post_data',
|
||||
'update_callback' => 'SP_REST_API::update_post_meta_arrays_multi',
|
||||
'schema' => array(
|
||||
'description' => __( 'Statistics', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Statistics', 'sportspress' ),
|
||||
'type' => 'object',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'arg_options' => array(
|
||||
@@ -524,7 +524,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||
'schema' => array(
|
||||
'description' => __( 'Teams', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Teams', 'sportspress' ),
|
||||
'type' => 'array',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'arg_options' => array(
|
||||
@@ -541,7 +541,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||
'schema' => array(
|
||||
'description' => __( 'Current Teams', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Current Teams', 'sportspress' ),
|
||||
'type' => 'array',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'arg_options' => array(
|
||||
@@ -558,7 +558,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||
'schema' => array(
|
||||
'description' => __( 'Past Teams', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Past Teams', 'sportspress' ),
|
||||
'type' => 'array',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'arg_options' => array(
|
||||
@@ -575,7 +575,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
||||
'get_callback' => 'SP_REST_API::get_post_data',
|
||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||
'schema' => array(
|
||||
'description' => __( 'Nationalities', 'sportspress' ),
|
||||
'description' => esc_attr__( 'Nationalities', 'sportspress' ),
|
||||
'type' => 'array',
|
||||
'context' => array( 'view', 'embed' ),
|
||||
'arg_options' => array(
|
||||
|
||||
@@ -469,7 +469,7 @@ class SP_AJAX {
|
||||
</p>
|
||||
<p>
|
||||
<label>
|
||||
<?php printf( esc_html__( 'Select %s:', 'sportspress' ), __( 'Calendar', 'sportspress' ) ); ?>
|
||||
<?php printf( esc_html__( 'Select %s:', 'sportspress' ), esc_attr__( 'Calendar', 'sportspress' ) ); ?>
|
||||
<?php
|
||||
$args = array(
|
||||
'post_type' => 'sp_calendar',
|
||||
@@ -793,7 +793,7 @@ class SP_AJAX {
|
||||
→
|
||||
<?php esc_html_e( 'Next', 'sportspress' ); ?>
|
||||
<input type="number" min="0" step="1" class="tiny-text" name="date_future" value="default">
|
||||
<?php _e( 'days', 'sportspress' ); ?>
|
||||
<?php esc_attr_e( 'days', 'sportspress' ); ?>
|
||||
</p>esc_html
|
||||
|
||||
<p class="sp-date-relative">
|
||||
|
||||
@@ -277,235 +277,235 @@ class SP_Countries {
|
||||
$this->countries = apply_filters(
|
||||
'sportspress_countries',
|
||||
array(
|
||||
'afg' => __( 'Afghanistan', 'sportspress' ),
|
||||
'aia' => __( 'Anguilla', 'sportspress' ),
|
||||
'alb' => __( 'Albania', 'sportspress' ),
|
||||
'alg' => __( 'Algeria', 'sportspress' ),
|
||||
'and' => __( 'Andorra', 'sportspress' ),
|
||||
'ang' => __( 'Angola', 'sportspress' ),
|
||||
'arg' => __( 'Argentina', 'sportspress' ),
|
||||
'arm' => __( 'Armenia', 'sportspress' ),
|
||||
'aru' => __( 'Aruba', 'sportspress' ),
|
||||
'asa' => __( 'American Samoa', 'sportspress' ),
|
||||
'atg' => __( 'Antigua and Barbuda', 'sportspress' ),
|
||||
'aus' => __( 'Australia', 'sportspress' ),
|
||||
'aut' => __( 'Austria', 'sportspress' ),
|
||||
'aze' => __( 'Azerbaijan', 'sportspress' ),
|
||||
'bah' => __( 'Bahamas', 'sportspress' ),
|
||||
'ban' => __( 'Bangladesh', 'sportspress' ),
|
||||
'bdi' => __( 'Burundi', 'sportspress' ),
|
||||
'bel' => __( 'Belgium', 'sportspress' ),
|
||||
'ben' => __( 'Benin', 'sportspress' ),
|
||||
'ber' => __( 'Bermuda', 'sportspress' ),
|
||||
'bfa' => __( 'Burkina Faso', 'sportspress' ),
|
||||
'bhr' => __( 'Bahrain', 'sportspress' ),
|
||||
'bhu' => __( 'Bhutan', 'sportspress' ),
|
||||
'bih' => __( 'Bosnia and Herzegovina', 'sportspress' ),
|
||||
'blr' => __( 'Belarus', 'sportspress' ),
|
||||
'blz' => __( 'Belize', 'sportspress' ),
|
||||
'bol' => __( 'Bolivia', 'sportspress' ),
|
||||
'bot' => __( 'Botswana', 'sportspress' ),
|
||||
'bra' => __( 'Brazil', 'sportspress' ),
|
||||
'brb' => __( 'Barbados', 'sportspress' ),
|
||||
'bru' => __( 'Brunei', 'sportspress' ),
|
||||
'bul' => __( 'Bulgaria', 'sportspress' ),
|
||||
'cam' => __( 'Cambodia', 'sportspress' ),
|
||||
'can' => __( 'Canada', 'sportspress' ),
|
||||
'cay' => __( 'Cayman Islands', 'sportspress' ),
|
||||
'cgo' => __( 'Republic of the Congo', 'sportspress' ),
|
||||
'cha' => __( 'Chad', 'sportspress' ),
|
||||
'chi' => __( 'Chile', 'sportspress' ),
|
||||
'chn' => __( 'China', 'sportspress' ),
|
||||
'civ' => __( 'Ivory Coast', 'sportspress' ),
|
||||
'cmr' => __( 'Cameroon', 'sportspress' ),
|
||||
'cod' => __( 'Democratic Republic of the Congo', 'sportspress' ),
|
||||
'cok' => __( 'Cook Islands', 'sportspress' ),
|
||||
'col' => __( 'Colombia', 'sportspress' ),
|
||||
'com' => __( 'Comoros', 'sportspress' ),
|
||||
'cpv' => __( 'Cape Verde', 'sportspress' ),
|
||||
'crc' => __( 'Costa Rica', 'sportspress' ),
|
||||
'cro' => __( 'Croatia', 'sportspress' ),
|
||||
'cta' => __( 'Central African Republic', 'sportspress' ),
|
||||
'cub' => __( 'Cuba', 'sportspress' ),
|
||||
'cuw' => __( 'Curacao', 'sportspress' ),
|
||||
'cyp' => __( 'Cyprus', 'sportspress' ),
|
||||
'cze' => __( 'Czechia', 'sportspress' ),
|
||||
'den' => __( 'Denmark', 'sportspress' ),
|
||||
'dji' => __( 'Djibouti', 'sportspress' ),
|
||||
'dma' => __( 'Dominica', 'sportspress' ),
|
||||
'dom' => __( 'Dominican Republic', 'sportspress' ),
|
||||
'ecu' => __( 'Ecuador', 'sportspress' ),
|
||||
'egy' => __( 'Egypt', 'sportspress' ),
|
||||
'eng' => __( 'England', 'sportspress' ),
|
||||
'eqg' => __( 'Equatorial Guinea', 'sportspress' ),
|
||||
'eri' => __( 'Eritrea', 'sportspress' ),
|
||||
'esh' => __( 'Western Sahara', 'sportspress' ),
|
||||
'esp' => __( 'Spain', 'sportspress' ),
|
||||
'est' => __( 'Estonia', 'sportspress' ),
|
||||
'eth' => __( 'Ethiopia', 'sportspress' ),
|
||||
'fij' => __( 'Fiji', 'sportspress' ),
|
||||
'fin' => __( 'Finland', 'sportspress' ),
|
||||
'fra' => __( 'France', 'sportspress' ),
|
||||
'fro' => __( 'Faroe Islands', 'sportspress' ),
|
||||
'guf' => __( 'French Guiana', 'sportspress' ),
|
||||
'pyf' => __( 'French Polynesia', 'sportspress' ),
|
||||
'fsm' => __( 'Micronesia', 'sportspress' ),
|
||||
'gab' => __( 'Gabon', 'sportspress' ),
|
||||
'gam' => __( 'Gambia', 'sportspress' ),
|
||||
'gbr' => __( 'United Kingdom', 'sportspress' ),
|
||||
'geo' => __( 'Georgia', 'sportspress' ),
|
||||
'ger' => __( 'Germany', 'sportspress' ),
|
||||
'gha' => __( 'Ghana', 'sportspress' ),
|
||||
'gib' => __( 'Gibraltar', 'sportspress' ),
|
||||
'glp' => __( 'Guadeloupe', 'sportspress' ),
|
||||
'gnb' => __( 'Guinea-Bissau', 'sportspress' ),
|
||||
'gre' => __( 'Greece', 'sportspress' ),
|
||||
'grl' => __( 'Greenland', 'sportspress' ),
|
||||
'grn' => __( 'Grenada', 'sportspress' ),
|
||||
'gua' => __( 'Guatemala', 'sportspress' ),
|
||||
'gui' => __( 'Guinea', 'sportspress' ),
|
||||
'gum' => __( 'Guam', 'sportspress' ),
|
||||
'guy' => __( 'Guyana', 'sportspress' ),
|
||||
'hai' => __( 'Haiti', 'sportspress' ),
|
||||
'hkg' => __( 'Hong Kong', 'sportspress' ),
|
||||
'hon' => __( 'Honduras', 'sportspress' ),
|
||||
'hun' => __( 'Hungary', 'sportspress' ),
|
||||
'idn' => __( 'Indonesia', 'sportspress' ),
|
||||
'ind' => __( 'India', 'sportspress' ),
|
||||
'irl' => __( 'Ireland', 'sportspress' ),
|
||||
'irn' => __( 'Iran', 'sportspress' ),
|
||||
'irq' => __( 'Iraq', 'sportspress' ),
|
||||
'isl' => __( 'Iceland', 'sportspress' ),
|
||||
'isr' => __( 'Israel', 'sportspress' ),
|
||||
'ita' => __( 'Italy', 'sportspress' ),
|
||||
'jam' => __( 'Jamaica', 'sportspress' ),
|
||||
'jor' => __( 'Jordan', 'sportspress' ),
|
||||
'jpn' => __( 'Japan', 'sportspress' ),
|
||||
'kaz' => __( 'Kazakhstan', 'sportspress' ),
|
||||
'ken' => __( 'Kenya', 'sportspress' ),
|
||||
'kos' => __( 'Kosovo', 'sportspress' ),
|
||||
'kgz' => __( 'Kyrgyzstan', 'sportspress' ),
|
||||
'kir' => __( 'Kiribati', 'sportspress' ),
|
||||
'mtq' => __( 'Martinique', 'sportspress' ),
|
||||
'kor' => __( 'South Korea', 'sportspress' ),
|
||||
'ksa' => __( 'Saudi Arabia', 'sportspress' ),
|
||||
'kuw' => __( 'Kuwait', 'sportspress' ),
|
||||
'lao' => __( 'Laos', 'sportspress' ),
|
||||
'lbr' => __( 'Liberia', 'sportspress' ),
|
||||
'lby' => __( 'Libya', 'sportspress' ),
|
||||
'lca' => __( 'Saint Lucia', 'sportspress' ),
|
||||
'les' => __( 'Lesotho', 'sportspress' ),
|
||||
'lib' => __( 'Lebanon', 'sportspress' ),
|
||||
'lie' => __( 'Liechtenstein', 'sportspress' ),
|
||||
'ltu' => __( 'Lithuania', 'sportspress' ),
|
||||
'lux' => __( 'Luxembourg', 'sportspress' ),
|
||||
'lva' => __( 'Latvia', 'sportspress' ),
|
||||
'mac' => __( 'Macau', 'sportspress' ),
|
||||
'mad' => __( 'Madagascar', 'sportspress' ),
|
||||
'mar' => __( 'Morocco', 'sportspress' ),
|
||||
'mas' => __( 'Malaysia', 'sportspress' ),
|
||||
'mco' => __( 'Monaco', 'sportspress' ),
|
||||
'mda' => __( 'Moldova', 'sportspress' ),
|
||||
'mdv' => __( 'Maldives', 'sportspress' ),
|
||||
'mex' => __( 'Mexico', 'sportspress' ),
|
||||
'mhl' => __( 'Marshall Islands', 'sportspress' ),
|
||||
'mkd' => __( 'North Macedonia', 'sportspress' ),
|
||||
'mli' => __( 'Mali', 'sportspress' ),
|
||||
'mlt' => __( 'Malta', 'sportspress' ),
|
||||
'mne' => __( 'Montenegro', 'sportspress' ),
|
||||
'mng' => __( 'Mongolia', 'sportspress' ),
|
||||
'moz' => __( 'Mozambique', 'sportspress' ),
|
||||
'mri' => __( 'Mauritius', 'sportspress' ),
|
||||
'msr' => __( 'Montserrat', 'sportspress' ),
|
||||
'mtn' => __( 'Mauritania', 'sportspress' ),
|
||||
'mwi' => __( 'Malawi', 'sportspress' ),
|
||||
'mya' => __( 'Myanmar', 'sportspress' ),
|
||||
'nam' => __( 'Namibia', 'sportspress' ),
|
||||
'nca' => __( 'Nicaragua', 'sportspress' ),
|
||||
'ncl' => __( 'New Caledonia', 'sportspress' ),
|
||||
'ned' => __( 'Netherlands', 'sportspress' ),
|
||||
'nep' => __( 'Nepal', 'sportspress' ),
|
||||
'nga' => __( 'Nigeria', 'sportspress' ),
|
||||
'nig' => __( 'Niger', 'sportspress' ),
|
||||
'nir' => __( 'Northern Ireland', 'sportspress' ),
|
||||
'nor' => __( 'Norway', 'sportspress' ),
|
||||
'nru' => __( 'Nauru', 'sportspress' ),
|
||||
'nzl' => __( 'New Zealand', 'sportspress' ),
|
||||
'oma' => __( 'Oman', 'sportspress' ),
|
||||
'pak' => __( 'Pakistan', 'sportspress' ),
|
||||
'pan' => __( 'Panama', 'sportspress' ),
|
||||
'par' => __( 'Paraguay', 'sportspress' ),
|
||||
'per' => __( 'Peru', 'sportspress' ),
|
||||
'phi' => __( 'Philippines', 'sportspress' ),
|
||||
'ple' => __( 'Palestine', 'sportspress' ),
|
||||
'plw' => __( 'Palau', 'sportspress' ),
|
||||
'png' => __( 'Papua New Guinea', 'sportspress' ),
|
||||
'pol' => __( 'Poland', 'sportspress' ),
|
||||
'por' => __( 'Portugal', 'sportspress' ),
|
||||
'prk' => __( 'North Korea', 'sportspress' ),
|
||||
'pur' => __( 'Puerto Rico', 'sportspress' ),
|
||||
'qat' => __( 'Qatar', 'sportspress' ),
|
||||
'rou' => __( 'Romania', 'sportspress' ),
|
||||
'rsa' => __( 'South Africa', 'sportspress' ),
|
||||
'reu' => __( 'Reunion', 'sportspress' ),
|
||||
'rus' => __( 'Russia', 'sportspress' ),
|
||||
'rwa' => __( 'Rwanda', 'sportspress' ),
|
||||
'sam' => __( 'Samoa', 'sportspress' ),
|
||||
'sco' => __( 'Scotland', 'sportspress' ),
|
||||
'sdn' => __( 'Sudan', 'sportspress' ),
|
||||
'sen' => __( 'Senegal', 'sportspress' ),
|
||||
'sey' => __( 'Seychelles', 'sportspress' ),
|
||||
'sin' => __( 'Singapore', 'sportspress' ),
|
||||
'skn' => __( 'Saint Kitts and Nevis', 'sportspress' ),
|
||||
'sle' => __( 'Sierra Leone', 'sportspress' ),
|
||||
'slv' => __( 'El Salvador', 'sportspress' ),
|
||||
'smr' => __( 'San Marino', 'sportspress' ),
|
||||
'sol' => __( 'Solomon Islands', 'sportspress' ),
|
||||
'som' => __( 'Somalia', 'sportspress' ),
|
||||
'srb' => __( 'Serbia', 'sportspress' ),
|
||||
'sri' => __( 'Sri Lanka', 'sportspress' ),
|
||||
'ssd' => __( 'South Sudan', 'sportspress' ),
|
||||
'stp' => __( 'Sao Tome and Principe', 'sportspress' ),
|
||||
'sui' => __( 'Switzerland', 'sportspress' ),
|
||||
'sur' => __( 'Suriname', 'sportspress' ),
|
||||
'svk' => __( 'Slovakia', 'sportspress' ),
|
||||
'svn' => __( 'Slovenia', 'sportspress' ),
|
||||
'swe' => __( 'Sweden', 'sportspress' ),
|
||||
'swz' => __( 'Eswatini', 'sportspress' ),
|
||||
'sxm' => __( 'Sint Maarten', 'sportspress' ),
|
||||
'syr' => __( 'Syria', 'sportspress' ),
|
||||
'tah' => __( 'Tahiti', 'sportspress' ),
|
||||
'tan' => __( 'Tanzania', 'sportspress' ),
|
||||
'tca' => __( 'Turks and Caicos Islands', 'sportspress' ),
|
||||
'tga' => __( 'Tonga', 'sportspress' ),
|
||||
'tha' => __( 'Thailand', 'sportspress' ),
|
||||
'tjk' => __( 'Tajikistan', 'sportspress' ),
|
||||
'tkm' => __( 'Turkmenistan', 'sportspress' ),
|
||||
'tls' => __( 'East Timor', 'sportspress' ),
|
||||
'tog' => __( 'Togo', 'sportspress' ),
|
||||
'tpe' => __( 'Taiwan', 'sportspress' ),
|
||||
'tri' => __( 'Trinidad and Tobago', 'sportspress' ),
|
||||
'tun' => __( 'Tunisia', 'sportspress' ),
|
||||
'tur' => __( 'Turkey', 'sportspress' ),
|
||||
'tuv' => __( 'Tuvalu', 'sportspress' ),
|
||||
'uae' => __( 'United Arab Emirates', 'sportspress' ),
|
||||
'uga' => __( 'Uganda', 'sportspress' ),
|
||||
'ukr' => __( 'Ukraine', 'sportspress' ),
|
||||
'uru' => __( 'Uruguay', 'sportspress' ),
|
||||
'usa' => __( 'United States', 'sportspress' ),
|
||||
'uzb' => __( 'Uzbekistan', 'sportspress' ),
|
||||
'van' => __( 'Vanuatu', 'sportspress' ),
|
||||
'vat' => __( 'Vatican City', 'sportspress' ),
|
||||
'ven' => __( 'Venezuela', 'sportspress' ),
|
||||
'vgb' => __( 'British Virgin Islands', 'sportspress' ),
|
||||
'vie' => __( 'Vietnam', 'sportspress' ),
|
||||
'vin' => __( 'Saint Vincent and the Grenadines', 'sportspress' ),
|
||||
'vir' => __( 'US Virgin Islands', 'sportspress' ),
|
||||
'wal' => __( 'Wales', 'sportspress' ),
|
||||
'wif' => __( 'West Indies', 'sportspress' ),
|
||||
'yem' => __( 'Yemen', 'sportspress' ),
|
||||
'zam' => __( 'Zambia', 'sportspress' ),
|
||||
'zim' => __( 'Zimbabwe', 'sportspress' ),
|
||||
'afg' => esc_attr__( 'Afghanistan', 'sportspress' ),
|
||||
'aia' => esc_attr__( 'Anguilla', 'sportspress' ),
|
||||
'alb' => esc_attr__( 'Albania', 'sportspress' ),
|
||||
'alg' => esc_attr__( 'Algeria', 'sportspress' ),
|
||||
'and' => esc_attr__( 'Andorra', 'sportspress' ),
|
||||
'ang' => esc_attr__( 'Angola', 'sportspress' ),
|
||||
'arg' => esc_attr__( 'Argentina', 'sportspress' ),
|
||||
'arm' => esc_attr__( 'Armenia', 'sportspress' ),
|
||||
'aru' => esc_attr__( 'Aruba', 'sportspress' ),
|
||||
'asa' => esc_attr__( 'American Samoa', 'sportspress' ),
|
||||
'atg' => esc_attr__( 'Antigua and Barbuda', 'sportspress' ),
|
||||
'aus' => esc_attr__( 'Australia', 'sportspress' ),
|
||||
'aut' => esc_attr__( 'Austria', 'sportspress' ),
|
||||
'aze' => esc_attr__( 'Azerbaijan', 'sportspress' ),
|
||||
'bah' => esc_attr__( 'Bahamas', 'sportspress' ),
|
||||
'ban' => esc_attr__( 'Bangladesh', 'sportspress' ),
|
||||
'bdi' => esc_attr__( 'Burundi', 'sportspress' ),
|
||||
'bel' => esc_attr__( 'Belgium', 'sportspress' ),
|
||||
'ben' => esc_attr__( 'Benin', 'sportspress' ),
|
||||
'ber' => esc_attr__( 'Bermuda', 'sportspress' ),
|
||||
'bfa' => esc_attr__( 'Burkina Faso', 'sportspress' ),
|
||||
'bhr' => esc_attr__( 'Bahrain', 'sportspress' ),
|
||||
'bhu' => esc_attr__( 'Bhutan', 'sportspress' ),
|
||||
'bih' => esc_attr__( 'Bosnia and Herzegovina', 'sportspress' ),
|
||||
'blr' => esc_attr__( 'Belarus', 'sportspress' ),
|
||||
'blz' => esc_attr__( 'Belize', 'sportspress' ),
|
||||
'bol' => esc_attr__( 'Bolivia', 'sportspress' ),
|
||||
'bot' => esc_attr__( 'Botswana', 'sportspress' ),
|
||||
'bra' => esc_attr__( 'Brazil', 'sportspress' ),
|
||||
'brb' => esc_attr__( 'Barbados', 'sportspress' ),
|
||||
'bru' => esc_attr__( 'Brunei', 'sportspress' ),
|
||||
'bul' => esc_attr__( 'Bulgaria', 'sportspress' ),
|
||||
'cam' => esc_attr__( 'Cambodia', 'sportspress' ),
|
||||
'can' => esc_attr__( 'Canada', 'sportspress' ),
|
||||
'cay' => esc_attr__( 'Cayman Islands', 'sportspress' ),
|
||||
'cgo' => esc_attr__( 'Republic of the Congo', 'sportspress' ),
|
||||
'cha' => esc_attr__( 'Chad', 'sportspress' ),
|
||||
'chi' => esc_attr__( 'Chile', 'sportspress' ),
|
||||
'chn' => esc_attr__( 'China', 'sportspress' ),
|
||||
'civ' => esc_attr__( 'Ivory Coast', 'sportspress' ),
|
||||
'cmr' => esc_attr__( 'Cameroon', 'sportspress' ),
|
||||
'cod' => esc_attr__( 'Democratic Republic of the Congo', 'sportspress' ),
|
||||
'cok' => esc_attr__( 'Cook Islands', 'sportspress' ),
|
||||
'col' => esc_attr__( 'Colombia', 'sportspress' ),
|
||||
'com' => esc_attr__( 'Comoros', 'sportspress' ),
|
||||
'cpv' => esc_attr__( 'Cape Verde', 'sportspress' ),
|
||||
'crc' => esc_attr__( 'Costa Rica', 'sportspress' ),
|
||||
'cro' => esc_attr__( 'Croatia', 'sportspress' ),
|
||||
'cta' => esc_attr__( 'Central African Republic', 'sportspress' ),
|
||||
'cub' => esc_attr__( 'Cuba', 'sportspress' ),
|
||||
'cuw' => esc_attr__( 'Curacao', 'sportspress' ),
|
||||
'cyp' => esc_attr__( 'Cyprus', 'sportspress' ),
|
||||
'cze' => esc_attr__( 'Czechia', 'sportspress' ),
|
||||
'den' => esc_attr__( 'Denmark', 'sportspress' ),
|
||||
'dji' => esc_attr__( 'Djibouti', 'sportspress' ),
|
||||
'dma' => esc_attr__( 'Dominica', 'sportspress' ),
|
||||
'dom' => esc_attr__( 'Dominican Republic', 'sportspress' ),
|
||||
'ecu' => esc_attr__( 'Ecuador', 'sportspress' ),
|
||||
'egy' => esc_attr__( 'Egypt', 'sportspress' ),
|
||||
'eng' => esc_attr__( 'England', 'sportspress' ),
|
||||
'eqg' => esc_attr__( 'Equatorial Guinea', 'sportspress' ),
|
||||
'eri' => esc_attr__( 'Eritrea', 'sportspress' ),
|
||||
'esh' => esc_attr__( 'Western Sahara', 'sportspress' ),
|
||||
'esp' => esc_attr__( 'Spain', 'sportspress' ),
|
||||
'est' => esc_attr__( 'Estonia', 'sportspress' ),
|
||||
'eth' => esc_attr__( 'Ethiopia', 'sportspress' ),
|
||||
'fij' => esc_attr__( 'Fiji', 'sportspress' ),
|
||||
'fin' => esc_attr__( 'Finland', 'sportspress' ),
|
||||
'fra' => esc_attr__( 'France', 'sportspress' ),
|
||||
'fro' => esc_attr__( 'Faroe Islands', 'sportspress' ),
|
||||
'guf' => esc_attr__( 'French Guiana', 'sportspress' ),
|
||||
'pyf' => esc_attr__( 'French Polynesia', 'sportspress' ),
|
||||
'fsm' => esc_attr__( 'Micronesia', 'sportspress' ),
|
||||
'gab' => esc_attr__( 'Gabon', 'sportspress' ),
|
||||
'gam' => esc_attr__( 'Gambia', 'sportspress' ),
|
||||
'gbr' => esc_attr__( 'United Kingdom', 'sportspress' ),
|
||||
'geo' => esc_attr__( 'Georgia', 'sportspress' ),
|
||||
'ger' => esc_attr__( 'Germany', 'sportspress' ),
|
||||
'gha' => esc_attr__( 'Ghana', 'sportspress' ),
|
||||
'gib' => esc_attr__( 'Gibraltar', 'sportspress' ),
|
||||
'glp' => esc_attr__( 'Guadeloupe', 'sportspress' ),
|
||||
'gnb' => esc_attr__( 'Guinea-Bissau', 'sportspress' ),
|
||||
'gre' => esc_attr__( 'Greece', 'sportspress' ),
|
||||
'grl' => esc_attr__( 'Greenland', 'sportspress' ),
|
||||
'grn' => esc_attr__( 'Grenada', 'sportspress' ),
|
||||
'gua' => esc_attr__( 'Guatemala', 'sportspress' ),
|
||||
'gui' => esc_attr__( 'Guinea', 'sportspress' ),
|
||||
'gum' => esc_attr__( 'Guam', 'sportspress' ),
|
||||
'guy' => esc_attr__( 'Guyana', 'sportspress' ),
|
||||
'hai' => esc_attr__( 'Haiti', 'sportspress' ),
|
||||
'hkg' => esc_attr__( 'Hong Kong', 'sportspress' ),
|
||||
'hon' => esc_attr__( 'Honduras', 'sportspress' ),
|
||||
'hun' => esc_attr__( 'Hungary', 'sportspress' ),
|
||||
'idn' => esc_attr__( 'Indonesia', 'sportspress' ),
|
||||
'ind' => esc_attr__( 'India', 'sportspress' ),
|
||||
'irl' => esc_attr__( 'Ireland', 'sportspress' ),
|
||||
'irn' => esc_attr__( 'Iran', 'sportspress' ),
|
||||
'irq' => esc_attr__( 'Iraq', 'sportspress' ),
|
||||
'isl' => esc_attr__( 'Iceland', 'sportspress' ),
|
||||
'isr' => esc_attr__( 'Israel', 'sportspress' ),
|
||||
'ita' => esc_attr__( 'Italy', 'sportspress' ),
|
||||
'jam' => esc_attr__( 'Jamaica', 'sportspress' ),
|
||||
'jor' => esc_attr__( 'Jordan', 'sportspress' ),
|
||||
'jpn' => esc_attr__( 'Japan', 'sportspress' ),
|
||||
'kaz' => esc_attr__( 'Kazakhstan', 'sportspress' ),
|
||||
'ken' => esc_attr__( 'Kenya', 'sportspress' ),
|
||||
'kos' => esc_attr__( 'Kosovo', 'sportspress' ),
|
||||
'kgz' => esc_attr__( 'Kyrgyzstan', 'sportspress' ),
|
||||
'kir' => esc_attr__( 'Kiribati', 'sportspress' ),
|
||||
'mtq' => esc_attr__( 'Martinique', 'sportspress' ),
|
||||
'kor' => esc_attr__( 'South Korea', 'sportspress' ),
|
||||
'ksa' => esc_attr__( 'Saudi Arabia', 'sportspress' ),
|
||||
'kuw' => esc_attr__( 'Kuwait', 'sportspress' ),
|
||||
'lao' => esc_attr__( 'Laos', 'sportspress' ),
|
||||
'lbr' => esc_attr__( 'Liberia', 'sportspress' ),
|
||||
'lby' => esc_attr__( 'Libya', 'sportspress' ),
|
||||
'lca' => esc_attr__( 'Saint Lucia', 'sportspress' ),
|
||||
'les' => esc_attr__( 'Lesotho', 'sportspress' ),
|
||||
'lib' => esc_attr__( 'Lebanon', 'sportspress' ),
|
||||
'lie' => esc_attr__( 'Liechtenstein', 'sportspress' ),
|
||||
'ltu' => esc_attr__( 'Lithuania', 'sportspress' ),
|
||||
'lux' => esc_attr__( 'Luxembourg', 'sportspress' ),
|
||||
'lva' => esc_attr__( 'Latvia', 'sportspress' ),
|
||||
'mac' => esc_attr__( 'Macau', 'sportspress' ),
|
||||
'mad' => esc_attr__( 'Madagascar', 'sportspress' ),
|
||||
'mar' => esc_attr__( 'Morocco', 'sportspress' ),
|
||||
'mas' => esc_attr__( 'Malaysia', 'sportspress' ),
|
||||
'mco' => esc_attr__( 'Monaco', 'sportspress' ),
|
||||
'mda' => esc_attr__( 'Moldova', 'sportspress' ),
|
||||
'mdv' => esc_attr__( 'Maldives', 'sportspress' ),
|
||||
'mex' => esc_attr__( 'Mexico', 'sportspress' ),
|
||||
'mhl' => esc_attr__( 'Marshall Islands', 'sportspress' ),
|
||||
'mkd' => esc_attr__( 'North Macedonia', 'sportspress' ),
|
||||
'mli' => esc_attr__( 'Mali', 'sportspress' ),
|
||||
'mlt' => esc_attr__( 'Malta', 'sportspress' ),
|
||||
'mne' => esc_attr__( 'Montenegro', 'sportspress' ),
|
||||
'mng' => esc_attr__( 'Mongolia', 'sportspress' ),
|
||||
'moz' => esc_attr__( 'Mozambique', 'sportspress' ),
|
||||
'mri' => esc_attr__( 'Mauritius', 'sportspress' ),
|
||||
'msr' => esc_attr__( 'Montserrat', 'sportspress' ),
|
||||
'mtn' => esc_attr__( 'Mauritania', 'sportspress' ),
|
||||
'mwi' => esc_attr__( 'Malawi', 'sportspress' ),
|
||||
'mya' => esc_attr__( 'Myanmar', 'sportspress' ),
|
||||
'nam' => esc_attr__( 'Namibia', 'sportspress' ),
|
||||
'nca' => esc_attr__( 'Nicaragua', 'sportspress' ),
|
||||
'ncl' => esc_attr__( 'New Caledonia', 'sportspress' ),
|
||||
'ned' => esc_attr__( 'Netherlands', 'sportspress' ),
|
||||
'nep' => esc_attr__( 'Nepal', 'sportspress' ),
|
||||
'nga' => esc_attr__( 'Nigeria', 'sportspress' ),
|
||||
'nig' => esc_attr__( 'Niger', 'sportspress' ),
|
||||
'nir' => esc_attr__( 'Northern Ireland', 'sportspress' ),
|
||||
'nor' => esc_attr__( 'Norway', 'sportspress' ),
|
||||
'nru' => esc_attr__( 'Nauru', 'sportspress' ),
|
||||
'nzl' => esc_attr__( 'New Zealand', 'sportspress' ),
|
||||
'oma' => esc_attr__( 'Oman', 'sportspress' ),
|
||||
'pak' => esc_attr__( 'Pakistan', 'sportspress' ),
|
||||
'pan' => esc_attr__( 'Panama', 'sportspress' ),
|
||||
'par' => esc_attr__( 'Paraguay', 'sportspress' ),
|
||||
'per' => esc_attr__( 'Peru', 'sportspress' ),
|
||||
'phi' => esc_attr__( 'Philippines', 'sportspress' ),
|
||||
'ple' => esc_attr__( 'Palestine', 'sportspress' ),
|
||||
'plw' => esc_attr__( 'Palau', 'sportspress' ),
|
||||
'png' => esc_attr__( 'Papua New Guinea', 'sportspress' ),
|
||||
'pol' => esc_attr__( 'Poland', 'sportspress' ),
|
||||
'por' => esc_attr__( 'Portugal', 'sportspress' ),
|
||||
'prk' => esc_attr__( 'North Korea', 'sportspress' ),
|
||||
'pur' => esc_attr__( 'Puerto Rico', 'sportspress' ),
|
||||
'qat' => esc_attr__( 'Qatar', 'sportspress' ),
|
||||
'rou' => esc_attr__( 'Romania', 'sportspress' ),
|
||||
'rsa' => esc_attr__( 'South Africa', 'sportspress' ),
|
||||
'reu' => esc_attr__( 'Reunion', 'sportspress' ),
|
||||
'rus' => esc_attr__( 'Russia', 'sportspress' ),
|
||||
'rwa' => esc_attr__( 'Rwanda', 'sportspress' ),
|
||||
'sam' => esc_attr__( 'Samoa', 'sportspress' ),
|
||||
'sco' => esc_attr__( 'Scotland', 'sportspress' ),
|
||||
'sdn' => esc_attr__( 'Sudan', 'sportspress' ),
|
||||
'sen' => esc_attr__( 'Senegal', 'sportspress' ),
|
||||
'sey' => esc_attr__( 'Seychelles', 'sportspress' ),
|
||||
'sin' => esc_attr__( 'Singapore', 'sportspress' ),
|
||||
'skn' => esc_attr__( 'Saint Kitts and Nevis', 'sportspress' ),
|
||||
'sle' => esc_attr__( 'Sierra Leone', 'sportspress' ),
|
||||
'slv' => esc_attr__( 'El Salvador', 'sportspress' ),
|
||||
'smr' => esc_attr__( 'San Marino', 'sportspress' ),
|
||||
'sol' => esc_attr__( 'Solomon Islands', 'sportspress' ),
|
||||
'som' => esc_attr__( 'Somalia', 'sportspress' ),
|
||||
'srb' => esc_attr__( 'Serbia', 'sportspress' ),
|
||||
'sri' => esc_attr__( 'Sri Lanka', 'sportspress' ),
|
||||
'ssd' => esc_attr__( 'South Sudan', 'sportspress' ),
|
||||
'stp' => esc_attr__( 'Sao Tome and Principe', 'sportspress' ),
|
||||
'sui' => esc_attr__( 'Switzerland', 'sportspress' ),
|
||||
'sur' => esc_attr__( 'Suriname', 'sportspress' ),
|
||||
'svk' => esc_attr__( 'Slovakia', 'sportspress' ),
|
||||
'svn' => esc_attr__( 'Slovenia', 'sportspress' ),
|
||||
'swe' => esc_attr__( 'Sweden', 'sportspress' ),
|
||||
'swz' => esc_attr__( 'Eswatini', 'sportspress' ),
|
||||
'sxm' => esc_attr__( 'Sint Maarten', 'sportspress' ),
|
||||
'syr' => esc_attr__( 'Syria', 'sportspress' ),
|
||||
'tah' => esc_attr__( 'Tahiti', 'sportspress' ),
|
||||
'tan' => esc_attr__( 'Tanzania', 'sportspress' ),
|
||||
'tca' => esc_attr__( 'Turks and Caicos Islands', 'sportspress' ),
|
||||
'tga' => esc_attr__( 'Tonga', 'sportspress' ),
|
||||
'tha' => esc_attr__( 'Thailand', 'sportspress' ),
|
||||
'tjk' => esc_attr__( 'Tajikistan', 'sportspress' ),
|
||||
'tkm' => esc_attr__( 'Turkmenistan', 'sportspress' ),
|
||||
'tls' => esc_attr__( 'East Timor', 'sportspress' ),
|
||||
'tog' => esc_attr__( 'Togo', 'sportspress' ),
|
||||
'tpe' => esc_attr__( 'Taiwan', 'sportspress' ),
|
||||
'tri' => esc_attr__( 'Trinidad and Tobago', 'sportspress' ),
|
||||
'tun' => esc_attr__( 'Tunisia', 'sportspress' ),
|
||||
'tur' => esc_attr__( 'Turkey', 'sportspress' ),
|
||||
'tuv' => esc_attr__( 'Tuvalu', 'sportspress' ),
|
||||
'uae' => esc_attr__( 'United Arab Emirates', 'sportspress' ),
|
||||
'uga' => esc_attr__( 'Uganda', 'sportspress' ),
|
||||
'ukr' => esc_attr__( 'Ukraine', 'sportspress' ),
|
||||
'uru' => esc_attr__( 'Uruguay', 'sportspress' ),
|
||||
'usa' => esc_attr__( 'United States', 'sportspress' ),
|
||||
'uzb' => esc_attr__( 'Uzbekistan', 'sportspress' ),
|
||||
'van' => esc_attr__( 'Vanuatu', 'sportspress' ),
|
||||
'vat' => esc_attr__( 'Vatican City', 'sportspress' ),
|
||||
'ven' => esc_attr__( 'Venezuela', 'sportspress' ),
|
||||
'vgb' => esc_attr__( 'British Virgin Islands', 'sportspress' ),
|
||||
'vie' => esc_attr__( 'Vietnam', 'sportspress' ),
|
||||
'vin' => esc_attr__( 'Saint Vincent and the Grenadines', 'sportspress' ),
|
||||
'vir' => esc_attr__( 'US Virgin Islands', 'sportspress' ),
|
||||
'wal' => esc_attr__( 'Wales', 'sportspress' ),
|
||||
'wif' => esc_attr__( 'West Indies', 'sportspress' ),
|
||||
'yem' => esc_attr__( 'Yemen', 'sportspress' ),
|
||||
'zam' => esc_attr__( 'Zambia', 'sportspress' ),
|
||||
'zim' => esc_attr__( 'Zimbabwe', 'sportspress' ),
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ class SP_Event extends SP_Custom_Post {
|
||||
return array( $columns, $usecolumns, $data );
|
||||
else :
|
||||
// Add outcome to result columns
|
||||
$columns['outcome'] = __( 'Outcome', 'sportspress' );
|
||||
$columns['outcome'] = esc_attr__( 'Outcome', 'sportspress' );
|
||||
if ( is_array( $usecolumns ) ) :
|
||||
if ( 'manual' == get_option( 'sportspress_event_result_columns', 'auto' ) ) :
|
||||
foreach ( $columns as $key => $label ) :
|
||||
@@ -87,7 +87,7 @@ class SP_Event extends SP_Custom_Post {
|
||||
endif;
|
||||
|
||||
if ( 'yes' == get_option( 'sportspress_event_show_outcome', 'no' ) ) :
|
||||
$columns['outcome'] = __( 'Outcome', 'sportspress' );
|
||||
$columns['outcome'] = esc_attr__( 'Outcome', 'sportspress' );
|
||||
endif;
|
||||
endif;
|
||||
$data[0] = $columns;
|
||||
@@ -179,7 +179,7 @@ class SP_Event extends SP_Custom_Post {
|
||||
else :
|
||||
// Add position to performance labels
|
||||
if ( taxonomy_exists( 'sp_position' ) ) :
|
||||
$labels = array_merge( array( 'position' => __( 'Position', 'sportspress' ) ), $labels );
|
||||
$labels = array_merge( array( 'position' => esc_attr__( 'Position', 'sportspress' ) ), $labels );
|
||||
endif;
|
||||
if ( 'manual' == get_option( 'sportspress_event_performance_columns', 'auto' ) && is_array( $columns ) ) :
|
||||
foreach ( $labels as $key => $label ) :
|
||||
@@ -457,7 +457,7 @@ class SP_Event extends SP_Custom_Post {
|
||||
$stats[ $index ]['label'] = $name;
|
||||
$stats[ $index ]['icon'] = sp_get_logo( $details['team'] );
|
||||
} elseif ( 'sub' === $details['key'] ) {
|
||||
$sub_name = sp_array_value( $player_names, $details['sub'], __( 'Substitute', 'sportspress' ) );
|
||||
$sub_name = sp_array_value( $player_names, $details['sub'], esc_attr__( 'Substitute', 'sportspress' ) );
|
||||
$sub_number = sp_array_value( $player_numbers, $details['sub'] );
|
||||
|
||||
if ( '' !== $sub_number ) {
|
||||
@@ -468,7 +468,7 @@ class SP_Event extends SP_Custom_Post {
|
||||
|
||||
$stats[ $index ]['sub_name'] = $sub_name;
|
||||
$stats[ $index ]['sub_number'] = $sub_number;
|
||||
$stats[ $index ]['label'] = __( 'Substitute', 'sportspress' );
|
||||
$stats[ $index ]['label'] = esc_attr__( 'Substitute', 'sportspress' );
|
||||
$stats[ $index ]['icon'] = '<i class="sp-icon-sub" title="' . $icon_title . '"></i>';
|
||||
} else {
|
||||
$stats[ $index ]['label'] = sp_array_value( $performance_labels, $details['key'] );
|
||||
|
||||
@@ -24,15 +24,15 @@ class SP_Feeds {
|
||||
'calendar' => array(
|
||||
'ical' => array(
|
||||
'apple' => array(
|
||||
'name' => __( 'Apple Calendar', 'sportspress' ),
|
||||
'name' => esc_attr__( 'Apple Calendar', 'sportspress' ),
|
||||
'protocol' => 'webcal',
|
||||
),
|
||||
'outlook' => array(
|
||||
'name' => __( 'Outlook', 'sportspress' ),
|
||||
'name' => esc_attr__( 'Outlook', 'sportspress' ),
|
||||
'protocol' => 'webcal',
|
||||
),
|
||||
'google' => array(
|
||||
'name' => __( 'Google', 'sportspress' ),
|
||||
'name' => esc_attr__( 'Google', 'sportspress' ),
|
||||
'protocol' => 'webcal',
|
||||
'prefix' => 'http://www.google.com/calendar/render?cid=',
|
||||
),
|
||||
|
||||
@@ -26,21 +26,21 @@ class SP_Formats {
|
||||
'sportspress_formats',
|
||||
array(
|
||||
'event' => array(
|
||||
'league' => __( 'Competitive', 'sportspress' ),
|
||||
'friendly' => __( 'Friendly', 'sportspress' ),
|
||||
'league' => esc_attr__( 'Competitive', 'sportspress' ),
|
||||
'friendly' => esc_attr__( 'Friendly', 'sportspress' ),
|
||||
),
|
||||
'calendar' => array(
|
||||
'calendar' => __( 'Calendar', 'sportspress' ),
|
||||
'list' => __( 'List', 'sportspress' ),
|
||||
'blocks' => __( 'Blocks', 'sportspress' ),
|
||||
'calendar' => esc_attr__( 'Calendar', 'sportspress' ),
|
||||
'list' => esc_attr__( 'List', 'sportspress' ),
|
||||
'blocks' => esc_attr__( 'Blocks', 'sportspress' ),
|
||||
),
|
||||
'table' => array(
|
||||
'standings' => __( 'Standings', 'sportspress' ),
|
||||
'gallery' => __( 'Gallery', 'sportspress' ),
|
||||
'standings' => esc_attr__( 'Standings', 'sportspress' ),
|
||||
'gallery' => esc_attr__( 'Gallery', 'sportspress' ),
|
||||
),
|
||||
'list' => array(
|
||||
'list' => __( 'List', 'sportspress' ),
|
||||
'gallery' => __( 'Gallery', 'sportspress' ),
|
||||
'list' => esc_attr__( 'List', 'sportspress' ),
|
||||
'gallery' => esc_attr__( 'Gallery', 'sportspress' ),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
@@ -84,12 +84,12 @@ class SP_Frontend_Scripts {
|
||||
'sportspress',
|
||||
'localized_strings',
|
||||
array(
|
||||
'days' => __( 'days', 'sportspress' ),
|
||||
'hrs' => __( 'hrs', 'sportspress' ),
|
||||
'mins' => __( 'mins', 'sportspress' ),
|
||||
'secs' => __( 'secs', 'sportspress' ),
|
||||
'previous' => __( 'Previous', 'sportspress' ),
|
||||
'next' => __(
|
||||
'days' => esc_attr__( 'days', 'sportspress' ),
|
||||
'hrs' => esc_attr__( 'hrs', 'sportspress' ),
|
||||
'mins' => esc_attr__( 'mins', 'sportspress' ),
|
||||
'secs' => esc_attr__( 'secs', 'sportspress' ),
|
||||
'previous' => esc_attr__( 'Previous', 'sportspress' ),
|
||||
'next' => esc_attr__(
|
||||
'Next',
|
||||
'sportspress'
|
||||
),
|
||||
@@ -198,46 +198,46 @@ class SP_Frontend_Scripts {
|
||||
echo '.sp-event-calendar tbody td a,.sp-event-calendar tbody td a:hover{background: none;}';
|
||||
|
||||
if ( isset( $colors['primary'] ) ) {
|
||||
echo '.sp-data-table th,.sp-calendar th,.sp-data-table tfoot,.sp-calendar tfoot,.sp-button,.sp-heading{background:' . $colors['primary'] . ' !important}.sp-calendar tbody a{color:' . $colors['primary'] . ' !important}';
|
||||
echo '.sp-data-table th,.sp-calendar th,.sp-data-table tfoot,.sp-calendar tfoot,.sp-button,.sp-heading{background:' . esc_attr( $colors['primary'] ) . ' !important}.sp-calendar tbody a{color:' . esc_attr( $colors['primary'] ) . ' !important}';
|
||||
}
|
||||
|
||||
if ( isset( $colors['background'] ) ) {
|
||||
echo '.sp-data-table tbody,.sp-calendar tbody{background: ' . $colors['background'] . ' !important}';
|
||||
echo '.sp-data-table tbody,.sp-calendar tbody{background: ' . esc_attr( $colors['background'] ) . ' !important}';
|
||||
}
|
||||
|
||||
if ( isset( $colors['text'] ) ) {
|
||||
echo '.sp-data-table tbody,.sp-calendar tbody{color: ' . $colors['text'] . ' !important}';
|
||||
echo '.sp-data-table tbody,.sp-calendar tbody{color: ' . esc_attr( $colors['text'] ) . ' !important}';
|
||||
}
|
||||
|
||||
if ( isset( $colors['heading'] ) ) {
|
||||
echo '.sp-data-table th,.sp-data-table th a,.sp-data-table tfoot,.sp-data-table tfoot a,.sp-calendar th,.sp-calendar th a,.sp-calendar tfoot,.sp-calendar tfoot a,.sp-button,.sp-heading{color: ' . $colors['heading'] . ' !important}';
|
||||
echo '.sp-data-table th,.sp-data-table th a,.sp-data-table tfoot,.sp-data-table tfoot a,.sp-calendar th,.sp-calendar th a,.sp-calendar tfoot,.sp-calendar tfoot a,.sp-button,.sp-heading{color: ' . esc_attr( $colors['heading'] ) . ' !important}';
|
||||
}
|
||||
|
||||
if ( isset( $colors['link'] ) ) {
|
||||
echo '.sp-data-table tbody a,.sp-data-table tbody a:hover,.sp-calendar tbody a:focus{color: ' . $colors['link'] . ' !important}';
|
||||
echo '.sp-data-table tbody a,.sp-data-table tbody a:hover,.sp-calendar tbody a:focus{color: ' . esc_attr( $colors['link'] ) . ' !important}';
|
||||
}
|
||||
|
||||
if ( isset( $colors['highlight'] ) ) {
|
||||
echo '.sp-highlight,.sp-calendar td#today{background: ' . $colors['highlight'] . ' !important}';
|
||||
echo '.sp-highlight,.sp-calendar td#today{background: ' . esc_attr( $colors['highlight'] ) . ' !important}';
|
||||
}
|
||||
|
||||
do_action( 'sportspress_frontend_css', $colors );
|
||||
}
|
||||
|
||||
if ( $align != 'default' ) {
|
||||
echo '.sp-data-table th,.sp-data-table td{text-align: ' . $align . ' !important}';
|
||||
echo '.sp-data-table th,.sp-data-table td{text-align: ' . esc_attr( $align ) . ' !important}';
|
||||
}
|
||||
|
||||
if ( $padding != null ) {
|
||||
echo '.sp-data-table th,.sp-data-table td{padding: ' . $padding . 'px !important}';
|
||||
echo '.sp-data-table th,.sp-data-table td{padding: ' . esc_attr( $padding ) . 'px !important}';
|
||||
}
|
||||
|
||||
if ( $offset != 0 ) {
|
||||
echo ' @media only screen and (min-width: 40.063em) {.sp-header{top: ' . $offset . 'px}}';
|
||||
echo ' @media only screen and (min-width: 40.063em) {.sp-header{top: ' . esc_attr( $offset ) . 'px}}';
|
||||
}
|
||||
|
||||
if ( ! empty( $custom ) ) {
|
||||
echo ' /* SportsPress Custom CSS */ ' . $custom;
|
||||
echo ' /* SportsPress Custom CSS */ ' . wp_kses_post( $custom );
|
||||
}
|
||||
|
||||
echo '</style>';
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user