Escape outputs
This commit is contained in:
@@ -32,27 +32,27 @@ $raw = apply_filters(
|
|||||||
'sportspress_tinymce_strings',
|
'sportspress_tinymce_strings',
|
||||||
array(
|
array(
|
||||||
'shortcodes' => $shortcodes,
|
'shortcodes' => $shortcodes,
|
||||||
'insert' => __( 'SportsPress Shortcodes', 'sportspress' ),
|
'insert' => esc_attr__( 'SportsPress Shortcodes', 'sportspress' ),
|
||||||
'auto' => __( 'Auto', 'sportspress' ),
|
'auto' => esc_attr__( 'Auto', 'sportspress' ),
|
||||||
'manual' => __( 'Manual', 'sportspress' ),
|
'manual' => esc_attr__( 'Manual', 'sportspress' ),
|
||||||
'select' => __( 'Select...', 'sportspress' ),
|
'select' => esc_attr__( 'Select...', 'sportspress' ),
|
||||||
'event' => __( 'Event', 'sportspress' ),
|
'event' => esc_attr__( 'Event', 'sportspress' ),
|
||||||
'details' => __( 'Details', 'sportspress' ),
|
'details' => esc_attr__( 'Details', 'sportspress' ),
|
||||||
'results' => __( 'Results', 'sportspress' ),
|
'results' => esc_attr__( 'Results', 'sportspress' ),
|
||||||
'countdown' => __( 'Countdown', 'sportspress' ),
|
'countdown' => esc_attr__( 'Countdown', 'sportspress' ),
|
||||||
'performance' => __( 'Box Score', 'sportspress' ),
|
'performance' => esc_attr__( 'Box Score', 'sportspress' ),
|
||||||
'venue' => __( 'Venue', 'sportspress' ),
|
'venue' => esc_attr__( 'Venue', 'sportspress' ),
|
||||||
'officials' => __( 'Officials', 'sportspress' ),
|
'officials' => esc_attr__( 'Officials', 'sportspress' ),
|
||||||
'teams' => __( 'Teams', 'sportspress' ),
|
'teams' => esc_attr__( 'Teams', 'sportspress' ),
|
||||||
'full' => __( 'Full Info', 'sportspress' ),
|
'full' => esc_attr__( 'Full Info', 'sportspress' ),
|
||||||
'calendar' => __( 'Calendar', 'sportspress' ),
|
'calendar' => esc_attr__( 'Calendar', 'sportspress' ),
|
||||||
'statistics' => __( 'Statistics', 'sportspress' ),
|
'statistics' => esc_attr__( 'Statistics', 'sportspress' ),
|
||||||
'team' => __( 'Team', 'sportspress' ),
|
'team' => esc_attr__( 'Team', 'sportspress' ),
|
||||||
'standings' => __( 'League Table', 'sportspress' ),
|
'standings' => esc_attr__( 'League Table', 'sportspress' ),
|
||||||
'player' => __( 'Player', 'sportspress' ),
|
'player' => esc_attr__( 'Player', 'sportspress' ),
|
||||||
'list' => __( 'List', 'sportspress' ),
|
'list' => esc_attr__( 'List', 'sportspress' ),
|
||||||
'blocks' => __( 'Blocks', 'sportspress' ),
|
'blocks' => esc_attr__( 'Blocks', 'sportspress' ),
|
||||||
'gallery' => __( 'Gallery', 'sportspress' ),
|
'gallery' => esc_attr__( 'Gallery', 'sportspress' ),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -111,13 +111,13 @@ if ( ! class_exists( 'SP_Admin_Assets' ) ) :
|
|||||||
$strings = apply_filters(
|
$strings = apply_filters(
|
||||||
'sportspress_localized_strings',
|
'sportspress_localized_strings',
|
||||||
array(
|
array(
|
||||||
'none' => __( 'None', 'sportspress' ),
|
'none' => esc_attr__( 'None', 'sportspress' ),
|
||||||
'remove_text' => __( '— Remove —', 'sportspress' ),
|
'remove_text' => esc_attr__( '— Remove —', 'sportspress' ),
|
||||||
'days' => __( 'days', 'sportspress' ),
|
'days' => esc_attr__( 'days', 'sportspress' ),
|
||||||
'hrs' => __( 'hrs', 'sportspress' ),
|
'hrs' => esc_attr__( 'hrs', 'sportspress' ),
|
||||||
'mins' => __( 'mins', 'sportspress' ),
|
'mins' => esc_attr__( 'mins', 'sportspress' ),
|
||||||
'secs' => __( 'secs', 'sportspress' ),
|
'secs' => esc_attr__( 'secs', 'sportspress' ),
|
||||||
'displaying_posts' => html_entity_decode( __( 'Displaying %1$s–%2$s of %3$s', '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
|
* Init dashboard widgets
|
||||||
*/
|
*/
|
||||||
public function init() {
|
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_news', esc_attr__( '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_status', esc_attr__( 'SportsPress', 'sportspress' ), array( $this, 'status_widget' ) );
|
||||||
add_filter( 'dashboard_glance_items', array( $this, 'glance_items' ), 10, 1 );
|
add_filter( 'dashboard_glance_items', array( $this, 'glance_items' ), 10, 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,28 +35,28 @@ if ( ! class_exists( 'SP_Admin_Importers' ) ) :
|
|||||||
'sportspress_importers',
|
'sportspress_importers',
|
||||||
array(
|
array(
|
||||||
'sp_event_csv' => array(
|
'sp_event_csv' => array(
|
||||||
'name' => __( 'SportsPress Events (CSV)', 'sportspress' ),
|
'name' => esc_attr__( 'SportsPress Events (CSV)', 'sportspress' ),
|
||||||
'description' => __( 'Import <strong>events</strong> from a csv file.', 'sportspress' ),
|
'description' => esc_attr__( 'Import <strong>events</strong> from a csv file.', 'sportspress' ),
|
||||||
'callback' => array( $this, 'events_importer' ),
|
'callback' => array( $this, 'events_importer' ),
|
||||||
),
|
),
|
||||||
'sp_fixture_csv' => array(
|
'sp_fixture_csv' => array(
|
||||||
'name' => __( 'SportsPress Fixtures (CSV)', 'sportspress' ),
|
'name' => esc_attr__( 'SportsPress Fixtures (CSV)', 'sportspress' ),
|
||||||
'description' => __( 'Import <strong>upcoming events</strong> from a csv file.', 'sportspress' ),
|
'description' => esc_attr__( 'Import <strong>upcoming events</strong> from a csv file.', 'sportspress' ),
|
||||||
'callback' => array( $this, 'fixtures_importer' ),
|
'callback' => array( $this, 'fixtures_importer' ),
|
||||||
),
|
),
|
||||||
'sp_team_csv' => array(
|
'sp_team_csv' => array(
|
||||||
'name' => __( 'SportsPress Teams (CSV)', 'sportspress' ),
|
'name' => esc_attr__( 'SportsPress Teams (CSV)', 'sportspress' ),
|
||||||
'description' => __( 'Import <strong>teams</strong> from a csv file.', 'sportspress' ),
|
'description' => esc_attr__( 'Import <strong>teams</strong> from a csv file.', 'sportspress' ),
|
||||||
'callback' => array( $this, 'teams_importer' ),
|
'callback' => array( $this, 'teams_importer' ),
|
||||||
),
|
),
|
||||||
'sp_player_csv' => array(
|
'sp_player_csv' => array(
|
||||||
'name' => __( 'SportsPress Players (CSV)', 'sportspress' ),
|
'name' => esc_attr__( 'SportsPress Players (CSV)', 'sportspress' ),
|
||||||
'description' => __( 'Import <strong>players</strong> from a csv file.', 'sportspress' ),
|
'description' => esc_attr__( 'Import <strong>players</strong> from a csv file.', 'sportspress' ),
|
||||||
'callback' => array( $this, 'players_importer' ),
|
'callback' => array( $this, 'players_importer' ),
|
||||||
),
|
),
|
||||||
'sp_staff_csv' => array(
|
'sp_staff_csv' => array(
|
||||||
'name' => __( 'SportsPress Staff (CSV)', 'sportspress' ),
|
'name' => esc_attr__( 'SportsPress Staff (CSV)', 'sportspress' ),
|
||||||
'description' => __( 'Import <strong>staff</strong> from a csv file.', 'sportspress' ),
|
'description' => esc_attr__( 'Import <strong>staff</strong> from a csv file.', 'sportspress' ),
|
||||||
'callback' => array( $this, 'staff_importer' ),
|
'callback' => array( $this, 'staff_importer' ),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -64,8 +64,8 @@ if ( ! class_exists( 'SP_Admin_Importers' ) ) :
|
|||||||
|
|
||||||
if ( 'import.php' !== $pagenow ) {
|
if ( 'import.php' !== $pagenow ) {
|
||||||
$importers['sp_event_performance_csv'] = array(
|
$importers['sp_event_performance_csv'] = array(
|
||||||
'name' => __( 'SportsPress Box Score (CSV)', 'sportspress' ),
|
'name' => esc_attr__( '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>',
|
'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' ),
|
'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' );
|
$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
|
* Add menu item
|
||||||
*/
|
*/
|
||||||
public function config_menu() {
|
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
|
* Add menu item
|
||||||
*/
|
*/
|
||||||
public function leagues_menu() {
|
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
|
* Add menu item
|
||||||
*/
|
*/
|
||||||
public function seasons_menu() {
|
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;
|
global $menu, $submenu;
|
||||||
|
|
||||||
if ( isset( $submenu['sportspress'] ) && isset( $submenu['sportspress'][0] ) && isset( $submenu['sportspress'][0][0] ) ) {
|
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() ) {
|
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() ) {
|
public function remove_leagues( $arr = array() ) {
|
||||||
return $arr[0] != __( 'Leagues', 'sportspress' );
|
return $arr[0] != esc_attr__( 'Leagues', 'sportspress' );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function remove_positions( $arr = array() ) {
|
public function remove_positions( $arr = array() ) {
|
||||||
return $arr[0] != __( 'Positions', 'sportspress' );
|
return $arr[0] != esc_attr__( 'Positions', 'sportspress' );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function remove_seasons( $arr = array() ) {
|
public function remove_seasons( $arr = array() ) {
|
||||||
return $arr[0] != __( 'Seasons', 'sportspress' );
|
return $arr[0] != esc_attr__( 'Seasons', 'sportspress' );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function remove_venues( $arr = array() ) {
|
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' ) {
|
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(
|
$this->slugs = apply_filters(
|
||||||
'sportspress_permalink_slugs',
|
'sportspress_permalink_slugs',
|
||||||
array(
|
array(
|
||||||
array( 'event', __( 'Events', 'sportspress' ) ),
|
array( 'event', esc_attr__( 'Events', 'sportspress' ) ),
|
||||||
array( 'venue', __( 'Venues', 'sportspress' ) ),
|
array( 'venue', esc_attr__( 'Venues', 'sportspress' ) ),
|
||||||
array( 'calendar', __( 'Calendars', 'sportspress' ) ),
|
array( 'calendar', esc_attr__( 'Calendars', 'sportspress' ) ),
|
||||||
array( 'team', __( 'Teams', 'sportspress' ) ),
|
array( 'team', esc_attr__( 'Teams', 'sportspress' ) ),
|
||||||
array( 'league', __( 'Leagues', 'sportspress' ) ),
|
array( 'league', esc_attr__( 'Leagues', 'sportspress' ) ),
|
||||||
array( 'season', __( 'Seasons', 'sportspress' ) ),
|
array( 'season', esc_attr__( 'Seasons', 'sportspress' ) ),
|
||||||
array( 'table', __( 'League Tables', 'sportspress' ) ),
|
array( 'table', esc_attr__( 'League Tables', 'sportspress' ) ),
|
||||||
array( 'player', __( 'Players', 'sportspress' ) ),
|
array( 'player', esc_attr__( 'Players', 'sportspress' ) ),
|
||||||
array( 'position', __( 'Positions', 'sportspress' ) ),
|
array( 'position', esc_attr__( 'Positions', 'sportspress' ) ),
|
||||||
array( 'list', __( 'Player Lists', 'sportspress' ) ),
|
array( 'list', esc_attr__( 'Player Lists', 'sportspress' ) ),
|
||||||
array( 'staff', __( 'Staff', 'sportspress' ) ),
|
array( 'staff', esc_attr__( 'Staff', 'sportspress' ) ),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ if ( ! class_exists( 'SP_Admin_Permalink_Settings' ) ) :
|
|||||||
*/
|
*/
|
||||||
public function settings_init() {
|
public function settings_init() {
|
||||||
// Add a section to the permalinks page
|
// 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
|
// Add our settings
|
||||||
foreach ( $this->slugs as $slug ) :
|
foreach ( $this->slugs as $slug ) :
|
||||||
@@ -78,7 +78,7 @@ if ( ! class_exists( 'SP_Admin_Permalink_Settings' ) ) :
|
|||||||
* Show the settings
|
* Show the settings
|
||||||
*/
|
*/
|
||||||
public function 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 );
|
$obj = get_post_type_object( $typenow );
|
||||||
|
|
||||||
for ( $i = 0; $i <= 10; $i++ ) :
|
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 ) ) . '">' .
|
' <a href="' . esc_url( admin_url( 'edit.php?post_type=' . $typenow ) ) . '">' .
|
||||||
__( 'View All', 'sportspress' ) . '</a>';
|
__( 'View All', 'sportspress' ) . '</a>';
|
||||||
endfor;
|
endfor;
|
||||||
elseif ( is_sp_post_type( $typenow ) ) :
|
elseif ( is_sp_post_type( $typenow ) ) :
|
||||||
$obj = get_post_type_object( $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>';
|
' <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>';
|
' <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 ) ) ) . '">' .
|
' <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(
|
$messages['post'][9] = sprintf(
|
||||||
__( 'Scheduled for: <b>%1$s</b>.', 'sportspress' ),
|
__( '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 ) )
|
esc_url( get_permalink( $post->ID ) )
|
||||||
) .
|
) .
|
||||||
' <a target="_blank" href="' . 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 ) ) ) . '">' .
|
' <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;
|
endif;
|
||||||
|
|
||||||
return $messages;
|
return $messages;
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ class SP_Admin_Sample_Data {
|
|||||||
$post['post_title'] = $team['name'];
|
$post['post_title'] = $team['name'];
|
||||||
$post['post_type'] = 'sp_team';
|
$post['post_type'] = 'sp_team';
|
||||||
$post['post_status'] = 'publish';
|
$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
|
// Terms
|
||||||
$post['tax_input'] = array();
|
$post['tax_input'] = array();
|
||||||
@@ -230,7 +230,7 @@ class SP_Admin_Sample_Data {
|
|||||||
$post['post_title'] = $name;
|
$post['post_title'] = $name;
|
||||||
$post['post_type'] = 'sp_player';
|
$post['post_type'] = 'sp_player';
|
||||||
$post['post_status'] = 'publish';
|
$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
|
// Terms
|
||||||
$post['tax_input'] = array();
|
$post['tax_input'] = array();
|
||||||
@@ -342,7 +342,7 @@ class SP_Admin_Sample_Data {
|
|||||||
$post['post_title'] = $name;
|
$post['post_title'] = $name;
|
||||||
$post['post_type'] = 'sp_staff';
|
$post['post_type'] = 'sp_staff';
|
||||||
$post['post_status'] = 'publish';
|
$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
|
// Terms
|
||||||
$post['tax_input'] = array();
|
$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_title' => $teams[ $i ]['name'] . ' ' . get_option( 'sportspress_event_teams_delimiter', 'vs' ) . ' ' . $teams[ $away_index ]['name'],
|
||||||
'post_type' => 'sp_event',
|
'post_type' => 'sp_event',
|
||||||
'post_status' => $post_status,
|
'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',
|
'post_date' => $post_year . '-' . sprintf( '%02d', 3 + $i * 3 ) . '-' . sprintf( '%02d', 5 + $i * 10 ) . ' ' . ( 18 + $i ) . ':00:00',
|
||||||
'tax_input' => array(
|
'tax_input' => array(
|
||||||
'sp_league' => get_terms(
|
'sp_league' => get_terms(
|
||||||
@@ -568,7 +568,7 @@ class SP_Admin_Sample_Data {
|
|||||||
'post_title' => _x( 'Fixtures & Results', 'example', 'sportspress' ),
|
'post_title' => _x( 'Fixtures & Results', 'example', 'sportspress' ),
|
||||||
'post_type' => 'sp_calendar',
|
'post_type' => 'sp_calendar',
|
||||||
'post_status' => 'publish',
|
'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
|
// Insert post
|
||||||
@@ -618,7 +618,7 @@ class SP_Admin_Sample_Data {
|
|||||||
'post_title' => $league->name . ' ' . $season->name,
|
'post_title' => $league->name . ' ' . $season->name,
|
||||||
'post_type' => 'sp_table',
|
'post_type' => 'sp_table',
|
||||||
'post_status' => 'publish',
|
'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(
|
'tax_input' => array(
|
||||||
'sp_league' => $league->term_id,
|
'sp_league' => $league->term_id,
|
||||||
'sp_season' => $season->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_title' => get_the_title( $team_id ) . ' ' . _x( 'Roster', 'example', 'sportspress' ),
|
||||||
'post_type' => 'sp_list',
|
'post_type' => 'sp_list',
|
||||||
'post_status' => 'publish',
|
'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
|
// Insert post
|
||||||
@@ -705,7 +705,7 @@ class SP_Admin_Sample_Data {
|
|||||||
'post_title' => _x( 'Player Ranking', 'example', 'sportspress' ),
|
'post_title' => _x( 'Player Ranking', 'example', 'sportspress' ),
|
||||||
'post_type' => 'sp_list',
|
'post_type' => 'sp_list',
|
||||||
'post_status' => 'publish',
|
'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
|
// Insert post
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ if ( ! class_exists( 'SP_Admin_Settings' ) ) :
|
|||||||
do_action( 'sportspress_update_options_' . $current_tab );
|
do_action( 'sportspress_update_options_' . $current_tab );
|
||||||
do_action( 'sportspress_update_options' );
|
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' );
|
do_action( 'sportspress_settings_saved' );
|
||||||
}
|
}
|
||||||
@@ -144,7 +144,7 @@ if ( ! class_exists( 'SP_Admin_Settings' ) ) :
|
|||||||
'sportspress_settings',
|
'sportspress_settings',
|
||||||
'localized_strings',
|
'localized_strings',
|
||||||
array(
|
array(
|
||||||
'none' => __( 'None', 'sportspress' ),
|
'none' => esc_attr__( 'None', 'sportspress' ),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -57,37 +57,37 @@ class SP_Admin_Setup_Wizard {
|
|||||||
}
|
}
|
||||||
$this->steps = array(
|
$this->steps = array(
|
||||||
'introduction' => array(
|
'introduction' => array(
|
||||||
'name' => __( 'Introduction', 'sportspress' ),
|
'name' => esc_attr__( 'Introduction', 'sportspress' ),
|
||||||
'view' => array( $this, 'sp_setup_introduction' ),
|
'view' => array( $this, 'sp_setup_introduction' ),
|
||||||
'handler' => '',
|
'handler' => '',
|
||||||
),
|
),
|
||||||
'basics' => array(
|
'basics' => array(
|
||||||
'name' => __( 'Basic Setup', 'sportspress' ),
|
'name' => esc_attr__( 'Basic Setup', 'sportspress' ),
|
||||||
'view' => array( $this, 'sp_setup_basics' ),
|
'view' => array( $this, 'sp_setup_basics' ),
|
||||||
'handler' => array( $this, 'sp_setup_basics_save' ),
|
'handler' => array( $this, 'sp_setup_basics_save' ),
|
||||||
),
|
),
|
||||||
'teams' => array(
|
'teams' => array(
|
||||||
'name' => __( 'Teams', 'sportspress' ),
|
'name' => esc_attr__( 'Teams', 'sportspress' ),
|
||||||
'view' => array( $this, 'sp_setup_teams' ),
|
'view' => array( $this, 'sp_setup_teams' ),
|
||||||
'handler' => array( $this, 'sp_setup_teams_save' ),
|
'handler' => array( $this, 'sp_setup_teams_save' ),
|
||||||
),
|
),
|
||||||
'players_staff' => array(
|
'players_staff' => array(
|
||||||
'name' => __( 'Players', 'sportspress' ) . ' & ' . __( 'Staff', 'sportspress' ),
|
'name' => esc_attr__( 'Players', 'sportspress' ) . ' & ' . esc_attr__( 'Staff', 'sportspress' ),
|
||||||
'view' => array( $this, 'sp_setup_players_staff' ),
|
'view' => array( $this, 'sp_setup_players_staff' ),
|
||||||
'handler' => array( $this, 'sp_setup_players_staff_save' ),
|
'handler' => array( $this, 'sp_setup_players_staff_save' ),
|
||||||
),
|
),
|
||||||
'venue' => array(
|
'venue' => array(
|
||||||
'name' => __( 'Venue', 'sportspress' ),
|
'name' => esc_attr__( 'Venue', 'sportspress' ),
|
||||||
'view' => array( $this, 'sp_setup_venue' ),
|
'view' => array( $this, 'sp_setup_venue' ),
|
||||||
'handler' => array( $this, 'sp_setup_venue_save' ),
|
'handler' => array( $this, 'sp_setup_venue_save' ),
|
||||||
),
|
),
|
||||||
'pages' => array(
|
'pages' => array(
|
||||||
'name' => __( 'Pages', 'sportspress' ),
|
'name' => esc_attr__( 'Pages', 'sportspress' ),
|
||||||
'view' => array( $this, 'sp_setup_pages' ),
|
'view' => array( $this, 'sp_setup_pages' ),
|
||||||
'handler' => array( $this, 'sp_setup_pages_save' ),
|
'handler' => array( $this, 'sp_setup_pages_save' ),
|
||||||
),
|
),
|
||||||
'next_steps' => array(
|
'next_steps' => array(
|
||||||
'name' => __( 'Ready!', 'sportspress' ),
|
'name' => esc_attr__( 'Ready!', 'sportspress' ),
|
||||||
'view' => array( $this, 'sp_setup_ready' ),
|
'view' => array( $this, 'sp_setup_ready' ),
|
||||||
'handler' => '',
|
'handler' => '',
|
||||||
),
|
),
|
||||||
@@ -108,8 +108,8 @@ class SP_Admin_Setup_Wizard {
|
|||||||
$strings = apply_filters(
|
$strings = apply_filters(
|
||||||
'sportspress_localized_strings',
|
'sportspress_localized_strings',
|
||||||
array(
|
array(
|
||||||
'none' => __( 'None', 'sportspress' ),
|
'none' => esc_attr__( 'None', 'sportspress' ),
|
||||||
'remove_text' => __( '— Remove —', 'sportspress' ),
|
'remove_text' => esc_attr__( '— Remove —', 'sportspress' ),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -148,7 +148,7 @@ class SP_Admin_Setup_Wizard {
|
|||||||
<?php do_action( 'admin_head' ); ?>
|
<?php do_action( 'admin_head' ); ?>
|
||||||
</head>
|
</head>
|
||||||
<body class="sp-setup wp-core-ui">
|
<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
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -520,7 +520,7 @@ class SP_Admin_Setup_Wizard {
|
|||||||
update_post_meta( $id, 'sp_number', $number );
|
update_post_meta( $id, 'sp_number', $number );
|
||||||
|
|
||||||
// Add position
|
// 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
|
// Add team
|
||||||
if ( $team ) {
|
if ( $team ) {
|
||||||
@@ -608,7 +608,7 @@ class SP_Admin_Setup_Wizard {
|
|||||||
// Insert venue
|
// Insert venue
|
||||||
$venue = sanitize_text_field( $_POST['venue'] );
|
$venue = sanitize_text_field( $_POST['venue'] );
|
||||||
if ( ! is_string( $venue ) || empty( $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' );
|
$inserted = wp_insert_term( $venue, 'sp_venue' );
|
||||||
|
|
||||||
@@ -639,9 +639,9 @@ class SP_Admin_Setup_Wizard {
|
|||||||
$pages = apply_filters(
|
$pages = apply_filters(
|
||||||
'sportspress_setup_pages',
|
'sportspress_setup_pages',
|
||||||
array(
|
array(
|
||||||
'sp_calendar' => __( 'Organize and publish calendars using different layouts.', 'sportspress' ),
|
'sp_calendar' => esc_attr__( 'Organize and publish calendars using different layouts.', 'sportspress' ),
|
||||||
'sp_table' => __( 'Create automated league tables to keep track of team standings.', 'sportspress' ),
|
'sp_table' => esc_attr__( 'Create automated league tables to keep track of team standings.', 'sportspress' ),
|
||||||
'sp_list' => __( 'Create team rosters, player galleries, and ranking charts.', '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(
|
$pages = apply_filters(
|
||||||
'sportspress_setup_pages',
|
'sportspress_setup_pages',
|
||||||
array(
|
array(
|
||||||
'sp_calendar' => __( 'Organize and publish calendars using different layouts.', 'sportspress' ),
|
'sp_calendar' => esc_attr__( 'Organize and publish calendars using different layouts.', 'sportspress' ),
|
||||||
'sp_table' => __( 'Create automated league tables to keep track of team standings.', 'sportspress' ),
|
'sp_table' => esc_attr__( 'Create automated league tables to keep track of team standings.', 'sportspress' ),
|
||||||
'sp_list' => __( 'Create team rosters, player galleries, and ranking charts.', '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 );
|
$post['post_title'] = implode( ' ' . get_option( 'sportspress_event_teams_delimiter', 'vs' ) . ' ', $team_names );
|
||||||
} else {
|
} else {
|
||||||
$post['post_title'] = __( 'Event', 'sportspress' );
|
$post['post_title'] = esc_attr__( 'Event', 'sportspress' );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Insert event
|
// Insert event
|
||||||
@@ -857,12 +857,12 @@ class SP_Admin_Setup_Wizard {
|
|||||||
'sportspress_setup_wizard_next_steps',
|
'sportspress_setup_wizard_next_steps',
|
||||||
array(
|
array(
|
||||||
'first' => array(
|
'first' => array(
|
||||||
'label' => __( 'Next Steps', 'sportspress' ),
|
'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' ) ) . '">' . __( 'Schedule your first event!', 'sportspress' ) . '</a>',
|
'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(
|
'last' => array(
|
||||||
'label' => __( 'Upgrade to Pro', 'sportspress' ),
|
'label' => esc_attr__( '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>',
|
'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 );
|
$id = preg_replace( '/\\.[^.\\s]{3,4}$/', '', $file );
|
||||||
$presets[ $id ] = $data;
|
$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
|
// Conditionally append filename in parentheses for clarity
|
||||||
if ( false === strpos( str_replace( ' ', '', strtolower( $data['name'] ) ), str_replace( '-', '', $id ) ) ) {
|
if ( false === strpos( str_replace( ' ', '', strtolower( $data['name'] ) ), str_replace( '-', '', $id ) ) ) {
|
||||||
@@ -111,7 +111,7 @@ class SP_Admin_Sports {
|
|||||||
$name = $position;
|
$name = $position;
|
||||||
$sections = array( 0, 1 );
|
$sections = array( 0, 1 );
|
||||||
} else {
|
} 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 ) );
|
$sections = sp_array_value( $position, 'sections', array( 0, 1 ) );
|
||||||
}
|
}
|
||||||
$term = wp_insert_term( $name, 'sp_position' );
|
$term = wp_insert_term( $name, 'sp_position' );
|
||||||
@@ -321,12 +321,12 @@ class SP_Admin_Sports {
|
|||||||
return apply_filters(
|
return apply_filters(
|
||||||
'sportspress_sport_categories',
|
'sportspress_sport_categories',
|
||||||
array(
|
array(
|
||||||
'team-sports' => __( 'Team Sports', 'sportspress' ),
|
'team-sports' => esc_attr__( 'Team Sports', 'sportspress' ),
|
||||||
'racket-sports' => __( 'Racket Sports', 'sportspress' ),
|
'racket-sports' => esc_attr__( 'Racket Sports', 'sportspress' ),
|
||||||
'water-sports' => __( 'Water Sports', 'sportspress' ),
|
'water-sports' => esc_attr__( 'Water Sports', 'sportspress' ),
|
||||||
'target-sports' => __( 'Target Sports', 'sportspress' ),
|
'target-sports' => esc_attr__( 'Target Sports', 'sportspress' ),
|
||||||
'esports' => __( 'Esports', 'sportspress' ),
|
'esports' => esc_attr__( 'Esports', 'sportspress' ),
|
||||||
'other' => __( 'Other', 'sportspress' ),
|
'other' => esc_attr__( 'Other', 'sportspress' ),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -193,8 +193,8 @@ class SP_Admin_Taxonomies {
|
|||||||
$options = apply_filters(
|
$options = apply_filters(
|
||||||
'sportspress_performance_sections',
|
'sportspress_performance_sections',
|
||||||
array(
|
array(
|
||||||
0 => __( 'Offense', 'sportspress' ),
|
0 => esc_attr__( 'Offense', 'sportspress' ),
|
||||||
1 => __(
|
1 => esc_attr__(
|
||||||
'Defense',
|
'Defense',
|
||||||
'sportspress'
|
'sportspress'
|
||||||
),
|
),
|
||||||
@@ -232,8 +232,8 @@ class SP_Admin_Taxonomies {
|
|||||||
$options = apply_filters(
|
$options = apply_filters(
|
||||||
'sportspress_performance_sections',
|
'sportspress_performance_sections',
|
||||||
array(
|
array(
|
||||||
0 => __( 'Offense', 'sportspress' ),
|
0 => esc_attr__( 'Offense', 'sportspress' ),
|
||||||
1 => __(
|
1 => esc_attr__(
|
||||||
'Defense',
|
'Defense',
|
||||||
'sportspress'
|
'sportspress'
|
||||||
),
|
),
|
||||||
@@ -291,7 +291,7 @@ class SP_Admin_Taxonomies {
|
|||||||
$new_columns = array();
|
$new_columns = array();
|
||||||
|
|
||||||
if ( function_exists( 'get_term_meta' ) ) {
|
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 ) ) {
|
if ( array_key_exists( 'posts', $columns ) ) {
|
||||||
@@ -312,7 +312,7 @@ class SP_Admin_Taxonomies {
|
|||||||
*/
|
*/
|
||||||
public function venue_columns( $columns ) {
|
public function venue_columns( $columns ) {
|
||||||
$new_columns = array();
|
$new_columns = array();
|
||||||
$new_columns['sp_address'] = __( 'Address', 'sportspress' );
|
$new_columns['sp_address'] = esc_attr__( 'Address', 'sportspress' );
|
||||||
|
|
||||||
if ( array_key_exists( 'posts', $columns ) ) {
|
if ( array_key_exists( 'posts', $columns ) ) {
|
||||||
$new_columns['posts'] = $columns['posts'];
|
$new_columns['posts'] = $columns['posts'];
|
||||||
@@ -334,10 +334,10 @@ class SP_Admin_Taxonomies {
|
|||||||
*/
|
*/
|
||||||
public function position_columns( $columns ) {
|
public function position_columns( $columns ) {
|
||||||
$new_columns = array();
|
$new_columns = array();
|
||||||
$new_columns['sp_sections'] = __( 'Statistics', 'sportspress' );
|
$new_columns['sp_sections'] = esc_attr__( 'Statistics', 'sportspress' );
|
||||||
|
|
||||||
if ( function_exists( 'get_term_meta' ) ) {
|
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 ) ) {
|
if ( array_key_exists( 'posts', $columns ) ) {
|
||||||
@@ -375,8 +375,8 @@ class SP_Admin_Taxonomies {
|
|||||||
$options = apply_filters(
|
$options = apply_filters(
|
||||||
'sportspress_performance_sections',
|
'sportspress_performance_sections',
|
||||||
array(
|
array(
|
||||||
0 => __( 'Offense', 'sportspress' ),
|
0 => esc_attr__( 'Offense', 'sportspress' ),
|
||||||
1 => __(
|
1 => esc_attr__(
|
||||||
'Defense',
|
'Defense',
|
||||||
'sportspress'
|
'sportspress'
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -48,8 +48,8 @@ class SP_Admin_Welcome {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$welcome_page_name = __( 'About SportsPress', 'sportspress' );
|
$welcome_page_name = esc_attr__( 'About SportsPress', 'sportspress' );
|
||||||
$welcome_page_title = __( 'Welcome to SportsPress', 'sportspress' );
|
$welcome_page_title = esc_attr__( 'Welcome to SportsPress', 'sportspress' );
|
||||||
|
|
||||||
switch ( $_GET['page'] ) {
|
switch ( $_GET['page'] ) {
|
||||||
case 'sp-about':
|
case 'sp-about':
|
||||||
@@ -107,18 +107,18 @@ class SP_Admin_Welcome {
|
|||||||
unset( $version[2] );
|
unset( $version[2] );
|
||||||
$display_version = implode( '.', $version );
|
$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="sp-badge"><?php printf( esc_html__( 'Version %s', 'sportspress' ), esc_html( SP()->version ) ); ?></div>
|
||||||
|
|
||||||
<div class="about-text sp-about-text">
|
<div class="about-text sp-about-text">
|
||||||
<?php
|
<?php
|
||||||
if ( ! empty( $_GET['sp-installed'] ) ) {
|
if ( ! empty( $_GET['sp-installed'] ) ) {
|
||||||
$message = __( 'Thanks, all done!', 'sportspress' );
|
$message = esc_attr__( 'Thanks, all done!', 'sportspress' );
|
||||||
} elseif ( ! empty( $_GET['sp-updated'] ) ) {
|
} 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 {
|
} 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 ) );
|
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">
|
<div class="wrap about-wrap about-sportspress-wrap">
|
||||||
<?php $this->intro(); ?>
|
<?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">
|
<div class="sp-feature feature-section col one-col">
|
||||||
<?php echo wp_kses_post( $this->contributors() ); ?>
|
<?php echo wp_kses_post( $this->contributors() ); ?>
|
||||||
@@ -347,7 +347,7 @@ class SP_Admin_Welcome {
|
|||||||
|
|
||||||
<?php $this->intro(); ?>
|
<?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>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@@ -372,7 +372,7 @@ class SP_Admin_Welcome {
|
|||||||
$contributor_list .= sprintf(
|
$contributor_list .= sprintf(
|
||||||
'<a href="%s" title="%s">',
|
'<a href="%s" title="%s">',
|
||||||
esc_url( 'https://github.com/' . $contributor->login ),
|
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 .= sprintf( '<img src="%s" width="64" height="64" class="gravatar" alt="%s" />', esc_url( $contributor->avatar_url ), esc_html( $contributor->login ) );
|
||||||
$contributor_list .= '</a>';
|
$contributor_list .= '</a>';
|
||||||
|
|||||||
@@ -23,15 +23,15 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
$this->import_page = 'sp_event_csv';
|
$this->import_page = 'sp_event_csv';
|
||||||
$this->import_label = __( 'Import Events', 'sportspress' );
|
$this->import_label = esc_attr__( 'Import Events', 'sportspress' );
|
||||||
$this->columns = array(
|
$this->columns = array(
|
||||||
'post_date' => __( 'Date', 'sportspress' ),
|
'post_date' => esc_attr__( 'Date', 'sportspress' ),
|
||||||
'post_time' => __( 'Time', 'sportspress' ),
|
'post_time' => esc_attr__( 'Time', 'sportspress' ),
|
||||||
'sp_venue' => __( 'Venue', 'sportspress' ),
|
'sp_venue' => esc_attr__( 'Venue', 'sportspress' ),
|
||||||
'sp_team' => __( 'Teams', 'sportspress' ),
|
'sp_team' => esc_attr__( 'Teams', 'sportspress' ),
|
||||||
'sp_results' => __( 'Results', 'sportspress' ),
|
'sp_results' => esc_attr__( 'Results', 'sportspress' ),
|
||||||
'sp_outcome' => __( 'Outcome', 'sportspress' ),
|
'sp_outcome' => esc_attr__( 'Outcome', 'sportspress' ),
|
||||||
'sp_player' => __( 'Players', 'sportspress' ),
|
'sp_player' => esc_attr__( 'Players', 'sportspress' ),
|
||||||
);
|
);
|
||||||
$performance_labels = sp_get_var_labels( 'sp_performance' );
|
$performance_labels = sp_get_var_labels( 'sp_performance' );
|
||||||
if ( $performance_labels && is_array( $performance_labels ) && sizeof( $performance_labels ) ) {
|
if ( $performance_labels && is_array( $performance_labels ) && sizeof( $performance_labels ) ) {
|
||||||
@@ -156,7 +156,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|||||||
'post_type' => 'sp_event',
|
'post_type' => 'sp_event',
|
||||||
'post_status' => 'publish',
|
'post_status' => 'publish',
|
||||||
'post_date' => $date,
|
'post_date' => $date,
|
||||||
'post_title' => __( 'Event', 'sportspress' ),
|
'post_title' => esc_attr__( 'Event', 'sportspress' ),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Insert event
|
// Insert event
|
||||||
@@ -338,7 +338,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|||||||
$title = get_the_title( $id );
|
$title = get_the_title( $id );
|
||||||
|
|
||||||
// Initialize event name
|
// Initialize event name
|
||||||
if ( __( 'Event', 'sportspress' ) === $title ) {
|
if ( esc_attr__( 'Event', 'sportspress' ) === $title ) {
|
||||||
$title = '';
|
$title = '';
|
||||||
} else {
|
} else {
|
||||||
$title .= ' ' . get_option( 'sportspress_event_teams_delimiter', 'vs' ) . ' ';
|
$title .= ' ' . get_option( 'sportspress_event_teams_delimiter', 'vs' ) . ' ';
|
||||||
@@ -494,8 +494,8 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|||||||
function greet() {
|
function greet() {
|
||||||
echo '<div class="narrow">';
|
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>' . 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( 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( __( 'Supports CSV files generated by <a href="%s">LeagueLobster</a>.', 'sportspress' ) ), 'http://tboy.co/leaguelobster' ) . '</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' );
|
wp_import_upload_form( 'admin.php?import=sp_event_csv&step=1' );
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
}
|
}
|
||||||
@@ -538,7 +538,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|||||||
);
|
);
|
||||||
if ( ! sp_dropdown_taxonomies( $args ) ) :
|
if ( ! sp_dropdown_taxonomies( $args ) ) :
|
||||||
echo '<p>' . esc_html__( 'None', 'sportspress' ) . '</p>';
|
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;
|
endif;
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@@ -551,11 +551,11 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|||||||
'taxonomy' => 'sp_season',
|
'taxonomy' => 'sp_season',
|
||||||
'name' => 'sp_season',
|
'name' => 'sp_season',
|
||||||
'values' => 'slug',
|
'values' => 'slug',
|
||||||
'show_option_none' => __( '— Not set —', 'sportspress' ),
|
'show_option_none' => esc_attr__( '— Not set —', 'sportspress' ),
|
||||||
);
|
);
|
||||||
if ( ! sp_dropdown_taxonomies( $args ) ) :
|
if ( ! sp_dropdown_taxonomies( $args ) ) :
|
||||||
echo '<p>' . esc_html__( 'None', 'sportspress' ) . '</p>';
|
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;
|
endif;
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -23,9 +23,9 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
$this->import_page = 'sp_event_performance_csv';
|
$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(
|
$this->columns = array(
|
||||||
'sp_player' => __( 'Player', 'sportspress' ),
|
'sp_player' => esc_attr__( 'Player', 'sportspress' ),
|
||||||
);
|
);
|
||||||
$performance_labels = sp_get_var_labels( 'sp_performance' );
|
$performance_labels = sp_get_var_labels( 'sp_performance' );
|
||||||
if ( $performance_labels && is_array( $performance_labels ) && sizeof( $performance_labels ) ) {
|
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>' . 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' ) );
|
wp_import_upload_form( add_query_arg( $args, 'admin.php' ) );
|
||||||
} else {
|
} 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>';
|
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() {
|
public function __construct() {
|
||||||
$this->import_page = 'sp_fixture_csv';
|
$this->import_page = 'sp_fixture_csv';
|
||||||
$this->import_label = __( 'Import Fixtures', 'sportspress' );
|
$this->import_label = esc_attr__( 'Import Fixtures', 'sportspress' );
|
||||||
$this->columns = array(
|
$this->columns = array(
|
||||||
'post_date' => __( 'Date', 'sportspress' ),
|
'post_date' => esc_attr__( 'Date', 'sportspress' ),
|
||||||
'post_time' => __( 'Time', 'sportspress' ),
|
'post_time' => esc_attr__( 'Time', 'sportspress' ),
|
||||||
'sp_venue' => __( 'Venue', 'sportspress' ),
|
'sp_venue' => esc_attr__( 'Venue', 'sportspress' ),
|
||||||
'sp_home' => __( 'Home', 'sportspress' ),
|
'sp_home' => esc_attr__( 'Home', 'sportspress' ),
|
||||||
'sp_away' => __( 'Away', 'sportspress' ),
|
'sp_away' => esc_attr__( 'Away', 'sportspress' ),
|
||||||
'sp_day' => __( 'Match Day', 'sportspress' ),
|
'sp_day' => esc_attr__( 'Match Day', 'sportspress' ),
|
||||||
);
|
);
|
||||||
$this->optionals = array( 'sp_day' );
|
$this->optionals = array( 'sp_day' );
|
||||||
}
|
}
|
||||||
@@ -122,7 +122,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|||||||
'post_type' => 'sp_event',
|
'post_type' => 'sp_event',
|
||||||
'post_status' => 'publish',
|
'post_status' => 'publish',
|
||||||
'post_date' => $date,
|
'post_date' => $date,
|
||||||
'post_title' => __( 'Event', 'sportspress' ),
|
'post_title' => esc_attr__( 'Event', 'sportspress' ),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Insert event
|
// Insert event
|
||||||
@@ -226,7 +226,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|||||||
$title = get_the_title( $id );
|
$title = get_the_title( $id );
|
||||||
|
|
||||||
// Initialize event name
|
// Initialize event name
|
||||||
if ( __( 'Event', 'sportspress' ) === $title ) {
|
if ( esc_attr__( 'Event', 'sportspress' ) === $title ) {
|
||||||
$title = '';
|
$title = '';
|
||||||
} else {
|
} else {
|
||||||
$title .= ' ' . get_option( 'sportspress_event_teams_delimiter', 'vs' ) . ' ';
|
$title .= ' ' . get_option( 'sportspress_event_teams_delimiter', 'vs' ) . ' ';
|
||||||
@@ -284,8 +284,8 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|||||||
function greet() {
|
function greet() {
|
||||||
echo '<div class="narrow">';
|
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>' . 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( 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( __( 'Supports CSV files generated by <a href="%s">LeagueLobster</a>.', 'sportspress' ) ), 'http://tboy.co/leaguelobster' ) . '</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' );
|
wp_import_upload_form( 'admin.php?import=sp_fixture_csv&step=1' );
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
}
|
}
|
||||||
@@ -319,11 +319,11 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|||||||
'taxonomy' => 'sp_league',
|
'taxonomy' => 'sp_league',
|
||||||
'name' => 'sp_league',
|
'name' => 'sp_league',
|
||||||
'values' => 'slug',
|
'values' => 'slug',
|
||||||
'show_option_none' => __( '— Not set —', 'sportspress' ),
|
'show_option_none' => esc_attr__( '— Not set —', 'sportspress' ),
|
||||||
);
|
);
|
||||||
if ( ! sp_dropdown_taxonomies( $args ) ) :
|
if ( ! sp_dropdown_taxonomies( $args ) ) :
|
||||||
echo '<p>' . esc_html__( 'None', 'sportspress' ) . '</p>';
|
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;
|
endif;
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@@ -336,11 +336,11 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|||||||
'taxonomy' => 'sp_season',
|
'taxonomy' => 'sp_season',
|
||||||
'name' => 'sp_season',
|
'name' => 'sp_season',
|
||||||
'values' => 'slug',
|
'values' => 'slug',
|
||||||
'show_option_none' => __( '— Not set —', 'sportspress' ),
|
'show_option_none' => esc_attr__( '— Not set —', 'sportspress' ),
|
||||||
);
|
);
|
||||||
if ( ! sp_dropdown_taxonomies( $args ) ) :
|
if ( ! sp_dropdown_taxonomies( $args ) ) :
|
||||||
echo '<p>' . esc_html__( 'None', 'sportspress' ) . '</p>';
|
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;
|
endif;
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -23,9 +23,9 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
$this->import_page = 'sp_official_csv';
|
$this->import_page = 'sp_official_csv';
|
||||||
$this->import_label = __( 'Import Officials', 'sportspress' );
|
$this->import_label = esc_attr__( 'Import Officials', 'sportspress' );
|
||||||
$this->columns = array(
|
$this->columns = array(
|
||||||
'post_title' => __( 'Name', 'sportspress' ),
|
'post_title' => esc_attr__( 'Name', 'sportspress' ),
|
||||||
);
|
);
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
@@ -117,7 +117,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|||||||
function greet() {
|
function greet() {
|
||||||
echo '<div class="narrow">';
|
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>' . 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' );
|
wp_import_upload_form( 'admin.php?import=sp_official_csv&step=1' );
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,16 +23,16 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
$this->import_page = 'sp_player_csv';
|
$this->import_page = 'sp_player_csv';
|
||||||
$this->import_label = __( 'Import Players', 'sportspress' );
|
$this->import_label = esc_attr__( 'Import Players', 'sportspress' );
|
||||||
$this->columns = array(
|
$this->columns = array(
|
||||||
'sp_number' => __( 'Squad Number', 'sportspress' ),
|
'sp_number' => esc_attr__( 'Squad Number', 'sportspress' ),
|
||||||
'post_title' => __( 'Name', 'sportspress' ),
|
'post_title' => esc_attr__( 'Name', 'sportspress' ),
|
||||||
'sp_position' => __( 'Positions', 'sportspress' ),
|
'sp_position' => esc_attr__( 'Positions', 'sportspress' ),
|
||||||
'sp_team' => __( 'Teams', 'sportspress' ),
|
'sp_team' => esc_attr__( 'Teams', 'sportspress' ),
|
||||||
'sp_league' => __( 'Leagues', 'sportspress' ),
|
'sp_league' => esc_attr__( 'Leagues', 'sportspress' ),
|
||||||
'sp_season' => __( 'Seasons', 'sportspress' ),
|
'sp_season' => esc_attr__( 'Seasons', 'sportspress' ),
|
||||||
'sp_nationality' => __( 'Nationality', 'sportspress' ),
|
'sp_nationality' => esc_attr__( 'Nationality', 'sportspress' ),
|
||||||
'post_date' => __( 'Date of Birth', 'sportspress' ),
|
'post_date' => esc_attr__( 'Date of Birth', 'sportspress' ),
|
||||||
);
|
);
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
@@ -250,7 +250,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|||||||
function greet() {
|
function greet() {
|
||||||
echo '<div class="narrow">';
|
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>' . 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' );
|
wp_import_upload_form( 'admin.php?import=sp_player_csv&step=1' );
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,14 +23,14 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
$this->import_page = 'sp_staff_csv';
|
$this->import_page = 'sp_staff_csv';
|
||||||
$this->import_label = __( 'Import Staff', 'sportspress' );
|
$this->import_label = esc_attr__( 'Import Staff', 'sportspress' );
|
||||||
$this->columns = array(
|
$this->columns = array(
|
||||||
'post_title' => __( 'Name', 'sportspress' ),
|
'post_title' => esc_attr__( 'Name', 'sportspress' ),
|
||||||
'sp_role' => __( 'Jobs', 'sportspress' ),
|
'sp_role' => esc_attr__( 'Jobs', 'sportspress' ),
|
||||||
'sp_team' => __( 'Teams', 'sportspress' ),
|
'sp_team' => esc_attr__( 'Teams', 'sportspress' ),
|
||||||
'sp_league' => __( 'Leagues', 'sportspress' ),
|
'sp_league' => esc_attr__( 'Leagues', 'sportspress' ),
|
||||||
'sp_season' => __( 'Seasons', 'sportspress' ),
|
'sp_season' => esc_attr__( 'Seasons', 'sportspress' ),
|
||||||
'sp_nationality' => __( 'Nationality', 'sportspress' ),
|
'sp_nationality' => esc_attr__( 'Nationality', 'sportspress' ),
|
||||||
);
|
);
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
@@ -198,7 +198,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|||||||
function greet() {
|
function greet() {
|
||||||
echo '<div class="narrow">';
|
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>' . 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' );
|
wp_import_upload_form( 'admin.php?import=sp_staff_csv&step=1' );
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,14 +23,14 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
$this->import_page = 'sp_team_csv';
|
$this->import_page = 'sp_team_csv';
|
||||||
$this->import_label = __( 'Import Teams', 'sportspress' );
|
$this->import_label = esc_attr__( 'Import Teams', 'sportspress' );
|
||||||
$this->columns = array(
|
$this->columns = array(
|
||||||
'post_title' => __( 'Name', 'sportspress' ),
|
'post_title' => esc_attr__( 'Name', 'sportspress' ),
|
||||||
'sp_league' => __( 'Leagues', 'sportspress' ),
|
'sp_league' => esc_attr__( 'Leagues', 'sportspress' ),
|
||||||
'sp_season' => __( 'Seasons', 'sportspress' ),
|
'sp_season' => esc_attr__( 'Seasons', 'sportspress' ),
|
||||||
'sp_url' => __( 'Site URL', 'sportspress' ),
|
'sp_url' => esc_attr__( 'Site URL', 'sportspress' ),
|
||||||
'sp_abbreviation' => __( 'Abbreviation', 'sportspress' ),
|
'sp_abbreviation' => esc_attr__( 'Abbreviation', 'sportspress' ),
|
||||||
'sp_venue' => __( 'Home', 'sportspress' ),
|
'sp_venue' => esc_attr__( 'Home', 'sportspress' ),
|
||||||
);
|
);
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
@@ -144,7 +144,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|||||||
function greet() {
|
function greet() {
|
||||||
echo '<div class="narrow">';
|
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>' . 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' );
|
wp_import_upload_form( 'admin.php?import=sp_team_csv&step=1' );
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,13 +49,13 @@ if ( ! class_exists( 'SP_Admin_CPT_Calendar' ) ) :
|
|||||||
$columns = array_merge(
|
$columns = array_merge(
|
||||||
array(
|
array(
|
||||||
'cb' => '<input type="checkbox" />',
|
'cb' => '<input type="checkbox" />',
|
||||||
'title' => __( 'Title', 'sportspress' ),
|
'title' => esc_attr__( 'Title', 'sportspress' ),
|
||||||
'sp_league' => __( 'League', 'sportspress' ),
|
'sp_league' => esc_attr__( 'League', 'sportspress' ),
|
||||||
'sp_season' => __( 'Season', 'sportspress' ),
|
'sp_season' => esc_attr__( 'Season', 'sportspress' ),
|
||||||
'sp_venue' => __( 'Venue', 'sportspress' ),
|
'sp_venue' => esc_attr__( 'Venue', 'sportspress' ),
|
||||||
'sp_team' => __( 'Team', 'sportspress' ),
|
'sp_team' => esc_attr__( 'Team', 'sportspress' ),
|
||||||
'sp_events' => __( 'Events', 'sportspress' ),
|
'sp_events' => esc_attr__( 'Events', 'sportspress' ),
|
||||||
'sp_layout' => __( 'Layout', 'sportspress' ),
|
'sp_layout' => esc_attr__( 'Layout', 'sportspress' ),
|
||||||
),
|
),
|
||||||
$existing_columns
|
$existing_columns
|
||||||
);
|
);
|
||||||
@@ -122,7 +122,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Calendar' ) ) :
|
|||||||
|
|
||||||
$selected = isset( $_REQUEST['sp_league'] ) ? sanitize_key( $_REQUEST['sp_league'] ) : null;
|
$selected = isset( $_REQUEST['sp_league'] ) ? sanitize_key( $_REQUEST['sp_league'] ) : null;
|
||||||
$args = array(
|
$args = array(
|
||||||
'show_option_all' => __( 'Show all leagues', 'sportspress' ),
|
'show_option_all' => esc_attr__( 'Show all leagues', 'sportspress' ),
|
||||||
'taxonomy' => 'sp_league',
|
'taxonomy' => 'sp_league',
|
||||||
'name' => 'sp_league',
|
'name' => 'sp_league',
|
||||||
'selected' => $selected,
|
'selected' => $selected,
|
||||||
@@ -131,7 +131,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Calendar' ) ) :
|
|||||||
|
|
||||||
$selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null;
|
$selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null;
|
||||||
$args = array(
|
$args = array(
|
||||||
'show_option_all' => __( 'Show all seasons', 'sportspress' ),
|
'show_option_all' => esc_attr__( 'Show all seasons', 'sportspress' ),
|
||||||
'taxonomy' => 'sp_season',
|
'taxonomy' => 'sp_season',
|
||||||
'name' => 'sp_season',
|
'name' => 'sp_season',
|
||||||
'selected' => $selected,
|
'selected' => $selected,
|
||||||
@@ -142,11 +142,11 @@ if ( ! class_exists( 'SP_Admin_CPT_Calendar' ) ) :
|
|||||||
$args = array(
|
$args = array(
|
||||||
'post_type' => 'sp_team',
|
'post_type' => 'sp_team',
|
||||||
'name' => 'team',
|
'name' => 'team',
|
||||||
'show_option_none' => __( 'Show all teams', 'sportspress' ),
|
'show_option_none' => esc_attr__( 'Show all teams', 'sportspress' ),
|
||||||
'selected' => $selected,
|
'selected' => $selected,
|
||||||
'values' => 'ID',
|
'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 ) {
|
public function edit_columns( $existing_columns ) {
|
||||||
$columns = array(
|
$columns = array(
|
||||||
'cb' => '<input type="checkbox" />',
|
'cb' => '<input type="checkbox" />',
|
||||||
'title' => __( 'Label', 'sportspress' ),
|
'title' => esc_attr__( 'Label', 'sportspress' ),
|
||||||
'sp_key' => __( 'Key', 'sportspress' ),
|
'sp_key' => esc_attr__( 'Key', 'sportspress' ),
|
||||||
'sp_equation' => __( 'Equation', 'sportspress' ),
|
'sp_equation' => esc_attr__( 'Equation', 'sportspress' ),
|
||||||
'sp_precision' => __( 'Decimal Places', 'sportspress' ),
|
'sp_precision' => esc_attr__( 'Decimal Places', 'sportspress' ),
|
||||||
'sp_order' => __( 'Sort Order', 'sportspress' ),
|
'sp_order' => esc_attr__( 'Sort Order', 'sportspress' ),
|
||||||
'sp_description' => __( 'Description', 'sportspress' ),
|
'sp_description' => esc_attr__( 'Description', 'sportspress' ),
|
||||||
);
|
);
|
||||||
return apply_filters( 'sportspress_column_admin_columns', $columns );
|
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 ) {
|
public function enter_title_here( $text, $post ) {
|
||||||
if ( $post->post_type == 'sp_event' ) {
|
if ( $post->post_type == 'sp_event' ) {
|
||||||
return __( '(Auto)', 'sportspress' );
|
return esc_attr__( '(Auto)', 'sportspress' );
|
||||||
}
|
}
|
||||||
|
|
||||||
return $text;
|
return $text;
|
||||||
@@ -134,19 +134,19 @@ if ( ! class_exists( 'SP_Admin_CPT_Event' ) ) :
|
|||||||
$columns = array_merge(
|
$columns = array_merge(
|
||||||
array(
|
array(
|
||||||
'cb' => '<input type="checkbox" />',
|
'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,
|
'title' => null,
|
||||||
'date' => __( 'Date', 'sportspress' ),
|
'date' => esc_attr__( 'Date', 'sportspress' ),
|
||||||
'sp_time' => __( 'Time', 'sportspress' ),
|
'sp_time' => esc_attr__( 'Time', 'sportspress' ),
|
||||||
'sp_team' => __( 'Teams', 'sportspress' ),
|
'sp_team' => esc_attr__( 'Teams', 'sportspress' ),
|
||||||
'sp_league' => __( 'League', 'sportspress' ),
|
'sp_league' => esc_attr__( 'League', 'sportspress' ),
|
||||||
'sp_season' => __( 'Season', 'sportspress' ),
|
'sp_season' => esc_attr__( 'Season', 'sportspress' ),
|
||||||
'sp_venue' => __( 'Venue', 'sportspress' ),
|
'sp_venue' => esc_attr__( 'Venue', 'sportspress' ),
|
||||||
'sp_day' => __( 'Match Day', 'sportspress' ),
|
'sp_day' => esc_attr__( 'Match Day', 'sportspress' ),
|
||||||
),
|
),
|
||||||
$existing_columns,
|
$existing_columns,
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Event', 'sportspress' ),
|
'title' => esc_attr__( 'Event', 'sportspress' ),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
return apply_filters( 'sportspress_event_admin_columns', $columns );
|
return apply_filters( 'sportspress_event_admin_columns', $columns );
|
||||||
@@ -236,7 +236,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Event' ) ) :
|
|||||||
$team_results = implode( ' | ', $team_results );
|
$team_results = implode( ' | ', $team_results );
|
||||||
endif;
|
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 '<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 esc_html( $team->post_title );
|
||||||
echo '<br>';
|
echo '<br>';
|
||||||
@@ -266,7 +266,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Event' ) ) :
|
|||||||
case 'sp_day':
|
case 'sp_day':
|
||||||
$day = get_post_meta( $post_id, 'sp_day', true );
|
$day = get_post_meta( $post_id, 'sp_day', true );
|
||||||
if ( '' === $day ) {
|
if ( '' === $day ) {
|
||||||
$day = __( 'Default', 'sportspress' );
|
$day = esc_attr__( 'Default', 'sportspress' );
|
||||||
}
|
}
|
||||||
echo esc_html( $day );
|
echo esc_html( $day );
|
||||||
break;
|
break;
|
||||||
@@ -287,15 +287,15 @@ if ( ! class_exists( 'SP_Admin_CPT_Event' ) ) :
|
|||||||
$args = array(
|
$args = array(
|
||||||
'post_type' => 'sp_team',
|
'post_type' => 'sp_team',
|
||||||
'name' => 'team',
|
'name' => 'team',
|
||||||
'show_option_none' => __( 'Show all teams', 'sportspress' ),
|
'show_option_none' => esc_attr__( 'Show all teams', 'sportspress' ),
|
||||||
'selected' => $selected,
|
'selected' => $selected,
|
||||||
'values' => 'ID',
|
'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;
|
$selected = isset( $_REQUEST['sp_league'] ) ? sanitize_key( $_REQUEST['sp_league'] ) : null;
|
||||||
$args = array(
|
$args = array(
|
||||||
'show_option_all' => __( 'Show all leagues', 'sportspress' ),
|
'show_option_all' => esc_attr__( 'Show all leagues', 'sportspress' ),
|
||||||
'taxonomy' => 'sp_league',
|
'taxonomy' => 'sp_league',
|
||||||
'name' => 'sp_league',
|
'name' => 'sp_league',
|
||||||
'selected' => $selected,
|
'selected' => $selected,
|
||||||
@@ -304,7 +304,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Event' ) ) :
|
|||||||
|
|
||||||
$selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null;
|
$selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null;
|
||||||
$args = array(
|
$args = array(
|
||||||
'show_option_all' => __( 'Show all seasons', 'sportspress' ),
|
'show_option_all' => esc_attr__( 'Show all seasons', 'sportspress' ),
|
||||||
'taxonomy' => 'sp_season',
|
'taxonomy' => 'sp_season',
|
||||||
'name' => 'sp_season',
|
'name' => 'sp_season',
|
||||||
'selected' => $selected,
|
'selected' => $selected,
|
||||||
@@ -359,11 +359,11 @@ if ( ! class_exists( 'SP_Admin_CPT_Event' ) ) :
|
|||||||
$status = get_post_meta( $post->ID, 'sp_status', true );
|
$status = get_post_meta( $post->ID, 'sp_status', true );
|
||||||
|
|
||||||
if ( 'postponed' == $status ) {
|
if ( 'postponed' == $status ) {
|
||||||
$post_states = array( __( 'Postponed', 'sportspress' ) );
|
$post_states = array( esc_attr__( 'Postponed', 'sportspress' ) );
|
||||||
} elseif ( 'cancelled' == $status ) {
|
} elseif ( 'cancelled' == $status ) {
|
||||||
$post_states = array( __( 'Canceled', 'sportspress' ) );
|
$post_states = array( esc_attr__( 'Canceled', 'sportspress' ) );
|
||||||
} elseif ( 'tbd' == $status ) {
|
} elseif ( 'tbd' == $status ) {
|
||||||
$post_states = array( __( 'TBD', 'sportspress' ) );
|
$post_states = array( esc_attr__( 'TBD', 'sportspress' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return $post_states;
|
return $post_states;
|
||||||
|
|||||||
@@ -49,12 +49,12 @@ if ( ! class_exists( 'SP_Admin_CPT_List' ) ) :
|
|||||||
$columns = array_merge(
|
$columns = array_merge(
|
||||||
array(
|
array(
|
||||||
'cb' => '<input type="checkbox" />',
|
'cb' => '<input type="checkbox" />',
|
||||||
'title' => __( 'Title', 'sportspress' ),
|
'title' => esc_attr__( 'Title', 'sportspress' ),
|
||||||
'sp_league' => __( 'League', 'sportspress' ),
|
'sp_league' => esc_attr__( 'League', 'sportspress' ),
|
||||||
'sp_season' => __( 'Season', 'sportspress' ),
|
'sp_season' => esc_attr__( 'Season', 'sportspress' ),
|
||||||
'sp_team' => __( 'Team', 'sportspress' ),
|
'sp_team' => esc_attr__( 'Team', 'sportspress' ),
|
||||||
'sp_player' => __( 'Players', 'sportspress' ),
|
'sp_player' => esc_attr__( 'Players', 'sportspress' ),
|
||||||
'sp_layout' => __( 'Layout', 'sportspress' ),
|
'sp_layout' => esc_attr__( 'Layout', 'sportspress' ),
|
||||||
),
|
),
|
||||||
$existing_columns
|
$existing_columns
|
||||||
);
|
);
|
||||||
@@ -118,7 +118,7 @@ if ( ! class_exists( 'SP_Admin_CPT_List' ) ) :
|
|||||||
|
|
||||||
$selected = isset( $_REQUEST['sp_league'] ) ? sanitize_key( $_REQUEST['sp_league'] ) : null;
|
$selected = isset( $_REQUEST['sp_league'] ) ? sanitize_key( $_REQUEST['sp_league'] ) : null;
|
||||||
$args = array(
|
$args = array(
|
||||||
'show_option_all' => __( 'Show all leagues', 'sportspress' ),
|
'show_option_all' => esc_attr__( 'Show all leagues', 'sportspress' ),
|
||||||
'taxonomy' => 'sp_league',
|
'taxonomy' => 'sp_league',
|
||||||
'name' => 'sp_league',
|
'name' => 'sp_league',
|
||||||
'selected' => $selected,
|
'selected' => $selected,
|
||||||
@@ -127,7 +127,7 @@ if ( ! class_exists( 'SP_Admin_CPT_List' ) ) :
|
|||||||
|
|
||||||
$selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null;
|
$selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null;
|
||||||
$args = array(
|
$args = array(
|
||||||
'show_option_all' => __( 'Show all seasons', 'sportspress' ),
|
'show_option_all' => esc_attr__( 'Show all seasons', 'sportspress' ),
|
||||||
'taxonomy' => 'sp_season',
|
'taxonomy' => 'sp_season',
|
||||||
'name' => 'sp_season',
|
'name' => 'sp_season',
|
||||||
'selected' => $selected,
|
'selected' => $selected,
|
||||||
@@ -138,11 +138,11 @@ if ( ! class_exists( 'SP_Admin_CPT_List' ) ) :
|
|||||||
$args = array(
|
$args = array(
|
||||||
'post_type' => 'sp_team',
|
'post_type' => 'sp_team',
|
||||||
'name' => 'team',
|
'name' => 'team',
|
||||||
'show_option_none' => __( 'Show all teams', 'sportspress' ),
|
'show_option_none' => esc_attr__( 'Show all teams', 'sportspress' ),
|
||||||
'selected' => $selected,
|
'selected' => $selected,
|
||||||
'values' => 'ID',
|
'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 ) {
|
public function edit_columns( $existing_columns ) {
|
||||||
$columns = array(
|
$columns = array(
|
||||||
'cb' => '<input type="checkbox" />',
|
'cb' => '<input type="checkbox" />',
|
||||||
'title' => __( 'Label', 'sportspress' ),
|
'title' => esc_attr__( 'Label', 'sportspress' ),
|
||||||
'sp_key' => __( 'Variable', 'sportspress' ),
|
'sp_key' => esc_attr__( 'Variable', 'sportspress' ),
|
||||||
'sp_description' => __( 'Description', 'sportspress' ),
|
'sp_description' => esc_attr__( 'Description', 'sportspress' ),
|
||||||
);
|
);
|
||||||
return apply_filters( 'sportspress_metric_admin_columns', $columns );
|
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 ) {
|
public function enter_title_here( $text, $post ) {
|
||||||
if ( $post->post_type == 'sp_official' ) {
|
if ( $post->post_type == 'sp_official' ) {
|
||||||
return __( 'Name', 'sportspress' );
|
return esc_attr__( 'Name', 'sportspress' );
|
||||||
}
|
}
|
||||||
|
|
||||||
return $text;
|
return $text;
|
||||||
|
|||||||
@@ -43,10 +43,10 @@ if ( ! class_exists( 'SP_Admin_CPT_Outcome' ) ) :
|
|||||||
public function edit_columns( $existing_columns ) {
|
public function edit_columns( $existing_columns ) {
|
||||||
$columns = array(
|
$columns = array(
|
||||||
'cb' => '<input type="checkbox" />',
|
'cb' => '<input type="checkbox" />',
|
||||||
'title' => __( 'Label', 'sportspress' ),
|
'title' => esc_attr__( 'Label', 'sportspress' ),
|
||||||
'sp_key' => __( 'Variable', 'sportspress' ),
|
'sp_key' => esc_attr__( 'Variable', 'sportspress' ),
|
||||||
'sp_abbreviation' => __( 'Abbreviation', 'sportspress' ),
|
'sp_abbreviation' => esc_attr__( 'Abbreviation', 'sportspress' ),
|
||||||
'sp_description' => __( 'Description', 'sportspress' ),
|
'sp_description' => esc_attr__( 'Description', 'sportspress' ),
|
||||||
);
|
);
|
||||||
return apply_filters( 'sportspress_outcome_admin_columns', $columns );
|
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 ) {
|
public function edit_columns( $existing_columns ) {
|
||||||
$columns = array(
|
$columns = array(
|
||||||
'cb' => '<input type="checkbox" />',
|
'cb' => '<input type="checkbox" />',
|
||||||
'sp_icon' => __( 'Icon', 'sportspress' ),
|
'sp_icon' => esc_attr__( 'Icon', 'sportspress' ),
|
||||||
'title' => __( 'Label', 'sportspress' ),
|
'title' => esc_attr__( 'Label', 'sportspress' ),
|
||||||
'sp_key' => __( 'Variable', 'sportspress' ),
|
'sp_key' => esc_attr__( 'Variable', 'sportspress' ),
|
||||||
'sp_section' => __( 'Category', 'sportspress' ),
|
'sp_section' => esc_attr__( 'Category', 'sportspress' ),
|
||||||
'sp_config_format' => __( 'Format', 'sportspress' ),
|
'sp_config_format' => esc_attr__( 'Format', 'sportspress' ),
|
||||||
'sp_description' => __( 'Description', 'sportspress' ),
|
'sp_description' => esc_attr__( 'Description', 'sportspress' ),
|
||||||
);
|
);
|
||||||
return apply_filters( 'sportspress_performance_admin_columns', $columns );
|
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 ) {
|
public function enter_title_here( $text, $post ) {
|
||||||
if ( $post->post_type == 'sp_player' ) {
|
if ( $post->post_type == 'sp_player' ) {
|
||||||
return __( 'Name', 'sportspress' );
|
return esc_attr__( 'Name', 'sportspress' );
|
||||||
}
|
}
|
||||||
|
|
||||||
return $text;
|
return $text;
|
||||||
@@ -76,16 +76,16 @@ if ( ! class_exists( 'SP_Admin_CPT_Player' ) ) :
|
|||||||
$columns = array_merge(
|
$columns = array_merge(
|
||||||
array(
|
array(
|
||||||
'cb' => '<input type="checkbox" />',
|
'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,
|
'title' => null,
|
||||||
'sp_position' => __( 'Positions', 'sportspress' ),
|
'sp_position' => esc_attr__( 'Positions', 'sportspress' ),
|
||||||
'sp_team' => __( 'Teams', 'sportspress' ),
|
'sp_team' => esc_attr__( 'Teams', 'sportspress' ),
|
||||||
'sp_league' => __( 'Leagues', 'sportspress' ),
|
'sp_league' => esc_attr__( 'Leagues', 'sportspress' ),
|
||||||
'sp_season' => __( 'Seasons', 'sportspress' ),
|
'sp_season' => esc_attr__( 'Seasons', 'sportspress' ),
|
||||||
),
|
),
|
||||||
$existing_columns,
|
$existing_columns,
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Name', 'sportspress' ),
|
'title' => esc_attr__( 'Name', 'sportspress' ),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
return apply_filters( 'sportspress_player_admin_columns', $columns );
|
return apply_filters( 'sportspress_player_admin_columns', $columns );
|
||||||
@@ -156,7 +156,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Player' ) ) :
|
|||||||
if ( taxonomy_exists( 'sp_position' ) ) :
|
if ( taxonomy_exists( 'sp_position' ) ) :
|
||||||
$selected = isset( $_REQUEST['sp_position'] ) ? sanitize_key( $_REQUEST['sp_position'] ) : null;
|
$selected = isset( $_REQUEST['sp_position'] ) ? sanitize_key( $_REQUEST['sp_position'] ) : null;
|
||||||
$args = array(
|
$args = array(
|
||||||
'show_option_all' => __( 'Show all positions', 'sportspress' ),
|
'show_option_all' => esc_attr__( 'Show all positions', 'sportspress' ),
|
||||||
'taxonomy' => 'sp_position',
|
'taxonomy' => 'sp_position',
|
||||||
'name' => 'sp_position',
|
'name' => 'sp_position',
|
||||||
'selected' => $selected,
|
'selected' => $selected,
|
||||||
@@ -168,16 +168,16 @@ if ( ! class_exists( 'SP_Admin_CPT_Player' ) ) :
|
|||||||
$args = array(
|
$args = array(
|
||||||
'post_type' => 'sp_team',
|
'post_type' => 'sp_team',
|
||||||
'name' => 'team',
|
'name' => 'team',
|
||||||
'show_option_none' => __( 'Show all teams', 'sportspress' ),
|
'show_option_none' => esc_attr__( 'Show all teams', 'sportspress' ),
|
||||||
'selected' => $selected,
|
'selected' => $selected,
|
||||||
'values' => 'ID',
|
'values' => 'ID',
|
||||||
);
|
);
|
||||||
esc_html( wp_dropdown_pages( $args ) );
|
wp_dropdown_pages( $args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||||
|
|
||||||
if ( taxonomy_exists( 'sp_league' ) ) :
|
if ( taxonomy_exists( 'sp_league' ) ) :
|
||||||
$selected = isset( $_REQUEST['sp_league'] ) ? sanitize_key( $_REQUEST['sp_league'] ) : null;
|
$selected = isset( $_REQUEST['sp_league'] ) ? sanitize_key( $_REQUEST['sp_league'] ) : null;
|
||||||
$args = array(
|
$args = array(
|
||||||
'show_option_all' => __( 'Show all leagues', 'sportspress' ),
|
'show_option_all' => esc_attr__( 'Show all leagues', 'sportspress' ),
|
||||||
'taxonomy' => 'sp_league',
|
'taxonomy' => 'sp_league',
|
||||||
'name' => 'sp_league',
|
'name' => 'sp_league',
|
||||||
'selected' => $selected,
|
'selected' => $selected,
|
||||||
@@ -188,7 +188,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Player' ) ) :
|
|||||||
if ( taxonomy_exists( 'sp_season' ) ) :
|
if ( taxonomy_exists( 'sp_season' ) ) :
|
||||||
$selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null;
|
$selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null;
|
||||||
$args = array(
|
$args = array(
|
||||||
'show_option_all' => __( 'Show all seasons', 'sportspress' ),
|
'show_option_all' => esc_attr__( 'Show all seasons', 'sportspress' ),
|
||||||
'taxonomy' => 'sp_season',
|
'taxonomy' => 'sp_season',
|
||||||
'name' => 'sp_season',
|
'name' => 'sp_season',
|
||||||
'selected' => $selected,
|
'selected' => $selected,
|
||||||
|
|||||||
@@ -43,9 +43,9 @@ if ( ! class_exists( 'SP_Admin_CPT_Result' ) ) :
|
|||||||
public function edit_columns( $existing_columns ) {
|
public function edit_columns( $existing_columns ) {
|
||||||
$columns = array(
|
$columns = array(
|
||||||
'cb' => '<input type="checkbox" />',
|
'cb' => '<input type="checkbox" />',
|
||||||
'title' => __( 'Label', 'sportspress' ),
|
'title' => esc_attr__( 'Label', 'sportspress' ),
|
||||||
'sp_key' => __( 'Variable', 'sportspress' ),
|
'sp_key' => esc_attr__( 'Variable', 'sportspress' ),
|
||||||
'sp_description' => __( 'Description', 'sportspress' ),
|
'sp_description' => esc_attr__( 'Description', 'sportspress' ),
|
||||||
);
|
);
|
||||||
return apply_filters( 'sportspress_result_admin_columns', $columns );
|
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 ) {
|
public function edit_columns( $existing_columns ) {
|
||||||
$columns = array(
|
$columns = array(
|
||||||
'cb' => '<input type="checkbox" />',
|
'cb' => '<input type="checkbox" />',
|
||||||
'title' => __( 'Label', 'sportspress' ),
|
'title' => esc_attr__( 'Label', 'sportspress' ),
|
||||||
'sp_key' => __( 'Variable', 'sportspress' ),
|
'sp_key' => esc_attr__( 'Variable', 'sportspress' ),
|
||||||
'sp_description' => __( 'Description', 'sportspress' ),
|
'sp_description' => esc_attr__( 'Description', 'sportspress' ),
|
||||||
);
|
);
|
||||||
return apply_filters( 'sportspress_spec_admin_columns', $columns );
|
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 ) {
|
public function enter_title_here( $text, $post ) {
|
||||||
if ( $post->post_type == 'sp_staff' ) {
|
if ( $post->post_type == 'sp_staff' ) {
|
||||||
return __( 'Name', 'sportspress' );
|
return esc_attr__( 'Name', 'sportspress' );
|
||||||
}
|
}
|
||||||
|
|
||||||
return $text;
|
return $text;
|
||||||
@@ -68,14 +68,14 @@ if ( ! class_exists( 'SP_Admin_CPT_Staff' ) ) :
|
|||||||
array(
|
array(
|
||||||
'cb' => '<input type="checkbox" />',
|
'cb' => '<input type="checkbox" />',
|
||||||
'title' => null,
|
'title' => null,
|
||||||
'sp_role' => __( 'Job', 'sportspress' ),
|
'sp_role' => esc_attr__( 'Job', 'sportspress' ),
|
||||||
'sp_team' => __( 'Teams', 'sportspress' ),
|
'sp_team' => esc_attr__( 'Teams', 'sportspress' ),
|
||||||
'sp_league' => __( 'Leagues', 'sportspress' ),
|
'sp_league' => esc_attr__( 'Leagues', 'sportspress' ),
|
||||||
'sp_season' => __( 'Seasons', 'sportspress' ),
|
'sp_season' => esc_attr__( 'Seasons', 'sportspress' ),
|
||||||
),
|
),
|
||||||
$existing_columns,
|
$existing_columns,
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Name', 'sportspress' ),
|
'title' => esc_attr__( 'Name', 'sportspress' ),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
return apply_filters( 'sportspress_staff_admin_columns', $columns );
|
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 ) {
|
public function custom_columns( $column, $post_id ) {
|
||||||
switch ( $column ) :
|
switch ( $column ) :
|
||||||
case 'sp_role':
|
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;
|
break;
|
||||||
case 'sp_team':
|
case 'sp_team':
|
||||||
$teams = (array) get_post_meta( $post_id, 'sp_team', false );
|
$teams = (array) get_post_meta( $post_id, 'sp_team', false );
|
||||||
@@ -106,7 +106,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Staff' ) ) :
|
|||||||
if ( $team ) :
|
if ( $team ) :
|
||||||
echo esc_html( $team->post_title );
|
echo esc_html( $team->post_title );
|
||||||
if ( in_array( $team_id, $current_teams ) ) :
|
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;
|
endif;
|
||||||
echo '<br>';
|
echo '<br>';
|
||||||
endif;
|
endif;
|
||||||
@@ -114,10 +114,10 @@ if ( ! class_exists( 'SP_Admin_CPT_Staff' ) ) :
|
|||||||
endif;
|
endif;
|
||||||
break;
|
break;
|
||||||
case 'sp_league':
|
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;
|
break;
|
||||||
case 'sp_season':
|
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;
|
break;
|
||||||
endswitch;
|
endswitch;
|
||||||
}
|
}
|
||||||
@@ -136,15 +136,15 @@ if ( ! class_exists( 'SP_Admin_CPT_Staff' ) ) :
|
|||||||
$args = array(
|
$args = array(
|
||||||
'post_type' => 'sp_team',
|
'post_type' => 'sp_team',
|
||||||
'name' => 'team',
|
'name' => 'team',
|
||||||
'show_option_none' => __( 'Show all teams', 'sportspress' ),
|
'show_option_none' => esc_attr__( 'Show all teams', 'sportspress' ),
|
||||||
'selected' => $selected,
|
'selected' => $selected,
|
||||||
'values' => 'ID',
|
'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;
|
$selected = isset( $_REQUEST['sp_league'] ) ? sanitize_key( $_REQUEST['sp_league'] ) : null;
|
||||||
$args = array(
|
$args = array(
|
||||||
'show_option_all' => __( 'Show all leagues', 'sportspress' ),
|
'show_option_all' => esc_attr__( 'Show all leagues', 'sportspress' ),
|
||||||
'taxonomy' => 'sp_league',
|
'taxonomy' => 'sp_league',
|
||||||
'name' => 'sp_league',
|
'name' => 'sp_league',
|
||||||
'selected' => $selected,
|
'selected' => $selected,
|
||||||
@@ -153,7 +153,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Staff' ) ) :
|
|||||||
|
|
||||||
$selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null;
|
$selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null;
|
||||||
$args = array(
|
$args = array(
|
||||||
'show_option_all' => __( 'Show all seasons', 'sportspress' ),
|
'show_option_all' => esc_attr__( 'Show all seasons', 'sportspress' ),
|
||||||
'taxonomy' => 'sp_season',
|
'taxonomy' => 'sp_season',
|
||||||
'name' => 'sp_season',
|
'name' => 'sp_season',
|
||||||
'selected' => $selected,
|
'selected' => $selected,
|
||||||
|
|||||||
@@ -43,12 +43,12 @@ if ( ! class_exists( 'SP_Admin_CPT_Statistic' ) ) :
|
|||||||
public function edit_columns( $existing_columns ) {
|
public function edit_columns( $existing_columns ) {
|
||||||
$columns = array(
|
$columns = array(
|
||||||
'cb' => '<input type="checkbox" />',
|
'cb' => '<input type="checkbox" />',
|
||||||
'sp_icon' => __( 'Icon', 'sportspress' ),
|
'sp_icon' => esc_attr__( 'Icon', 'sportspress' ),
|
||||||
'title' => __( 'Label', 'sportspress' ),
|
'title' => esc_attr__( 'Label', 'sportspress' ),
|
||||||
'sp_key' => __( 'Key', 'sportspress' ),
|
'sp_key' => esc_attr__( 'Key', 'sportspress' ),
|
||||||
'sp_equation' => __( 'Equation', 'sportspress' ),
|
'sp_equation' => esc_attr__( 'Equation', 'sportspress' ),
|
||||||
'sp_precision' => __( 'Decimal Places', 'sportspress' ),
|
'sp_precision' => esc_attr__( 'Decimal Places', 'sportspress' ),
|
||||||
'sp_description' => __( 'Description', 'sportspress' ),
|
'sp_description' => esc_attr__( 'Description', 'sportspress' ),
|
||||||
);
|
);
|
||||||
return apply_filters( 'sportspress_statistic_admin_columns', $columns );
|
return apply_filters( 'sportspress_statistic_admin_columns', $columns );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,10 +49,10 @@ if ( ! class_exists( 'SP_Admin_CPT_Table' ) ) :
|
|||||||
$columns = array_merge(
|
$columns = array_merge(
|
||||||
array(
|
array(
|
||||||
'cb' => '<input type="checkbox" />',
|
'cb' => '<input type="checkbox" />',
|
||||||
'title' => __( 'Title', 'sportspress' ),
|
'title' => esc_attr__( 'Title', 'sportspress' ),
|
||||||
'sp_league' => __( 'League', 'sportspress' ),
|
'sp_league' => esc_attr__( 'League', 'sportspress' ),
|
||||||
'sp_season' => __( 'Season', 'sportspress' ),
|
'sp_season' => esc_attr__( 'Season', 'sportspress' ),
|
||||||
'sp_team' => __( 'Teams', 'sportspress' ),
|
'sp_team' => esc_attr__( 'Teams', 'sportspress' ),
|
||||||
),
|
),
|
||||||
$existing_columns
|
$existing_columns
|
||||||
);
|
);
|
||||||
@@ -96,7 +96,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Table' ) ) :
|
|||||||
|
|
||||||
$selected = isset( $_REQUEST['sp_league'] ) ? sanitize_key( $_REQUEST['sp_league'] ) : null;
|
$selected = isset( $_REQUEST['sp_league'] ) ? sanitize_key( $_REQUEST['sp_league'] ) : null;
|
||||||
$args = array(
|
$args = array(
|
||||||
'show_option_all' => __( 'Show all leagues', 'sportspress' ),
|
'show_option_all' => esc_attr__( 'Show all leagues', 'sportspress' ),
|
||||||
'taxonomy' => 'sp_league',
|
'taxonomy' => 'sp_league',
|
||||||
'name' => 'sp_league',
|
'name' => 'sp_league',
|
||||||
'selected' => $selected,
|
'selected' => $selected,
|
||||||
@@ -105,7 +105,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Table' ) ) :
|
|||||||
|
|
||||||
$selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null;
|
$selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null;
|
||||||
$args = array(
|
$args = array(
|
||||||
'show_option_all' => __( 'Show all seasons', 'sportspress' ),
|
'show_option_all' => esc_attr__( 'Show all seasons', 'sportspress' ),
|
||||||
'taxonomy' => 'sp_season',
|
'taxonomy' => 'sp_season',
|
||||||
'name' => 'sp_season',
|
'name' => 'sp_season',
|
||||||
'selected' => $selected,
|
'selected' => $selected,
|
||||||
@@ -116,11 +116,11 @@ if ( ! class_exists( 'SP_Admin_CPT_Table' ) ) :
|
|||||||
$args = array(
|
$args = array(
|
||||||
'post_type' => 'sp_team',
|
'post_type' => 'sp_team',
|
||||||
'name' => 'team',
|
'name' => 'team',
|
||||||
'show_option_none' => __( 'Show all teams', 'sportspress' ),
|
'show_option_none' => esc_attr__( 'Show all teams', 'sportspress' ),
|
||||||
'selected' => $selected,
|
'selected' => $selected,
|
||||||
'values' => 'ID',
|
'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 ) {
|
public function enter_title_here( $text, $post ) {
|
||||||
if ( $post->post_type == 'sp_team' ) {
|
if ( $post->post_type == 'sp_team' ) {
|
||||||
return __( 'Name', 'sportspress' );
|
return esc_attr__( 'Name', 'sportspress' );
|
||||||
}
|
}
|
||||||
|
|
||||||
return $text;
|
return $text;
|
||||||
@@ -66,16 +66,16 @@ if ( ! class_exists( 'SP_Admin_CPT_Team' ) ) :
|
|||||||
$columns = array_merge(
|
$columns = array_merge(
|
||||||
array(
|
array(
|
||||||
'cb' => '<input type="checkbox" />',
|
'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,
|
'title' => null,
|
||||||
'sp_short_name' => __( 'Short Name', 'sportspress' ),
|
'sp_short_name' => esc_attr__( 'Short Name', 'sportspress' ),
|
||||||
'sp_abbreviation' => __( 'Abbreviation', 'sportspress' ),
|
'sp_abbreviation' => esc_attr__( 'Abbreviation', 'sportspress' ),
|
||||||
'sp_league' => __( 'Leagues', 'sportspress' ),
|
'sp_league' => esc_attr__( 'Leagues', 'sportspress' ),
|
||||||
'sp_season' => __( 'Seasons', 'sportspress' ),
|
'sp_season' => esc_attr__( 'Seasons', 'sportspress' ),
|
||||||
),
|
),
|
||||||
$existing_columns,
|
$existing_columns,
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Team', 'sportspress' ),
|
'title' => esc_attr__( 'Team', 'sportspress' ),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
return apply_filters( 'sportspress_team_admin_columns', $columns );
|
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;
|
$selected = isset( $_REQUEST['sp_league'] ) ? sanitize_key( $_REQUEST['sp_league'] ) : null;
|
||||||
$args = array(
|
$args = array(
|
||||||
'show_option_all' => __( 'Show all leagues', 'sportspress' ),
|
'show_option_all' => esc_attr__( 'Show all leagues', 'sportspress' ),
|
||||||
'taxonomy' => 'sp_league',
|
'taxonomy' => 'sp_league',
|
||||||
'name' => 'sp_league',
|
'name' => 'sp_league',
|
||||||
'selected' => $selected,
|
'selected' => $selected,
|
||||||
@@ -129,7 +129,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Team' ) ) :
|
|||||||
|
|
||||||
$selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null;
|
$selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null;
|
||||||
$args = array(
|
$args = array(
|
||||||
'show_option_all' => __( 'Show all seasons', 'sportspress' ),
|
'show_option_all' => esc_attr__( 'Show all seasons', 'sportspress' ),
|
||||||
'taxonomy' => 'sp_season',
|
'taxonomy' => 'sp_season',
|
||||||
'name' => 'sp_season',
|
'name' => 'sp_season',
|
||||||
'selected' => $selected,
|
'selected' => $selected,
|
||||||
|
|||||||
@@ -42,8 +42,8 @@ if ( ! class_exists( 'SP_Admin_CPT' ) ) :
|
|||||||
if ( $post_type == $this->type ) {
|
if ( $post_type == $this->type ) {
|
||||||
$obj = get_post_type_object( $this->type );
|
$obj = get_post_type_object( $this->type );
|
||||||
|
|
||||||
$strings['insertIntoPost'] = sprintf( __( 'Insert into %s', 'sportspress' ), $obj->labels->singular_name );
|
$strings['insertIntoPost'] = sprintf( esc_attr__( 'Insert into %s', 'sportspress' ), $obj->labels->singular_name );
|
||||||
$strings['uploadedToThisPost'] = sprintf( __( 'Uploaded to this %s', 'sportspress' ), $obj->labels->singular_name );
|
$strings['uploadedToThisPost'] = sprintf( esc_attr__( 'Uploaded to this %s', 'sportspress' ), $obj->labels->singular_name );
|
||||||
}
|
}
|
||||||
|
|
||||||
return $strings;
|
return $strings;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class SP_Admin_Meta_Boxes {
|
|||||||
$meta_boxes = array(
|
$meta_boxes = array(
|
||||||
'sp_outcome' => array(
|
'sp_outcome' => array(
|
||||||
'details' => array(
|
'details' => array(
|
||||||
'title' => __( 'Details', 'sportspress' ),
|
'title' => esc_attr__( 'Details', 'sportspress' ),
|
||||||
'save' => 'SP_Meta_Box_Outcome_Details::save',
|
'save' => 'SP_Meta_Box_Outcome_Details::save',
|
||||||
'output' => 'SP_Meta_Box_Outcome_Details::output',
|
'output' => 'SP_Meta_Box_Outcome_Details::output',
|
||||||
'context' => 'normal',
|
'context' => 'normal',
|
||||||
@@ -40,14 +40,14 @@ class SP_Admin_Meta_Boxes {
|
|||||||
),
|
),
|
||||||
'sp_result' => array(
|
'sp_result' => array(
|
||||||
'details' => array(
|
'details' => array(
|
||||||
'title' => __( 'Details', 'sportspress' ),
|
'title' => esc_attr__( 'Details', 'sportspress' ),
|
||||||
'save' => 'SP_Meta_Box_Result_Details::save',
|
'save' => 'SP_Meta_Box_Result_Details::save',
|
||||||
'output' => 'SP_Meta_Box_Result_Details::output',
|
'output' => 'SP_Meta_Box_Result_Details::output',
|
||||||
'context' => 'side',
|
'context' => 'side',
|
||||||
'priority' => 'default',
|
'priority' => 'default',
|
||||||
),
|
),
|
||||||
'equation' => array(
|
'equation' => array(
|
||||||
'title' => __( 'Equation', 'sportspress' ),
|
'title' => esc_attr__( 'Equation', 'sportspress' ),
|
||||||
'save' => 'SP_Meta_Box_Result_Equation::save',
|
'save' => 'SP_Meta_Box_Result_Equation::save',
|
||||||
'output' => 'SP_Meta_Box_Result_Equation::output',
|
'output' => 'SP_Meta_Box_Result_Equation::output',
|
||||||
'context' => 'normal',
|
'context' => 'normal',
|
||||||
@@ -56,14 +56,14 @@ class SP_Admin_Meta_Boxes {
|
|||||||
),
|
),
|
||||||
'sp_performance' => array(
|
'sp_performance' => array(
|
||||||
'details' => array(
|
'details' => array(
|
||||||
'title' => __( 'Details', 'sportspress' ),
|
'title' => esc_attr__( 'Details', 'sportspress' ),
|
||||||
'save' => 'SP_Meta_Box_Performance_Details::save',
|
'save' => 'SP_Meta_Box_Performance_Details::save',
|
||||||
'output' => 'SP_Meta_Box_Performance_Details::output',
|
'output' => 'SP_Meta_Box_Performance_Details::output',
|
||||||
'context' => 'normal',
|
'context' => 'normal',
|
||||||
'priority' => 'high',
|
'priority' => 'high',
|
||||||
),
|
),
|
||||||
'equation' => array(
|
'equation' => array(
|
||||||
'title' => __( 'Equation', 'sportspress' ),
|
'title' => esc_attr__( 'Equation', 'sportspress' ),
|
||||||
'save' => 'SP_Meta_Box_Performance_Equation::save',
|
'save' => 'SP_Meta_Box_Performance_Equation::save',
|
||||||
'output' => 'SP_Meta_Box_Performance_Equation::output',
|
'output' => 'SP_Meta_Box_Performance_Equation::output',
|
||||||
'context' => 'normal',
|
'context' => 'normal',
|
||||||
@@ -72,14 +72,14 @@ class SP_Admin_Meta_Boxes {
|
|||||||
),
|
),
|
||||||
'sp_column' => array(
|
'sp_column' => array(
|
||||||
'details' => array(
|
'details' => array(
|
||||||
'title' => __( 'Details', 'sportspress' ),
|
'title' => esc_attr__( 'Details', 'sportspress' ),
|
||||||
'save' => 'SP_Meta_Box_Column_Details::save',
|
'save' => 'SP_Meta_Box_Column_Details::save',
|
||||||
'output' => 'SP_Meta_Box_Column_Details::output',
|
'output' => 'SP_Meta_Box_Column_Details::output',
|
||||||
'context' => 'side',
|
'context' => 'side',
|
||||||
'priority' => 'default',
|
'priority' => 'default',
|
||||||
),
|
),
|
||||||
'equation' => array(
|
'equation' => array(
|
||||||
'title' => __( 'Equation', 'sportspress' ),
|
'title' => esc_attr__( 'Equation', 'sportspress' ),
|
||||||
'save' => 'SP_Meta_Box_Column_Equation::save',
|
'save' => 'SP_Meta_Box_Column_Equation::save',
|
||||||
'output' => 'SP_Meta_Box_Column_Equation::output',
|
'output' => 'SP_Meta_Box_Column_Equation::output',
|
||||||
'context' => 'normal',
|
'context' => 'normal',
|
||||||
@@ -88,7 +88,7 @@ class SP_Admin_Meta_Boxes {
|
|||||||
),
|
),
|
||||||
'sp_metric' => array(
|
'sp_metric' => array(
|
||||||
'details' => array(
|
'details' => array(
|
||||||
'title' => __( 'Details', 'sportspress' ),
|
'title' => esc_attr__( 'Details', 'sportspress' ),
|
||||||
'save' => 'SP_Meta_Box_Metric_Details::save',
|
'save' => 'SP_Meta_Box_Metric_Details::save',
|
||||||
'output' => 'SP_Meta_Box_Metric_Details::output',
|
'output' => 'SP_Meta_Box_Metric_Details::output',
|
||||||
'context' => 'normal',
|
'context' => 'normal',
|
||||||
@@ -97,14 +97,14 @@ class SP_Admin_Meta_Boxes {
|
|||||||
),
|
),
|
||||||
'sp_statistic' => array(
|
'sp_statistic' => array(
|
||||||
'details' => array(
|
'details' => array(
|
||||||
'title' => __( 'Details', 'sportspress' ),
|
'title' => esc_attr__( 'Details', 'sportspress' ),
|
||||||
'save' => 'SP_Meta_Box_Statistic_Details::save',
|
'save' => 'SP_Meta_Box_Statistic_Details::save',
|
||||||
'output' => 'SP_Meta_Box_Statistic_Details::output',
|
'output' => 'SP_Meta_Box_Statistic_Details::output',
|
||||||
'context' => 'side',
|
'context' => 'side',
|
||||||
'priority' => 'default',
|
'priority' => 'default',
|
||||||
),
|
),
|
||||||
'equation' => array(
|
'equation' => array(
|
||||||
'title' => __( 'Equation', 'sportspress' ),
|
'title' => esc_attr__( 'Equation', 'sportspress' ),
|
||||||
'save' => 'SP_Meta_Box_Statistic_Equation::save',
|
'save' => 'SP_Meta_Box_Statistic_Equation::save',
|
||||||
'output' => 'SP_Meta_Box_Statistic_Equation::output',
|
'output' => 'SP_Meta_Box_Statistic_Equation::output',
|
||||||
'context' => 'normal',
|
'context' => 'normal',
|
||||||
@@ -113,48 +113,48 @@ class SP_Admin_Meta_Boxes {
|
|||||||
),
|
),
|
||||||
'sp_event' => array(
|
'sp_event' => array(
|
||||||
'shortcode' => array(
|
'shortcode' => array(
|
||||||
'title' => __( 'Shortcodes', 'sportspress' ),
|
'title' => esc_attr__( 'Shortcodes', 'sportspress' ),
|
||||||
'output' => 'SP_Meta_Box_Event_Shortcode::output',
|
'output' => 'SP_Meta_Box_Event_Shortcode::output',
|
||||||
'context' => 'side',
|
'context' => 'side',
|
||||||
'priority' => 'default',
|
'priority' => 'default',
|
||||||
),
|
),
|
||||||
'format' => array(
|
'format' => array(
|
||||||
'title' => __( 'Format', 'sportspress' ),
|
'title' => esc_attr__( 'Format', 'sportspress' ),
|
||||||
'save' => 'SP_Meta_Box_Event_Format::save',
|
'save' => 'SP_Meta_Box_Event_Format::save',
|
||||||
'output' => 'SP_Meta_Box_Event_Format::output',
|
'output' => 'SP_Meta_Box_Event_Format::output',
|
||||||
'context' => 'side',
|
'context' => 'side',
|
||||||
'priority' => 'default',
|
'priority' => 'default',
|
||||||
),
|
),
|
||||||
'mode' => array(
|
'mode' => array(
|
||||||
'title' => __( 'Mode', 'sportspress' ),
|
'title' => esc_attr__( 'Mode', 'sportspress' ),
|
||||||
'save' => 'SP_Meta_Box_Event_Mode::save',
|
'save' => 'SP_Meta_Box_Event_Mode::save',
|
||||||
'output' => 'SP_Meta_Box_Event_Mode::output',
|
'output' => 'SP_Meta_Box_Event_Mode::output',
|
||||||
'context' => 'side',
|
'context' => 'side',
|
||||||
'priority' => 'default',
|
'priority' => 'default',
|
||||||
),
|
),
|
||||||
'details' => array(
|
'details' => array(
|
||||||
'title' => __( 'Details', 'sportspress' ),
|
'title' => esc_attr__( 'Details', 'sportspress' ),
|
||||||
'save' => 'SP_Meta_Box_Event_Details::save',
|
'save' => 'SP_Meta_Box_Event_Details::save',
|
||||||
'output' => 'SP_Meta_Box_Event_Details::output',
|
'output' => 'SP_Meta_Box_Event_Details::output',
|
||||||
'context' => 'side',
|
'context' => 'side',
|
||||||
'priority' => 'default',
|
'priority' => 'default',
|
||||||
),
|
),
|
||||||
'team' => array(
|
'team' => array(
|
||||||
'title' => __( 'Teams', 'sportspress' ),
|
'title' => esc_attr__( 'Teams', 'sportspress' ),
|
||||||
'save' => 'SP_Meta_Box_Event_Teams::save',
|
'save' => 'SP_Meta_Box_Event_Teams::save',
|
||||||
'output' => 'SP_Meta_Box_Event_Teams::output',
|
'output' => 'SP_Meta_Box_Event_Teams::output',
|
||||||
'context' => 'side',
|
'context' => 'side',
|
||||||
'priority' => 'default',
|
'priority' => 'default',
|
||||||
),
|
),
|
||||||
'results' => array(
|
'results' => array(
|
||||||
'title' => __( 'Results', 'sportspress' ),
|
'title' => esc_attr__( 'Results', 'sportspress' ),
|
||||||
'save' => 'SP_Meta_Box_Event_Results::save',
|
'save' => 'SP_Meta_Box_Event_Results::save',
|
||||||
'output' => 'SP_Meta_Box_Event_Results::output',
|
'output' => 'SP_Meta_Box_Event_Results::output',
|
||||||
'context' => 'normal',
|
'context' => 'normal',
|
||||||
'priority' => 'high',
|
'priority' => 'high',
|
||||||
),
|
),
|
||||||
'performance' => array(
|
'performance' => array(
|
||||||
'title' => __( 'Box Score', 'sportspress' ),
|
'title' => esc_attr__( 'Box Score', 'sportspress' ),
|
||||||
'save' => 'SP_Meta_Box_Event_Performance::save',
|
'save' => 'SP_Meta_Box_Event_Performance::save',
|
||||||
'output' => 'SP_Meta_Box_Event_Performance::output',
|
'output' => 'SP_Meta_Box_Event_Performance::output',
|
||||||
'context' => 'normal',
|
'context' => 'normal',
|
||||||
@@ -163,14 +163,14 @@ class SP_Admin_Meta_Boxes {
|
|||||||
),
|
),
|
||||||
'sp_team' => array(
|
'sp_team' => array(
|
||||||
'details' => array(
|
'details' => array(
|
||||||
'title' => __( 'Details', 'sportspress' ),
|
'title' => esc_attr__( 'Details', 'sportspress' ),
|
||||||
'save' => 'SP_Meta_Box_Team_Details::save',
|
'save' => 'SP_Meta_Box_Team_Details::save',
|
||||||
'output' => 'SP_Meta_Box_Team_Details::output',
|
'output' => 'SP_Meta_Box_Team_Details::output',
|
||||||
'context' => 'side',
|
'context' => 'side',
|
||||||
'priority' => 'default',
|
'priority' => 'default',
|
||||||
),
|
),
|
||||||
'staff' => array(
|
'staff' => array(
|
||||||
'title' => __( 'Staff', 'sportspress' ),
|
'title' => esc_attr__( 'Staff', 'sportspress' ),
|
||||||
'save' => 'SP_Meta_Box_Team_Staff::save',
|
'save' => 'SP_Meta_Box_Team_Staff::save',
|
||||||
'output' => 'SP_Meta_Box_Team_Staff::output',
|
'output' => 'SP_Meta_Box_Team_Staff::output',
|
||||||
'context' => 'normal',
|
'context' => 'normal',
|
||||||
@@ -179,34 +179,34 @@ class SP_Admin_Meta_Boxes {
|
|||||||
),
|
),
|
||||||
'sp_player' => array(
|
'sp_player' => array(
|
||||||
'shortcode' => array(
|
'shortcode' => array(
|
||||||
'title' => __( 'Shortcodes', 'sportspress' ),
|
'title' => esc_attr__( 'Shortcodes', 'sportspress' ),
|
||||||
'output' => 'SP_Meta_Box_Player_Shortcode::output',
|
'output' => 'SP_Meta_Box_Player_Shortcode::output',
|
||||||
'context' => 'side',
|
'context' => 'side',
|
||||||
'priority' => 'default',
|
'priority' => 'default',
|
||||||
),
|
),
|
||||||
'columns' => array(
|
'columns' => array(
|
||||||
'title' => __( 'Columns', 'sportspress' ),
|
'title' => esc_attr__( 'Columns', 'sportspress' ),
|
||||||
'save' => 'SP_Meta_Box_Player_Columns::save',
|
'save' => 'SP_Meta_Box_Player_Columns::save',
|
||||||
'output' => 'SP_Meta_Box_Player_Columns::output',
|
'output' => 'SP_Meta_Box_Player_Columns::output',
|
||||||
'context' => 'side',
|
'context' => 'side',
|
||||||
'priority' => 'default',
|
'priority' => 'default',
|
||||||
),
|
),
|
||||||
'details' => array(
|
'details' => array(
|
||||||
'title' => __( 'Details', 'sportspress' ),
|
'title' => esc_attr__( 'Details', 'sportspress' ),
|
||||||
'save' => 'SP_Meta_Box_Player_Details::save',
|
'save' => 'SP_Meta_Box_Player_Details::save',
|
||||||
'output' => 'SP_Meta_Box_Player_Details::output',
|
'output' => 'SP_Meta_Box_Player_Details::output',
|
||||||
'context' => 'side',
|
'context' => 'side',
|
||||||
'priority' => 'default',
|
'priority' => 'default',
|
||||||
),
|
),
|
||||||
'metrics' => array(
|
'metrics' => array(
|
||||||
'title' => __( 'Metrics', 'sportspress' ),
|
'title' => esc_attr__( 'Metrics', 'sportspress' ),
|
||||||
'save' => 'SP_Meta_Box_Player_Metrics::save',
|
'save' => 'SP_Meta_Box_Player_Metrics::save',
|
||||||
'output' => 'SP_Meta_Box_Player_Metrics::output',
|
'output' => 'SP_Meta_Box_Player_Metrics::output',
|
||||||
'context' => 'side',
|
'context' => 'side',
|
||||||
'priority' => 'default',
|
'priority' => 'default',
|
||||||
),
|
),
|
||||||
'statistics' => array(
|
'statistics' => array(
|
||||||
'title' => __( 'Statistics', 'sportspress' ),
|
'title' => esc_attr__( 'Statistics', 'sportspress' ),
|
||||||
'save' => 'SP_Meta_Box_Player_Statistics::save',
|
'save' => 'SP_Meta_Box_Player_Statistics::save',
|
||||||
'output' => 'SP_Meta_Box_Player_Statistics::output',
|
'output' => 'SP_Meta_Box_Player_Statistics::output',
|
||||||
'context' => 'normal',
|
'context' => 'normal',
|
||||||
@@ -215,13 +215,13 @@ class SP_Admin_Meta_Boxes {
|
|||||||
),
|
),
|
||||||
'sp_staff' => array(
|
'sp_staff' => array(
|
||||||
'shortcode' => array(
|
'shortcode' => array(
|
||||||
'title' => __( 'Shortcode', 'sportspress' ),
|
'title' => esc_attr__( 'Shortcode', 'sportspress' ),
|
||||||
'output' => 'SP_Meta_Box_Staff_Shortcode::output',
|
'output' => 'SP_Meta_Box_Staff_Shortcode::output',
|
||||||
'context' => 'side',
|
'context' => 'side',
|
||||||
'priority' => 'default',
|
'priority' => 'default',
|
||||||
),
|
),
|
||||||
'details' => array(
|
'details' => array(
|
||||||
'title' => __( 'Details', 'sportspress' ),
|
'title' => esc_attr__( 'Details', 'sportspress' ),
|
||||||
'save' => 'SP_Meta_Box_Staff_Details::save',
|
'save' => 'SP_Meta_Box_Staff_Details::save',
|
||||||
'output' => 'SP_Meta_Box_Staff_Details::output',
|
'output' => 'SP_Meta_Box_Staff_Details::output',
|
||||||
'context' => 'side',
|
'context' => 'side',
|
||||||
@@ -292,22 +292,22 @@ class SP_Admin_Meta_Boxes {
|
|||||||
*/
|
*/
|
||||||
public function rename_meta_boxes() {
|
public function rename_meta_boxes() {
|
||||||
remove_meta_box( 'submitdiv', 'sp_event', 'side' );
|
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' );
|
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' );
|
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' );
|
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' );
|
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' );
|
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();
|
$columns = array();
|
||||||
|
|
||||||
if ( 'teams' === $title_format ) {
|
if ( 'teams' === $title_format ) {
|
||||||
$columns['event'] = __( 'Home', 'sportspress' ) . ' | ' . __( 'Away', 'sportspress' );
|
$columns['event'] = esc_attr__( 'Home', 'sportspress' ) . ' | ' . esc_attr__( 'Away', 'sportspress' );
|
||||||
} elseif ( 'homeaway' === $title_format ) {
|
} elseif ( 'homeaway' === $title_format ) {
|
||||||
$columns['event'] = __( 'Teams', 'sportspress' );
|
$columns['event'] = esc_attr__( 'Teams', 'sportspress' );
|
||||||
} else {
|
} else {
|
||||||
$columns['event'] = __( 'Title', 'sportspress' );
|
$columns['event'] = esc_attr__( 'Title', 'sportspress' );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( 'time' === $time_format || 'separate' === $time_format ) {
|
if ( 'time' === $time_format || 'separate' === $time_format ) {
|
||||||
$columns['time'] = __( 'Time', 'sportspress' );
|
$columns['time'] = esc_attr__( 'Time', 'sportspress' );
|
||||||
} elseif ( 'combined' === $time_format ) {
|
} elseif ( 'combined' === $time_format ) {
|
||||||
$columns['time'] = __( 'Time/Results', 'sportspress' );
|
$columns['time'] = esc_attr__( 'Time/Results', 'sportspress' );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( 'results' === $time_format || 'separate' === $time_format ) {
|
if ( 'results' === $time_format || 'separate' === $time_format ) {
|
||||||
$columns['results'] = __( 'Results', 'sportspress' );
|
$columns['results'] = esc_attr__( 'Results', 'sportspress' );
|
||||||
}
|
}
|
||||||
|
|
||||||
$columns['league'] = __( 'League', 'sportspress' );
|
$columns['league'] = esc_attr__( 'League', 'sportspress' );
|
||||||
$columns['season'] = __( 'Season', 'sportspress' );
|
$columns['season'] = esc_attr__( 'Season', 'sportspress' );
|
||||||
$columns['venue'] = __( 'Venue', 'sportspress' );
|
$columns['venue'] = esc_attr__( 'Venue', 'sportspress' );
|
||||||
$columns['article'] = __( 'Article', 'sportspress' );
|
$columns['article'] = esc_attr__( 'Article', 'sportspress' );
|
||||||
$columns['day'] = __( 'Match Day', 'sportspress' );
|
$columns['day'] = esc_attr__( 'Match Day', 'sportspress' );
|
||||||
|
|
||||||
$columns = apply_filters( 'sportspress_calendar_columns', $columns );
|
$columns = apply_filters( 'sportspress_calendar_columns', $columns );
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -52,22 +52,22 @@ class SP_Meta_Box_Calendar_Data {
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="column-date">
|
<th class="column-date">
|
||||||
<?php _e( 'Date', 'sportspress' ); ?>
|
<?php esc_attr_e( 'Date', 'sportspress' ); ?>
|
||||||
</th>
|
</th>
|
||||||
<?php if ( is_array( $usecolumns ) && in_array( 'event', $usecolumns ) ) { ?>
|
<?php if ( is_array( $usecolumns ) && in_array( 'event', $usecolumns ) ) { ?>
|
||||||
<th class="column-event">
|
<th class="column-event">
|
||||||
<label for="sp_columns_event">
|
<label for="sp_columns_event">
|
||||||
<?php
|
<?php
|
||||||
if ( 'teams' == $title_format ) {
|
if ( 'teams' == $title_format ) {
|
||||||
_e( 'Home', 'sportspress' );
|
esc_attr_e( 'Home', 'sportspress' );
|
||||||
?>
|
?>
|
||||||
|
|
|
|
||||||
<?php
|
<?php
|
||||||
_e( 'Away', 'sportspress' );
|
esc_attr_e( 'Away', 'sportspress' );
|
||||||
} elseif ( 'homeaway' == $title_format ) {
|
} elseif ( 'homeaway' == $title_format ) {
|
||||||
_e( 'Teams', 'sportspress' );
|
esc_attr_e( 'Teams', 'sportspress' );
|
||||||
} else {
|
} else {
|
||||||
_e( 'Title', 'sportspress' );
|
esc_attr_e( 'Title', 'sportspress' );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</label>
|
</label>
|
||||||
@@ -78,9 +78,9 @@ class SP_Meta_Box_Calendar_Data {
|
|||||||
<label for="sp_columns_time">
|
<label for="sp_columns_time">
|
||||||
<?php
|
<?php
|
||||||
if ( 'time' == $time_format || 'separate' == $time_format ) {
|
if ( 'time' == $time_format || 'separate' == $time_format ) {
|
||||||
_e( 'Time', 'sportspress' );
|
esc_attr_e( 'Time', 'sportspress' );
|
||||||
} else {
|
} else {
|
||||||
_e( 'Time/Results', 'sportspress' );
|
esc_attr_e( 'Time/Results', 'sportspress' );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</label>
|
</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' ) ) ) { ?>
|
<?php if ( ( is_array( $usecolumns ) && in_array( 'results', $usecolumns ) ) && in_array( $time_format, array( 'separate', 'results' ) ) ) { ?>
|
||||||
<th class="column-results">
|
<th class="column-results">
|
||||||
<label for="sp_columns_results">
|
<label for="sp_columns_results">
|
||||||
<?php _e( 'Results', 'sportspress' ); ?>
|
<?php esc_attr_e( 'Results', 'sportspress' ); ?>
|
||||||
</label>
|
</label>
|
||||||
</th>
|
</th>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ( is_array( $usecolumns ) && in_array( 'league', $usecolumns ) ) { ?>
|
<?php if ( is_array( $usecolumns ) && in_array( 'league', $usecolumns ) ) { ?>
|
||||||
<th class="column-league">
|
<th class="column-league">
|
||||||
<label for="sp_columns_league">
|
<label for="sp_columns_league">
|
||||||
<?php _e( 'League', 'sportspress' ); ?>
|
<?php esc_attr_e( 'League', 'sportspress' ); ?>
|
||||||
</label>
|
</label>
|
||||||
</th>
|
</th>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ( is_array( $usecolumns ) && in_array( 'season', $usecolumns ) ) { ?>
|
<?php if ( is_array( $usecolumns ) && in_array( 'season', $usecolumns ) ) { ?>
|
||||||
<th class="column-season">
|
<th class="column-season">
|
||||||
<label for="sp_columns_season">
|
<label for="sp_columns_season">
|
||||||
<?php _e( 'Season', 'sportspress' ); ?>
|
<?php esc_attr_e( 'Season', 'sportspress' ); ?>
|
||||||
</label>
|
</label>
|
||||||
</th>
|
</th>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ( is_array( $usecolumns ) && in_array( 'venue', $usecolumns ) ) { ?>
|
<?php if ( is_array( $usecolumns ) && in_array( 'venue', $usecolumns ) ) { ?>
|
||||||
<th class="column-venue">
|
<th class="column-venue">
|
||||||
<label for="sp_columns_venue">
|
<label for="sp_columns_venue">
|
||||||
<?php _e( 'Venue', 'sportspress' ); ?>
|
<?php esc_attr_e( 'Venue', 'sportspress' ); ?>
|
||||||
</label>
|
</label>
|
||||||
</th>
|
</th>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ( is_array( $usecolumns ) && in_array( 'article', $usecolumns ) ) { ?>
|
<?php if ( is_array( $usecolumns ) && in_array( 'article', $usecolumns ) ) { ?>
|
||||||
<th class="column-article">
|
<th class="column-article">
|
||||||
<label for="sp_columns_article">
|
<label for="sp_columns_article">
|
||||||
<?php _e( 'Article', 'sportspress' ); ?>
|
<?php esc_attr_e( 'Article', 'sportspress' ); ?>
|
||||||
</label>
|
</label>
|
||||||
</th>
|
</th>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ( is_array( $usecolumns ) && in_array( 'day', $usecolumns ) ) { ?>
|
<?php if ( is_array( $usecolumns ) && in_array( 'day', $usecolumns ) ) { ?>
|
||||||
<th class="column-day">
|
<th class="column-day">
|
||||||
<label for="sp_columns_day">
|
<label for="sp_columns_day">
|
||||||
<?php _e( 'Match Day', 'sportspress' ); ?>
|
<?php esc_attr_e( 'Match Day', 'sportspress' ); ?>
|
||||||
</label>
|
</label>
|
||||||
</th>
|
</th>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@@ -149,7 +149,7 @@ class SP_Meta_Box_Calendar_Data {
|
|||||||
echo ' alternate';}
|
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 ) ) { ?>
|
<?php if ( is_array( $usecolumns ) && in_array( 'event', $usecolumns ) ) { ?>
|
||||||
<td>
|
<td>
|
||||||
<div class="sp-title-format sp-title-format-title
|
<div class="sp-title-format sp-title-format-title
|
||||||
@@ -185,7 +185,7 @@ class SP_Meta_Box_Calendar_Data {
|
|||||||
$main_results[] = $team_result;
|
$main_results[] = $team_result;
|
||||||
unset( $team_results['outcome'] );
|
unset( $team_results['outcome'] );
|
||||||
$team_results = implode( ' | ', $team_results );
|
$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;
|
endif;
|
||||||
|
|
||||||
echo esc_html( $name ) . '<br>';
|
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 ( ( is_array( $usecolumns ) && in_array( 'time', $usecolumns ) ) && in_array( $time_format, array( 'combined', 'separate', 'time' ) ) ) { ?>
|
||||||
<?php if ( 'time' == $time_format || 'separate' == $time_format ) { ?>
|
<?php if ( 'time' == $time_format || 'separate' == $time_format ) { ?>
|
||||||
<td>
|
<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>
|
</td>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
if ( ! empty( $main_results ) ) :
|
if ( ! empty( $main_results ) ) :
|
||||||
echo implode( ' - ', $main_results );
|
echo wp_kses_post( implode( ' - ', $main_results ) );
|
||||||
else :
|
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;
|
endif;
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@@ -218,7 +218,7 @@ class SP_Meta_Box_Calendar_Data {
|
|||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
if ( ! empty( $main_results ) ) :
|
if ( ! empty( $main_results ) ) :
|
||||||
echo implode( ' - ', $main_results );
|
echo wp_kses_post( implode( ' - ', $main_results ) );
|
||||||
else :
|
else :
|
||||||
echo '-';
|
echo '-';
|
||||||
endif;
|
endif;
|
||||||
@@ -236,7 +236,7 @@ class SP_Meta_Box_Calendar_Data {
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ( is_array( $usecolumns ) && in_array( 'article', $usecolumns ) ) { ?>
|
<?php if ( is_array( $usecolumns ) && in_array( 'article', $usecolumns ) ) { ?>
|
||||||
<td>
|
<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 ) : ?>
|
<?php if ( $video ) : ?>
|
||||||
<div class="dashicons dashicons-video-alt"></div>
|
<div class="dashicons dashicons-video-alt"></div>
|
||||||
<?php elseif ( has_post_thumbnail( $event->ID ) ) : ?>
|
<?php elseif ( has_post_thumbnail( $event->ID ) ) : ?>
|
||||||
@@ -244,11 +244,11 @@ class SP_Meta_Box_Calendar_Data {
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php
|
<?php
|
||||||
if ( $event->post_content == null ) :
|
if ( $event->post_content == null ) :
|
||||||
_e( 'None', 'sportspress' );
|
esc_attr_e( 'None', 'sportspress' );
|
||||||
elseif ( $event->post_status == 'publish' ) :
|
elseif ( $event->post_status == 'publish' ) :
|
||||||
_e( 'Recap', 'sportspress' );
|
esc_attr_e( 'Recap', 'sportspress' );
|
||||||
else :
|
else :
|
||||||
_e( 'Preview', 'sportspress' );
|
esc_attr_e( 'Preview', 'sportspress' );
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
</a>
|
</a>
|
||||||
@@ -274,8 +274,8 @@ class SP_Meta_Box_Calendar_Data {
|
|||||||
else :
|
else :
|
||||||
?>
|
?>
|
||||||
<tr class="sp-row alternate">
|
<tr class="sp-row alternate">
|
||||||
<td colspan="<?php echo sizeof( $usecolumns ); ?>">
|
<td colspan="<?php echo esc_attr( sizeof( $usecolumns ) ); ?>">
|
||||||
<?php _e( 'No results found.', 'sportspress' ); ?>
|
<?php esc_attr_e( 'No results found.', 'sportspress' ); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
@@ -283,8 +283,8 @@ class SP_Meta_Box_Calendar_Data {
|
|||||||
else :
|
else :
|
||||||
?>
|
?>
|
||||||
<tr class="sp-row alternate">
|
<tr class="sp-row alternate">
|
||||||
<td colspan="<?php echo sizeof( $usecolumns ); ?>">
|
<td colspan="<?php echo esc_attr( sizeof( $usecolumns ) ); ?>">
|
||||||
<?php printf( __( 'Select %s', 'sportspress' ), __( 'Details', 'sportspress' ) ); ?>
|
<?php printf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Details', 'sportspress' ) ); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@@ -39,10 +39,10 @@ class SP_Meta_Box_Calendar_Details {
|
|||||||
$order = get_post_meta( $post->ID, 'sp_order', true );
|
$order = get_post_meta( $post->ID, 'sp_order', true );
|
||||||
?>
|
?>
|
||||||
<div>
|
<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><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>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
@@ -53,7 +53,7 @@ class SP_Meta_Box_Calendar_Details {
|
|||||||
sp_dropdown_statuses( $args );
|
sp_dropdown_statuses( $args );
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<p><strong><?php _e( 'Event Format', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Event Format', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<select name="sp_event_format" class="postform">
|
<select name="sp_event_format" class="postform">
|
||||||
<option value="all">All</option>
|
<option value="all">All</option>
|
||||||
@@ -63,7 +63,7 @@ class SP_Meta_Box_Calendar_Details {
|
|||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<div class="sp-date-selector">
|
<div class="sp-date-selector">
|
||||||
<p><strong><?php _e( 'Date', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Date', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
@@ -76,33 +76,33 @@ class SP_Meta_Box_Calendar_Details {
|
|||||||
</p>
|
</p>
|
||||||
<div class="sp-date-range">
|
<div class="sp-date-range">
|
||||||
<p class="sp-date-range-absolute">
|
<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>
|
||||||
|
|
||||||
<p class="sp-date-range-relative">
|
<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 ? $date_past : 7; ?>">
|
<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' ); ?>
|
||||||
→
|
→
|
||||||
<?php _e( 'Next', '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 ? $date_future : 7; ?>">
|
<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 _e( 'days', 'sportspress' ); ?>
|
<?php esc_attr_e( 'days', 'sportspress' ); ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="sp-date-relative">
|
<p class="sp-date-relative">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" name="sp_date_relative" value="1" id="sp_date_relative" <?php checked( $date_relative ); ?>>
|
<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>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sp-event-day-field">
|
<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>
|
<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>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
@@ -110,7 +110,7 @@ class SP_Meta_Box_Calendar_Details {
|
|||||||
sp_taxonomy_field( $taxonomy, $post, true );
|
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>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
@@ -121,14 +121,14 @@ class SP_Meta_Box_Calendar_Details {
|
|||||||
'class' => 'widefat',
|
'class' => 'widefat',
|
||||||
'property' => 'multiple',
|
'property' => 'multiple',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
'placeholder' => __( 'All', 'sportspress' ),
|
'placeholder' => esc_attr__( 'All', 'sportspress' ),
|
||||||
);
|
);
|
||||||
if ( ! sp_dropdown_pages( $args ) ) :
|
if ( ! sp_dropdown_pages( $args ) ) :
|
||||||
sp_post_adder( 'sp_team', __( 'Add New', 'sportspress' ) );
|
sp_post_adder( 'sp_team', esc_attr__( 'Add New', 'sportspress' ) );
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<p><strong><?php _e( 'Player', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Player', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
@@ -139,25 +139,25 @@ class SP_Meta_Box_Calendar_Details {
|
|||||||
'class' => 'widefat',
|
'class' => 'widefat',
|
||||||
'property' => 'multiple',
|
'property' => 'multiple',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
'placeholder' => __( 'All', 'sportspress' ),
|
'placeholder' => esc_attr__( 'All', 'sportspress' ),
|
||||||
);
|
);
|
||||||
if ( ! sp_dropdown_pages( $args ) ) :
|
if ( ! sp_dropdown_pages( $args ) ) :
|
||||||
sp_post_adder( 'sp_player', __( 'Add New', 'sportspress' ) );
|
sp_post_adder( 'sp_player', esc_attr__( 'Add New', 'sportspress' ) );
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<p><strong><?php _e( 'Sort by', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Sort by', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<select name="sp_orderby">
|
<select name="sp_orderby">
|
||||||
<option value="date" <?php selected( 'date', $orderby ); ?>><?php _e( 'Date', 'sportspress' ); ?></option>
|
<option value="date" <?php selected( 'date', $orderby ); ?>><?php esc_attr_e( 'Date', 'sportspress' ); ?></option>
|
||||||
<option value="day" <?php selected( 'day', $orderby ); ?>><?php _e( 'Match Day', 'sportspress' ); ?></option>
|
<option value="day" <?php selected( 'day', $orderby ); ?>><?php esc_attr_e( 'Match Day', 'sportspress' ); ?></option>
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p><strong><?php _e( 'Sort Order', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Sort Order', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<select name="sp_order">
|
<select name="sp_order">
|
||||||
<option value="ASC" <?php selected( 'ASC', $order ); ?>><?php _e( 'Ascending', 'sportspress' ); ?></option>
|
<option value="ASC" <?php selected( 'ASC', $order ); ?>><?php esc_attr_e( 'Ascending', 'sportspress' ); ?></option>
|
||||||
<option value="DESC" <?php selected( 'DESC', $order ); ?>><?php _e( 'Descending', 'sportspress' ); ?></option>
|
<option value="DESC" <?php selected( 'DESC', $order ); ?>><?php esc_attr_e( 'Descending', 'sportspress' ); ?></option>
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class SP_Meta_Box_Calendar_Feeds {
|
|||||||
?>
|
?>
|
||||||
<p>
|
<p>
|
||||||
<strong><?php echo esc_html( sp_array_value( $format, 'name' ) ); ?></strong>
|
<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>
|
||||||
<p>
|
<p>
|
||||||
<input type="text" value="<?php echo esc_attr( $feed ); ?>" readonly="readonly" class="code widefat">
|
<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">
|
<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>
|
||||||
<p><input type="text" value="<?php sp_shortcode_template( 'event_' . $the_format, $post->ID ); ?>" readonly="readonly" class="code widefat"></p>
|
<p><input type="text" value="<?php sp_shortcode_template( 'event_' . $the_format, $post->ID ); ?>" readonly="readonly" class="code widefat"></p>
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@@ -36,37 +36,37 @@ class SP_Meta_Box_Column_Details extends SP_Meta_Box_Config {
|
|||||||
$precision = 0;
|
$precision = 0;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<p><strong><?php _e( 'Key', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Key', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<input name="sp_default_key" type="hidden" id="sp_default_key" value="<?php echo esc_attr( $post->post_name ); ?>">
|
<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 ); ?>">
|
<input name="sp_key" type="text" id="sp_key" value="<?php echo esc_attr( $post->post_name ); ?>">
|
||||||
</p>
|
</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">
|
<p class="sp-precision-selector">
|
||||||
<input name="sp_precision" type="text" size="4" id="sp_precision" value="<?php echo esc_attr( $precision ); ?>" placeholder="0">
|
<input name="sp_precision" type="text" size="4" id="sp_precision" value="<?php echo esc_attr( $precision ); ?>" placeholder="0">
|
||||||
</p>
|
</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">
|
<p class="sp-order-selector">
|
||||||
<select name="sp_priority">
|
<select name="sp_priority">
|
||||||
<?php
|
<?php
|
||||||
$options = array( '0' => __( 'Disable', 'sportspress' ) );
|
$options = array( '0' => esc_attr__( 'Disable', 'sportspress' ) );
|
||||||
$count = wp_count_posts( 'sp_column' );
|
$count = wp_count_posts( 'sp_column' );
|
||||||
for ( $i = 1; $i <= $count->publish; $i++ ) :
|
for ( $i = 1; $i <= $count->publish; $i++ ) :
|
||||||
$options[ $i ] = $i;
|
$options[ $i ] = $i;
|
||||||
endfor;
|
endfor;
|
||||||
foreach ( $options as $key => $value ) :
|
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;
|
endforeach;
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
<select name="sp_order">
|
<select name="sp_order">
|
||||||
<?php
|
<?php
|
||||||
$options = array(
|
$options = array(
|
||||||
'DESC' => __( 'Descending', 'sportspress' ),
|
'DESC' => esc_attr__( 'Descending', 'sportspress' ),
|
||||||
'ASC' => __( 'Ascending', 'sportspress' ),
|
'ASC' => esc_attr__( 'Ascending', 'sportspress' ),
|
||||||
);
|
);
|
||||||
foreach ( $options as $key => $value ) :
|
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;
|
endforeach;
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -36,25 +36,25 @@ class SP_Meta_Box_Equation {
|
|||||||
switch ( $group ) :
|
switch ( $group ) :
|
||||||
case 'player_event':
|
case 'player_event':
|
||||||
$options['Events'] = array(
|
$options['Events'] = array(
|
||||||
'$eventsattended' => __( 'Attended', 'sportspress' ),
|
'$eventsattended' => esc_attr__( 'Attended', 'sportspress' ),
|
||||||
'$eventsplayed' => __( 'Played', 'sportspress' ),
|
'$eventsplayed' => esc_attr__( 'Played', 'sportspress' ),
|
||||||
'$eventsstarted' => __( 'Started', 'sportspress' ),
|
'$eventsstarted' => esc_attr__( 'Started', 'sportspress' ),
|
||||||
'$eventssubbed' => __( 'Substituted', 'sportspress' ),
|
'$eventssubbed' => esc_attr__( 'Substituted', 'sportspress' ),
|
||||||
'$eventminutes' => __( 'Minutes', 'sportspress' ),
|
'$eventminutes' => esc_attr__( 'Minutes', 'sportspress' ),
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 'team_event':
|
case 'team_event':
|
||||||
$options['Events'] = array(
|
$options['Events'] = array(
|
||||||
'$eventsplayed' => __( 'Played', 'sportspress' ),
|
'$eventsplayed' => esc_attr__( 'Played', 'sportspress' ),
|
||||||
'$eventminutes' => __( 'Minutes', 'sportspress' ),
|
'$eventminutes' => esc_attr__( 'Minutes', 'sportspress' ),
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 'result':
|
case 'result':
|
||||||
$options['Results'] = self::optgroup(
|
$options['Results'] = self::optgroup(
|
||||||
'sp_result',
|
'sp_result',
|
||||||
array(
|
array(
|
||||||
'for' => '(' . __( 'for', 'sportspress' ) . ')',
|
'for' => '(' . esc_attr__( 'for', 'sportspress' ) . ')',
|
||||||
'against' => '(' . __(
|
'against' => '(' . esc_attr__(
|
||||||
'against',
|
'against',
|
||||||
'sportspress'
|
'sportspress'
|
||||||
) . ')',
|
) . ')',
|
||||||
@@ -68,20 +68,20 @@ class SP_Meta_Box_Equation {
|
|||||||
break;
|
break;
|
||||||
case 'preset':
|
case 'preset':
|
||||||
$options['Presets'] = array(
|
$options['Presets'] = array(
|
||||||
'$gamesback' => __( 'Games Back', 'sportspress' ),
|
'$gamesback' => esc_attr__( 'Games Back', 'sportspress' ),
|
||||||
'$homerecord' => __( 'Home Record', 'sportspress' ),
|
'$homerecord' => esc_attr__( 'Home Record', 'sportspress' ),
|
||||||
'$awayrecord' => __( 'Away Record', 'sportspress' ),
|
'$awayrecord' => esc_attr__( 'Away Record', 'sportspress' ),
|
||||||
'$streak' => __( 'Streak', 'sportspress' ),
|
'$streak' => esc_attr__( 'Streak', 'sportspress' ),
|
||||||
'$form' => __( 'Form', 'sportspress' ),
|
'$form' => esc_attr__( 'Form', 'sportspress' ),
|
||||||
'$last5' => __( 'Last 5', 'sportspress' ),
|
'$last5' => esc_attr__( 'Last 5', 'sportspress' ),
|
||||||
'$last10' => __( 'Last 10', 'sportspress' ),
|
'$last10' => esc_attr__( 'Last 10', 'sportspress' ),
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 'subset':
|
case 'subset':
|
||||||
$options['Subsets'] = array(
|
$options['Subsets'] = array(
|
||||||
'_home' => '@' . __( 'Home', 'sportspress' ),
|
'_home' => '@' . esc_attr__( 'Home', 'sportspress' ),
|
||||||
'_away' => '@' . __( 'Away', 'sportspress' ),
|
'_away' => '@' . esc_attr__( 'Away', 'sportspress' ),
|
||||||
'_venue' => '@' . __( 'Venue', 'sportspress' ),
|
'_venue' => '@' . esc_attr__( 'Venue', 'sportspress' ),
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 'performance':
|
case 'performance':
|
||||||
@@ -127,7 +127,7 @@ class SP_Meta_Box_Equation {
|
|||||||
if ( $i % 2 == 0 ) :
|
if ( $i % 2 == 0 ) :
|
||||||
?>
|
?>
|
||||||
class="alternate"<?php endif; ?>>
|
class="alternate"<?php endif; ?>>
|
||||||
<th><?php _e( $label, 'sportspress' ); ?></th>
|
<th><?php esc_attr_e( $label, 'sportspress' ); ?></th>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
foreach ( $option as $key => $value ) :
|
foreach ( $option as $key => $value ) :
|
||||||
|
|||||||
@@ -27,16 +27,16 @@ class SP_Meta_Box_Event_Details {
|
|||||||
?>
|
?>
|
||||||
<?php do_action( 'sportspress_event_details_meta_box', $post ); ?>
|
<?php do_action( 'sportspress_event_details_meta_box', $post ); ?>
|
||||||
<div class="sp-event-day-field">
|
<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>
|
<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>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="sp-event-minutes-field">
|
<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>
|
<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 ); ?>">
|
<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 _e( 'mins', 'sportspress' ); ?>
|
<?php esc_attr_e( 'mins', 'sportspress' ); ?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
@@ -44,11 +44,11 @@ class SP_Meta_Box_Event_Details {
|
|||||||
if ( 'sp_venue' == $taxonomy ) {
|
if ( 'sp_venue' == $taxonomy ) {
|
||||||
continue;
|
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">
|
<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>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
$terms = get_the_terms( $post->ID, 'sp_venue' );
|
$terms = get_the_terms( $post->ID, 'sp_venue' );
|
||||||
@@ -58,14 +58,14 @@ class SP_Meta_Box_Event_Details {
|
|||||||
'class' => 'sp-has-dummy',
|
'class' => 'sp-has-dummy',
|
||||||
'selected' => sp_get_the_term_id_or_meta( $post->ID, 'sp_venue' ),
|
'selected' => sp_get_the_term_id_or_meta( $post->ID, 'sp_venue' ),
|
||||||
'values' => 'term_id',
|
'values' => 'term_id',
|
||||||
'show_option_none' => __( '— Not set —', 'sportspress' ),
|
'show_option_none' => esc_attr__( '— Not set —', 'sportspress' ),
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
);
|
);
|
||||||
if ( in_array( 'sp_venue', apply_filters( 'sportspress_event_auto_taxonomies', array( 'sp_venue' ) ) ) ) {
|
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 ) ) {
|
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>
|
</p>
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ class SP_Meta_Box_Event_Mode {
|
|||||||
<div id="post-formats-select">
|
<div id="post-formats-select">
|
||||||
<?php
|
<?php
|
||||||
foreach ( array(
|
foreach ( array(
|
||||||
'team' => __( 'Team vs team', 'sportspress' ),
|
'team' => esc_attr__( 'Team vs team', 'sportspress' ),
|
||||||
'player' => __( 'Player vs player', 'sportspress' ),
|
'player' => esc_attr__( 'Player vs player', 'sportspress' ),
|
||||||
) as $key => $mode ) :
|
) 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>
|
<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 . '][]',
|
'name' => 'sp_officials[' . $duty->term_id . '][]',
|
||||||
'selected' => sp_array_value( $officials, $duty->term_id, array() ),
|
'selected' => sp_array_value( $officials, $duty->term_id, array() ),
|
||||||
'values' => 'ID',
|
'values' => 'ID',
|
||||||
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Officials', 'sportspress' ) ),
|
'placeholder' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Officials', 'sportspress' ) ),
|
||||||
'class' => 'widefat',
|
'class' => 'widefat',
|
||||||
'property' => 'multiple',
|
'property' => 'multiple',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( ! sp_dropdown_pages( $args ) ) {
|
if ( ! sp_dropdown_pages( $args ) ) {
|
||||||
sp_post_adder( 'sp_official', __( 'Add New', 'sportspress' ) );
|
sp_post_adder( 'sp_official', esc_attr__( 'Add New', 'sportspress' ) );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
} else {
|
} 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
|
// Determine order of sections
|
||||||
if ( 1 == $sections ) {
|
if ( 1 == $sections ) {
|
||||||
$section_order = array(
|
$section_order = array(
|
||||||
1 => __( 'Defense', 'sportspress' ),
|
1 => esc_attr__( 'Defense', 'sportspress' ),
|
||||||
0 => __( 'Offense', 'sportspress' ),
|
0 => esc_attr__( 'Offense', 'sportspress' ),
|
||||||
);
|
);
|
||||||
} else {
|
} 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 ) {
|
foreach ( $section_order as $section_id => $section_label ) {
|
||||||
@@ -563,11 +563,11 @@ endforeach;
|
|||||||
$times = false;
|
$times = false;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<?php echo self::status_select( $team_id, $player_id, sp_array_value( $player_performance, 'status', null ) ); ?><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 self::sub_select( $team_id, $player_id, sp_array_value( $player_performance, 'sub', null ), $data ); ?><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 ) ) { ?>
|
<?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="-" />
|
<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 } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@@ -576,10 +576,10 @@ endforeach;
|
|||||||
<?php
|
<?php
|
||||||
switch ( $stars_type ) {
|
switch ( $stars_type ) {
|
||||||
case 1:
|
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;
|
break;
|
||||||
default:
|
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>
|
</td>
|
||||||
@@ -600,8 +600,8 @@ endforeach;
|
|||||||
$options = apply_filters(
|
$options = apply_filters(
|
||||||
'sportspress_event_performance_status_options',
|
'sportspress_event_performance_status_options',
|
||||||
array(
|
array(
|
||||||
'lineup' => __( 'Starting Lineup', 'sportspress' ),
|
'lineup' => esc_attr__( 'Starting Lineup', 'sportspress' ),
|
||||||
'sub' => __( 'Substitute', '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 = '<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
|
// Add players as selectable options
|
||||||
foreach ( $data as $id => $performance ) :
|
foreach ( $data as $id => $performance ) :
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ class SP_Meta_Box_Event_Results {
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="column-team">
|
<th class="column-team">
|
||||||
<?php _e( 'Team', 'sportspress' ); ?>
|
<?php esc_attr_e( 'Team', 'sportspress' ); ?>
|
||||||
</th>
|
</th>
|
||||||
<?php foreach ( $columns as $key => $label ) : ?>
|
<?php foreach ( $columns as $key => $label ) : ?>
|
||||||
<th class="column-<?php echo esc_attr( $key ); ?>">
|
<th class="column-<?php echo esc_attr( $key ); ?>">
|
||||||
@@ -275,7 +275,7 @@ class SP_Meta_Box_Event_Results {
|
|||||||
</th>
|
</th>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<th class="column-outcome">
|
<th class="column-outcome">
|
||||||
<?php _e( 'Outcome', 'sportspress' ); ?>
|
<?php esc_attr_e( 'Outcome', 'sportspress' ); ?>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -294,7 +294,7 @@ class SP_Meta_Box_Event_Results {
|
|||||||
?>
|
?>
|
||||||
" data-team="<?php echo esc_attr( $team_id ); ?>">
|
" data-team="<?php echo esc_attr( $team_id ); ?>">
|
||||||
<td>
|
<td>
|
||||||
<?php echo get_the_title( $team_id ); ?>
|
<?php echo esc_attr( get_the_title( $team_id ) ); ?>
|
||||||
</td>
|
</td>
|
||||||
<?php
|
<?php
|
||||||
foreach ( $columns as $column => $label ) :
|
foreach ( $columns as $column => $label ) :
|
||||||
@@ -304,7 +304,7 @@ class SP_Meta_Box_Event_Results {
|
|||||||
<?php
|
<?php
|
||||||
if ( in_array( $column, $auto_columns ) ) {
|
if ( in_array( $column, $auto_columns ) ) {
|
||||||
?>
|
?>
|
||||||
placeholder="<?php _e( '(Auto)', 'sportspress' ); ?>"<?php } ?> /></td>
|
placeholder="<?php esc_attr_e( '(Auto)', 'sportspress' ); ?>"<?php } ?> /></td>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
@@ -323,7 +323,7 @@ class SP_Meta_Box_Event_Results {
|
|||||||
'class' => 'sp-outcome',
|
'class' => 'sp-outcome',
|
||||||
'property' => 'multiple',
|
'property' => 'multiple',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
'placeholder' => __( '(Auto)', 'sportspress' ),
|
'placeholder' => esc_attr__( '(Auto)', 'sportspress' ),
|
||||||
);
|
);
|
||||||
sp_dropdown_pages( $args );
|
sp_dropdown_pages( $args );
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -24,19 +24,19 @@ class SP_Meta_Box_Event_Shortcode {
|
|||||||
$shortcodes = apply_filters(
|
$shortcodes = apply_filters(
|
||||||
'sportspress_event_shortcodes',
|
'sportspress_event_shortcodes',
|
||||||
array(
|
array(
|
||||||
'event_results' => __( 'Results', 'sportspress' ),
|
'event_results' => esc_attr__( 'Results', 'sportspress' ),
|
||||||
'event_details' => __( 'Details', 'sportspress' ),
|
'event_details' => esc_attr__( 'Details', 'sportspress' ),
|
||||||
'event_performance' => __( 'Box Score', 'sportspress' ),
|
'event_performance' => esc_attr__( 'Box Score', 'sportspress' ),
|
||||||
'event_venue' => __( 'Venue', 'sportspress' ),
|
'event_venue' => esc_attr__( 'Venue', 'sportspress' ),
|
||||||
'event_officials' => __( 'Officials', 'sportspress' ),
|
'event_officials' => esc_attr__( 'Officials', 'sportspress' ),
|
||||||
'event_teams' => __( 'Teams', 'sportspress' ),
|
'event_teams' => esc_attr__( 'Teams', 'sportspress' ),
|
||||||
'event_full' => __( 'Full Info', 'sportspress' ),
|
'event_full' => esc_attr__( 'Full Info', 'sportspress' ),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
if ( $shortcodes ) {
|
if ( $shortcodes ) {
|
||||||
?>
|
?>
|
||||||
<p class="howto">
|
<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>
|
||||||
<?php foreach ( $shortcodes as $id => $label ) { ?>
|
<?php foreach ( $shortcodes as $id => $label ) { ?>
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class SP_Meta_Box_Event_Specs {
|
|||||||
<?php
|
<?php
|
||||||
endforeach;
|
endforeach;
|
||||||
else :
|
else :
|
||||||
sp_post_adder( 'sp_spec', __( 'Add New', 'sportspress' ) );
|
sp_post_adder( 'sp_spec', esc_attr__( 'Add New', 'sportspress' ) );
|
||||||
endif;
|
endif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class SP_Meta_Box_Event_Teams {
|
|||||||
'post_type' => $post_type,
|
'post_type' => $post_type,
|
||||||
'name' => 'sp_team[]',
|
'name' => 'sp_team[]',
|
||||||
'class' => 'sportspress-pages',
|
'class' => 'sportspress-pages',
|
||||||
'show_option_none' => __( '— None —', 'sportspress' ),
|
'show_option_none' => esc_attr__( '— None —', 'sportspress' ),
|
||||||
'values' => 'ID',
|
'values' => 'ID',
|
||||||
'selected' => $team,
|
'selected' => $team,
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
@@ -70,30 +70,30 @@ class SP_Meta_Box_Event_Teams {
|
|||||||
$sections = get_option( 'sportspress_event_performance_sections', -1 );
|
$sections = get_option( 'sportspress_event_performance_sections', -1 );
|
||||||
if ( 0 == $sections ) {
|
if ( 0 == $sections ) {
|
||||||
$tabs['sp_offense'] = array(
|
$tabs['sp_offense'] = array(
|
||||||
'label' => __( 'Offense', 'sportspress' ),
|
'label' => esc_attr__( 'Offense', 'sportspress' ),
|
||||||
'post_type' => 'sp_player',
|
'post_type' => 'sp_player',
|
||||||
);
|
);
|
||||||
$tabs['sp_defense'] = array(
|
$tabs['sp_defense'] = array(
|
||||||
'label' => __( 'Defense', 'sportspress' ),
|
'label' => esc_attr__( 'Defense', 'sportspress' ),
|
||||||
'post_type' => 'sp_player',
|
'post_type' => 'sp_player',
|
||||||
);
|
);
|
||||||
} elseif ( 1 == $sections ) {
|
} elseif ( 1 == $sections ) {
|
||||||
$tabs['sp_defense'] = array(
|
$tabs['sp_defense'] = array(
|
||||||
'label' => __( 'Defense', 'sportspress' ),
|
'label' => esc_attr__( 'Defense', 'sportspress' ),
|
||||||
'post_type' => 'sp_player',
|
'post_type' => 'sp_player',
|
||||||
);
|
);
|
||||||
$tabs['sp_offense'] = array(
|
$tabs['sp_offense'] = array(
|
||||||
'label' => __( 'Offense', 'sportspress' ),
|
'label' => esc_attr__( 'Offense', 'sportspress' ),
|
||||||
'post_type' => 'sp_player',
|
'post_type' => 'sp_player',
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$tabs['sp_player'] = array(
|
$tabs['sp_player'] = array(
|
||||||
'label' => __( 'Players', 'sportspress' ),
|
'label' => esc_attr__( 'Players', 'sportspress' ),
|
||||||
'post_type' => 'sp_player',
|
'post_type' => 'sp_player',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$tabs['sp_staff'] = array(
|
$tabs['sp_staff'] = array(
|
||||||
'label' => __( 'Staff', 'sportspress' ),
|
'label' => esc_attr__( 'Staff', 'sportspress' ),
|
||||||
'post_type' => 'sp_staff',
|
'post_type' => 'sp_staff',
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
@@ -126,7 +126,7 @@ class SP_Meta_Box_Event_Teams {
|
|||||||
endfor;
|
endfor;
|
||||||
} else {
|
} 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
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
'post_type' => $post_type,
|
'post_type' => $post_type,
|
||||||
@@ -136,10 +136,10 @@ class SP_Meta_Box_Event_Teams {
|
|||||||
'class' => 'widefat',
|
'class' => 'widefat',
|
||||||
'property' => 'multiple',
|
'property' => 'multiple',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
'placeholder' => __( 'None', 'sportspress' ),
|
'placeholder' => esc_attr__( 'None', 'sportspress' ),
|
||||||
);
|
);
|
||||||
if ( ! sp_dropdown_pages( $args ) ) :
|
if ( ! sp_dropdown_pages( $args ) ) :
|
||||||
sp_post_adder( $post_type, __( 'Add New', 'sportspress' ) );
|
sp_post_adder( $post_type, esc_attr__( 'Add New', 'sportspress' ) );
|
||||||
endif;
|
endif;
|
||||||
}
|
}
|
||||||
wp_nonce_field( 'sp-get-players', 'sp-get-players-nonce', false );
|
wp_nonce_field( 'sp-get-players', 'sp-get-players-nonce', false );
|
||||||
|
|||||||
@@ -25,21 +25,21 @@ class SP_Meta_Box_Event_Video {
|
|||||||
if ( $video ) :
|
if ( $video ) :
|
||||||
?>
|
?>
|
||||||
<fieldset class="sp-video-embed">
|
<fieldset class="sp-video-embed">
|
||||||
<?php echo apply_filters( 'the_content', '[embed width="254"]' . $video . '[/embed]' ); ?>
|
<?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 _e( 'Remove video', 'sportspress' ); ?></a></p>
|
<p><a href="#" class="sp-remove-video"><?php esc_attr_e( 'Remove video', 'sportspress' ); ?></a></p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<fieldset class="sp-video-field hidden">
|
<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><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>
|
||||||
<fieldset class="sp-video-adder
|
<fieldset class="sp-video-adder
|
||||||
<?php
|
<?php
|
||||||
if ( $video ) :
|
if ( $video ) :
|
||||||
?>
|
?>
|
||||||
hidden<?php endif; ?>">
|
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>
|
</fieldset>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,16 +24,16 @@ class SP_Meta_Box_List_Columns {
|
|||||||
$selected = (array) get_post_meta( $post->ID, 'sp_columns', true );
|
$selected = (array) get_post_meta( $post->ID, 'sp_columns', true );
|
||||||
$orderby = get_post_meta( $post->ID, 'sp_orderby', 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">
|
<ul class="categorychecklist form-no-clear">
|
||||||
<li>
|
<li>
|
||||||
<label class="selectit">
|
<label class="selectit">
|
||||||
<input value="number" type="checkbox" name="sp_columns[]" id="sp_columns_number" <?php checked( in_array( 'number', $selected ) ); ?>>
|
<input value="number" type="checkbox" name="sp_columns[]" id="sp_columns_number" <?php checked( in_array( 'number', $selected ) ); ?>>
|
||||||
<?php
|
<?php
|
||||||
if ( in_array( $orderby, array( 'number', 'name' ) ) ) {
|
if ( in_array( $orderby, array( 'number', 'name' ) ) ) {
|
||||||
_e( 'Squad Number', 'sportspress' );
|
esc_attr_e( 'Squad Number', 'sportspress' );
|
||||||
} else {
|
} else {
|
||||||
_e( 'Rank', 'sportspress' );
|
esc_attr_e( 'Rank', 'sportspress' );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@@ -42,23 +42,23 @@ class SP_Meta_Box_List_Columns {
|
|||||||
<li>
|
<li>
|
||||||
<label class="selectit">
|
<label class="selectit">
|
||||||
<input value="team" type="checkbox" name="sp_columns[]" id="sp_columns_team" <?php checked( in_array( 'team', $selected ) ); ?>>
|
<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>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label class="selectit">
|
<label class="selectit">
|
||||||
<input value="position" type="checkbox" name="sp_columns[]" id="sp_columns_position" <?php checked( in_array( 'position', $selected ) ); ?>>
|
<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>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<?php do_action( 'sportspress_list_general_columns', $selected ); ?>
|
<?php do_action( 'sportspress_list_general_columns', $selected ); ?>
|
||||||
</ul>
|
</ul>
|
||||||
<p><strong><?php _e( 'Data', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Data', 'sportspress' ); ?></strong></p>
|
||||||
<div class="sp-instance">
|
<div class="sp-instance">
|
||||||
<ul id="sp_column-tabs" class="sp-tab-bar category-tabs">
|
<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 class="tabs"><a href="#sp_performance-all"><?php esc_attr_e( 'Performance', 'sportspress' ); ?></a></li>
|
||||||
<li><a href="#sp_metric-all"><?php _e( 'Metrics', 'sportspress' ); ?></a></li>
|
<li><a href="#sp_metric-all"><?php esc_attr_e( 'Metrics', 'sportspress' ); ?></a></li>
|
||||||
<li><a href="#sp_statistic-all"><?php _e( 'Statistics', 'sportspress' ); ?></a></li>
|
<li><a href="#sp_statistic-all"><?php esc_attr_e( 'Statistics', 'sportspress' ); ?></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<?php
|
<?php
|
||||||
sp_column_checklist( $post->ID, 'sp_performance', 'block', $selected );
|
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;
|
$show_player_photo = get_option( 'sportspress_list_show_photos', 'no' ) == 'yes' ? true : false;
|
||||||
?>
|
?>
|
||||||
<ul class="subsubsub sp-table-bar">
|
<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-values" class="current"><?php esc_attr_e( 'Values', 'sportspress' ); ?></a></li> |
|
||||||
<li><a href="#sp-table-adjustments" class=""><?php _e( 'Adjustments', 'sportspress' ); ?></a></li>
|
<li><a href="#sp-table-adjustments" class=""><?php esc_attr_e( 'Adjustments', 'sportspress' ); ?></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="sp-data-table-container sp-table-panel sp-table-values" id="sp-table-values">
|
<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">
|
<table class="widefat sp-data-table sp-player-list-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<?php if ( array_key_exists( 'number', $columns ) ) { ?>
|
<?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 } ?>
|
<?php } ?>
|
||||||
<th><?php _e( 'Player', 'sportspress' ); ?></th>
|
<th><?php esc_attr_e( 'Player', 'sportspress' ); ?></th>
|
||||||
<?php if ( array_key_exists( 'team', $columns ) ) { ?>
|
<?php if ( array_key_exists( 'team', $columns ) ) { ?>
|
||||||
<th><?php _e( 'Team', 'sportspress' ); ?></th>
|
<th><?php esc_attr_e( 'Team', 'sportspress' ); ?></th>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ( array_key_exists( 'position', $columns ) ) { ?>
|
<?php if ( array_key_exists( 'position', $columns ) ) { ?>
|
||||||
<th><?php _e( 'Position', 'sportspress' ); ?></th>
|
<th><?php esc_attr_e( 'Position', 'sportspress' ); ?></th>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php foreach ( $columns as $key => $label ) : ?>
|
<?php foreach ( $columns as $key => $label ) : ?>
|
||||||
<?php
|
<?php
|
||||||
@@ -102,9 +102,9 @@ class SP_Meta_Box_List_Data {
|
|||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
if ( 'number' == $orderby ) {
|
if ( 'number' == $orderby ) {
|
||||||
echo ( $number ? esc_html( $number ) : ' ' );
|
echo ( $number ? esc_html( $number ) : ' ' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||||
} else {
|
} else {
|
||||||
echo $i + 1;
|
echo esc_html( $i + 1 );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@@ -116,12 +116,12 @@ class SP_Meta_Box_List_Data {
|
|||||||
?>
|
?>
|
||||||
<span class="sp-default-value">
|
<span class="sp-default-value">
|
||||||
<span class="sp-default-value-input"><?php echo esc_html( $default_name ); ?></span>
|
<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>
|
||||||
<span class="hidden sp-custom-value">
|
<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">
|
<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-secondary sp-cancel"><?php esc_attr_e( 'Cancel', 'sportspress' ); ?></a>
|
||||||
<a class="button button-primary sp-save"><?php _e( 'Save', 'sportspress' ); ?></a>
|
<a class="button button-primary sp-save"><?php esc_attr_e( 'Save', 'sportspress' ); ?></a>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<?php if ( array_key_exists( 'team', $columns ) ) { ?>
|
<?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' );
|
$include = get_post_meta( $player_id, 'sp_team' );
|
||||||
$args = array(
|
$args = array(
|
||||||
'post_type' => 'sp_team',
|
'post_type' => 'sp_team',
|
||||||
'name' => 'sp_players[' . $player_id . '][team]',
|
'name' => 'sp_players[' . esc_attr( $player_id ) . '][team]',
|
||||||
'include' => $include,
|
'include' => $include,
|
||||||
'selected' => $selected,
|
'selected' => $selected,
|
||||||
'values' => 'ID',
|
'values' => 'ID',
|
||||||
);
|
);
|
||||||
wp_dropdown_pages( $args );
|
wp_dropdown_pages( $args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@@ -150,7 +150,7 @@ class SP_Meta_Box_List_Data {
|
|||||||
$args = array(
|
$args = array(
|
||||||
'taxonomy' => 'sp_position',
|
'taxonomy' => 'sp_position',
|
||||||
'name' => 'sp_players[' . $player_id . '][position]',
|
'name' => 'sp_players[' . $player_id . '][position]',
|
||||||
'show_option_blank' => __( '(Auto)', 'sportspress' ),
|
'show_option_blank' => esc_attr__( '(Auto)', 'sportspress' ),
|
||||||
'values' => 'term_id',
|
'values' => 'term_id',
|
||||||
'orderby' => 'meta_value_num',
|
'orderby' => 'meta_value_num',
|
||||||
'meta_query' => array(
|
'meta_query' => array(
|
||||||
@@ -194,7 +194,7 @@ class SP_Meta_Box_List_Data {
|
|||||||
echo esc_attr( $colspan );
|
echo esc_attr( $colspan );
|
||||||
?>
|
?>
|
||||||
">
|
">
|
||||||
<?php printf( __( 'Select %s', 'sportspress' ), __( 'Data', 'sportspress' ) ); ?>
|
<?php printf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Data', 'sportspress' ) ); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
@@ -208,7 +208,7 @@ class SP_Meta_Box_List_Data {
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>#</th>
|
<th>#</th>
|
||||||
<th><?php _e( 'Player', 'sportspress' ); ?></th>
|
<th><?php esc_attr_e( 'Player', 'sportspress' ); ?></th>
|
||||||
<?php
|
<?php
|
||||||
foreach ( $columns as $key => $label ) :
|
foreach ( $columns as $key => $label ) :
|
||||||
if ( in_array( $key, array( 'number', 'team', 'position' ) ) ) {
|
if ( in_array( $key, array( 'number', 'team', 'position' ) ) ) {
|
||||||
@@ -235,9 +235,9 @@ class SP_Meta_Box_List_Data {
|
|||||||
echo ' alternate';}
|
echo ' alternate';}
|
||||||
?>
|
?>
|
||||||
">
|
">
|
||||||
<td><?php echo ( $number ? $number : ' ' ); ?></td>
|
<td><?php echo ( $number ? esc_html( $number ) : ' ' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></td>
|
||||||
<td>
|
<td>
|
||||||
<?php echo get_the_title( $player_id ); ?>
|
<?php echo esc_html( get_the_title( $player_id ) ); ?>
|
||||||
</td>
|
</td>
|
||||||
<?php
|
<?php
|
||||||
foreach ( $columns as $column => $label ) :
|
foreach ( $columns as $column => $label ) :
|
||||||
@@ -261,7 +261,7 @@ class SP_Meta_Box_List_Data {
|
|||||||
echo esc_attr( $colspan );
|
echo esc_attr( $colspan );
|
||||||
?>
|
?>
|
||||||
">
|
">
|
||||||
<?php printf( __( 'Select %s', 'sportspress' ), __( 'Details', 'sportspress' ) ); ?>
|
<?php printf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Details', 'sportspress' ) ); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@@ -41,11 +41,11 @@ class SP_Meta_Box_List_Details {
|
|||||||
$default_nationality = get_option( 'sportspress_default_nationality', false );
|
$default_nationality = get_option( 'sportspress_default_nationality', false );
|
||||||
?>
|
?>
|
||||||
<div>
|
<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><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">
|
<div class="sp-date-selector">
|
||||||
<p><strong><?php _e( 'Date', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Date', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
@@ -58,21 +58,21 @@ class SP_Meta_Box_List_Details {
|
|||||||
</p>
|
</p>
|
||||||
<div class="sp-date-range">
|
<div class="sp-date-range">
|
||||||
<p class="sp-date-range-absolute">
|
<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>
|
||||||
|
|
||||||
<p class="sp-date-range-relative">
|
<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 ? $date_past : 7; ?>">
|
<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>
|
||||||
|
|
||||||
<p class="sp-date-relative">
|
<p class="sp-date-relative">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" name="sp_date_relative" value="1" id="sp_date_relative" <?php checked( $date_relative ); ?>>
|
<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>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -83,29 +83,29 @@ class SP_Meta_Box_List_Details {
|
|||||||
sp_taxonomy_field( $taxonomy, $post, true );
|
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">
|
<p class="sp-tab-select sp-team-era-selector">
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
'post_type' => 'sp_team',
|
'post_type' => 'sp_team',
|
||||||
'name' => 'sp_team',
|
'name' => 'sp_team',
|
||||||
'show_option_all' => __( 'All', 'sportspress' ),
|
'show_option_all' => esc_attr__( 'All', 'sportspress' ),
|
||||||
'selected' => $team_id,
|
'selected' => $team_id,
|
||||||
'values' => 'ID',
|
'values' => 'ID',
|
||||||
);
|
);
|
||||||
if ( ! sp_dropdown_pages( $args ) ) :
|
if ( ! sp_dropdown_pages( $args ) ) :
|
||||||
sp_post_adder( 'sp_team', __( 'Add New', 'sportspress' ) );
|
sp_post_adder( 'sp_team', esc_attr__( 'Add New', 'sportspress' ) );
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
<select name="sp_era">
|
<select name="sp_era">
|
||||||
<option value="all" <?php selected( 'all', $era ); ?>><?php _e( 'All', 'sportspress' ); ?></option>
|
<option value="all" <?php selected( 'all', $era ); ?>><?php esc_attr_e( 'All', 'sportspress' ); ?></option>
|
||||||
<option value="current" <?php selected( 'current', $era ); ?>><?php _e( 'Current', 'sportspress' ); ?></option>
|
<option value="current" <?php selected( 'current', $era ); ?>><?php esc_attr_e( 'Current', 'sportspress' ); ?></option>
|
||||||
<option value="past" <?php selected( 'past', $era ); ?>><?php _e( 'Past', 'sportspress' ); ?></option>
|
<option value="past" <?php selected( 'past', $era ); ?>><?php esc_attr_e( 'Past', 'sportspress' ); ?></option>
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p><strong><?php _e( 'Nationality', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Nationality', 'sportspress' ); ?></strong></p>
|
||||||
<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
|
<?php
|
||||||
if ( is_rtl() ) :
|
if ( is_rtl() ) :
|
||||||
?>
|
?>
|
||||||
@@ -120,20 +120,20 @@ class SP_Meta_Box_List_Details {
|
|||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p><strong><?php _e( 'Grouping', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Grouping', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<select name="sp_grouping">
|
<select name="sp_grouping">
|
||||||
<option value="0"><?php _e( 'None', 'sportspress' ); ?></option>
|
<option value="0"><?php esc_attr_e( 'None', 'sportspress' ); ?></option>
|
||||||
<option value="position" <?php selected( $grouping, 'position' ); ?>><?php _e( 'Position', 'sportspress' ); ?></option>
|
<option value="position" <?php selected( $grouping, 'position' ); ?>><?php esc_attr_e( 'Position', 'sportspress' ); ?></option>
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p><strong><?php _e( 'Sort by', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Sort by', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
'prepend_options' => array(
|
'prepend_options' => array(
|
||||||
'number' => __( 'Squad Number', 'sportspress' ),
|
'number' => esc_attr__( 'Squad Number', 'sportspress' ),
|
||||||
'name' => __( 'Name', 'sportspress' ),
|
'name' => esc_attr__( 'Name', 'sportspress' ),
|
||||||
),
|
),
|
||||||
'post_type' => array( 'sp_performance', 'sp_metric', 'sp_statistic' ),
|
'post_type' => array( 'sp_performance', 'sp_metric', 'sp_statistic' ),
|
||||||
'name' => 'sp_orderby',
|
'name' => 'sp_orderby',
|
||||||
@@ -146,21 +146,21 @@ class SP_Meta_Box_List_Details {
|
|||||||
<p>
|
<p>
|
||||||
<label class="selectit">
|
<label class="selectit">
|
||||||
<input type="checkbox" name="sp_crop" value="1" <?php checked( $crop ); ?>>
|
<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>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
<p><strong><?php _e( 'Sort Order', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Sort Order', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<select name="sp_order">
|
<select name="sp_order">
|
||||||
<option value="ASC" <?php selected( 'ASC', $order ); ?>><?php _e( 'Ascending', 'sportspress' ); ?></option>
|
<option value="ASC" <?php selected( 'ASC', $order ); ?>><?php esc_attr_e( 'Ascending', 'sportspress' ); ?></option>
|
||||||
<option value="DESC" <?php selected( 'DESC', $order ); ?>><?php _e( 'Descending', 'sportspress' ); ?></option>
|
<option value="DESC" <?php selected( 'DESC', $order ); ?>><?php esc_attr_e( 'Descending', 'sportspress' ); ?></option>
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p><strong><?php _e( 'Players', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Players', 'sportspress' ); ?></strong></p>
|
||||||
<p class="sp-select-setting">
|
<p class="sp-select-setting">
|
||||||
<select name="sp_select">
|
<select name="sp_select">
|
||||||
<option value="auto" <?php selected( 'auto', $select ); ?>><?php _e( 'Auto', 'sportspress' ); ?></option>
|
<option value="auto" <?php selected( 'auto', $select ); ?>><?php esc_attr_e( 'Auto', 'sportspress' ); ?></option>
|
||||||
<option value="manual" <?php selected( 'manual', $select ); ?>><?php _e( 'Manual', 'sportspress' ); ?></option>
|
<option value="manual" <?php selected( 'manual', $select ); ?>><?php esc_attr_e( 'Manual', 'sportspress' ); ?></option>
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<?php
|
<?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_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 {
|
} else {
|
||||||
?>
|
?>
|
||||||
<p><strong><?php _e( 'Display', 'sportspress' ); ?></strong></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 _e( 'All', 'sportspress' ); ?>" value="<?php echo esc_attr( $number ); ?>"> <?php _e( 'players', 'sportspress' ); ?></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
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class SP_Meta_Box_List_Shortcode {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<p class="howto">
|
<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>
|
||||||
<p><input type="text" value="<?php sp_shortcode_template( 'player_' . $the_format, $post->ID ); ?>" readonly="readonly" class="code widefat"></p>
|
<p><input type="text" value="<?php sp_shortcode_template( 'player_' . $the_format, $post->ID ); ?>" readonly="readonly" class="code widefat"></p>
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@@ -31,26 +31,26 @@ class SP_Meta_Box_Metric_Details extends SP_Meta_Box_Config {
|
|||||||
$visible = 1;
|
$visible = 1;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<p><strong><?php _e( 'Variable', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Variable', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<input name="sp_default_key" type="hidden" id="sp_default_key" value="<?php echo esc_attr( $post->post_name ); ?>">
|
<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 ); ?>">
|
<input name="sp_key" type="text" id="sp_key" value="<?php echo esc_attr( $post->post_name ); ?>">
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<strong><?php _e( 'Visible', 'sportspress' ); ?></strong>
|
<strong><?php esc_attr_e( 'Visible', 'sportspress' ); ?></strong>
|
||||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php _e( 'Display in player profile?', 'sportspress' ); ?>"></i>
|
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php esc_attr_e( 'Display in player profile?', 'sportspress' ); ?>"></i>
|
||||||
</p>
|
</p>
|
||||||
<ul class="sp-visible-selector">
|
<ul class="sp-visible-selector">
|
||||||
<li>
|
<li>
|
||||||
<label class="selectit">
|
<label class="selectit">
|
||||||
<input name="sp_visible" id="sp_visible_yes" type="radio" value="1" <?php checked( $visible ); ?>>
|
<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>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label class="selectit">
|
<label class="selectit">
|
||||||
<input name="sp_visible" id="sp_visible_no" type="radio" value="0" <?php checked( ! $visible ); ?>>
|
<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>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</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 );
|
$condition = get_post_meta( $post->ID, 'sp_condition', true );
|
||||||
$main_result = get_option( 'sportspress_primary_result', null );
|
$main_result = get_option( 'sportspress_primary_result', null );
|
||||||
$result = get_page_by_path( $main_result, ARRAY_A, 'sp_result' );
|
$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 ) {
|
if ( '' === $color ) {
|
||||||
$color = '#888888';
|
$color = '#888888';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<p><strong><?php _e( 'Variable', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Variable', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<input name="sp_default_key" type="hidden" id="sp_default_key" value="<?php echo esc_attr( $post->post_name ); ?>">
|
<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 ); ?>"
|
<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 } ?>>
|
readonly="readonly"<?php } ?>>
|
||||||
</p>
|
</p>
|
||||||
<p><strong><?php _e( 'Abbreviation', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Abbreviation', 'sportspress' ); ?></strong></p>
|
||||||
<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 ) ); ?>">
|
<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>
|
||||||
<p><strong><?php _e( 'Color', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Color', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<div class="sp-color-box">
|
<div class="sp-color-box">
|
||||||
<input name="sp_color" id="sp_color" type="text" value="<?php echo esc_attr( $color ); ?>" class="colorpick">
|
<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 id="sp_color" class="colorpickdiv"></div>
|
||||||
</div>
|
</div>
|
||||||
</p>
|
</p>
|
||||||
<p><strong><?php _e( 'Condition', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Condition', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<select name="sp_condition">
|
<select name="sp_condition">
|
||||||
<?php
|
<?php
|
||||||
$options = array(
|
$options = array(
|
||||||
'0' => '—',
|
'0' => '—',
|
||||||
'>' => sprintf( __( 'Most %s', 'sportspress' ), $label ),
|
'>' => sprintf( esc_attr__( 'Most %s', 'sportspress' ), $label ),
|
||||||
'<' => sprintf( __( 'Least %s', 'sportspress' ), $label ),
|
'<' => sprintf( esc_attr__( 'Least %s', 'sportspress' ), $label ),
|
||||||
'=' => sprintf( __( 'Equal %s', 'sportspress' ), $label ),
|
'=' => sprintf( esc_attr__( 'Equal %s', 'sportspress' ), $label ),
|
||||||
'else' => sprintf( __( 'Default', 'sportspress' ), $label ),
|
'else' => sprintf( esc_attr__( 'Default', 'sportspress' ), $label ),
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach ( $options as $key => $value ) :
|
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;
|
endforeach;
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ class SP_Meta_Box_Performance_Details extends SP_Meta_Box_Config {
|
|||||||
$sendoff = false;
|
$sendoff = false;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<p><strong><?php _e( 'Variable', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Variable', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<input name="sp_default_key" type="hidden" id="sp_default_key" value="<?php echo esc_attr( $post->post_name ); ?>">
|
<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 ); ?>"
|
<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 } ?>>
|
readonly="readonly"<?php } ?>>
|
||||||
</p>
|
</p>
|
||||||
<p><strong><?php _e( 'Singular', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Singular', 'sportspress' ); ?></strong></p>
|
||||||
<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 ); ?>">
|
<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>
|
||||||
<p><strong><?php _e( 'Category', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Category', 'sportspress' ); ?></strong></p>
|
||||||
<p class="sp-section-selector">
|
<p class="sp-section-selector">
|
||||||
<select name="sp_section">
|
<select name="sp_section">
|
||||||
<?php
|
<?php
|
||||||
$options = apply_filters(
|
$options = apply_filters(
|
||||||
'sportspress_performance_sections',
|
'sportspress_performance_sections',
|
||||||
array(
|
array(
|
||||||
-1 => __( 'All', 'sportspress' ),
|
-1 => esc_attr__( 'All', 'sportspress' ),
|
||||||
0 => __( 'Offense', 'sportspress' ),
|
0 => esc_attr__( 'Offense', 'sportspress' ),
|
||||||
1 => __(
|
1 => esc_attr__(
|
||||||
'Defense',
|
'Defense',
|
||||||
'sportspress'
|
'sportspress'
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
foreach ( $options as $key => $value ) :
|
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;
|
endforeach;
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p><strong><?php _e( 'Format', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Format', 'sportspress' ); ?></strong></p>
|
||||||
<p class="sp-format-selector">
|
<p class="sp-format-selector">
|
||||||
<select name="sp_format">
|
<select name="sp_format">
|
||||||
<?php
|
<?php
|
||||||
$options = apply_filters(
|
$options = apply_filters(
|
||||||
'sportspress_performance_formats',
|
'sportspress_performance_formats',
|
||||||
array(
|
array(
|
||||||
'number' => __( 'Number', 'sportspress' ),
|
'number' => esc_attr__( 'Number', 'sportspress' ),
|
||||||
'time' => __( 'Time', 'sportspress' ),
|
'time' => esc_attr__( 'Time', 'sportspress' ),
|
||||||
'text' => __( 'Text', 'sportspress' ),
|
'text' => esc_attr__( 'Text', 'sportspress' ),
|
||||||
'equation' => __( 'Equation', 'sportspress' ),
|
'equation' => esc_attr__( 'Equation', 'sportspress' ),
|
||||||
'checkbox' => __(
|
'checkbox' => esc_attr__(
|
||||||
'Checkbox',
|
'Checkbox',
|
||||||
'sportspress'
|
'sportspress'
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
foreach ( $options as $key => $value ) :
|
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;
|
endforeach;
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<div id="sp_precisiondiv">
|
<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>
|
<p>
|
||||||
<input name="sp_precision" type="text" size="4" id="sp_precision" value="<?php echo esc_attr( $precision ); ?>" placeholder="0">
|
<input name="sp_precision" type="text" size="4" id="sp_precision" value="<?php echo esc_attr( $precision ); ?>" placeholder="0">
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="sp_timeddiv">
|
<div id="sp_timeddiv">
|
||||||
<p>
|
<p>
|
||||||
<strong><?php _e( 'Timed', 'sportspress' ); ?></strong>
|
<strong><?php esc_attr_e( 'Timed', 'sportspress' ); ?></strong>
|
||||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php _e( 'Record minutes?', 'sportspress' ); ?>"></i>
|
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php esc_attr_e( 'Record minutes?', 'sportspress' ); ?>"></i>
|
||||||
</p>
|
</p>
|
||||||
<ul class="sp-timed-selector">
|
<ul class="sp-timed-selector">
|
||||||
<li>
|
<li>
|
||||||
<label class="selectit">
|
<label class="selectit">
|
||||||
<input name="sp_timed" id="sp_timed_yes" type="radio" value="1" <?php checked( $timed ); ?>>
|
<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>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label class="selectit">
|
<label class="selectit">
|
||||||
<input name="sp_timed" id="sp_timed_no" type="radio" value="0" <?php checked( ! $timed ); ?>>
|
<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>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div id="sp_sendoffdiv">
|
<div id="sp_sendoffdiv">
|
||||||
<p>
|
<p>
|
||||||
<strong><?php _e( 'Send Off', 'sportspress' ); ?></strong>
|
<strong><?php esc_attr_e( 'Send Off', 'sportspress' ); ?></strong>
|
||||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php _e( "Don't count minutes after?", 'sportspress' ); ?>"></i>
|
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php esc_attr_e( "Don't count minutes after?", 'sportspress' ); ?>"></i>
|
||||||
</p>
|
</p>
|
||||||
<ul class="sp-sendoff-selector">
|
<ul class="sp-sendoff-selector">
|
||||||
<li>
|
<li>
|
||||||
<label class="selectit">
|
<label class="selectit">
|
||||||
<input name="sp_sendoff" id="sp_sendoff_yes" type="radio" value="1" <?php checked( $sendoff ); ?>>
|
<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>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label class="selectit">
|
<label class="selectit">
|
||||||
<input name="sp_sendoff" id="sp_sendoff_no" type="radio" value="0" <?php checked( ! $sendoff ); ?>>
|
<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>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -167,20 +167,20 @@ class SP_Meta_Box_Performance_Details extends SP_Meta_Box_Config {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<p>
|
<p>
|
||||||
<strong><?php _e( 'Visible', 'sportspress' ); ?></strong>
|
<strong><?php esc_attr_e( 'Visible', 'sportspress' ); ?></strong>
|
||||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php _e( 'Display in player profile?', 'sportspress' ); ?>"></i>
|
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php esc_attr_e( 'Display in player profile?', 'sportspress' ); ?>"></i>
|
||||||
</p>
|
</p>
|
||||||
<ul class="sp-visible-selector">
|
<ul class="sp-visible-selector">
|
||||||
<li>
|
<li>
|
||||||
<label class="selectit">
|
<label class="selectit">
|
||||||
<input name="sp_visible" id="sp_visible_yes" type="radio" value="1" <?php checked( $visible ); ?>>
|
<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>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label class="selectit">
|
<label class="selectit">
|
||||||
<input name="sp_visible" id="sp_visible_no" type="radio" value="0" <?php checked( ! $visible ); ?>>
|
<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>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -83,11 +83,11 @@ class SP_Meta_Box_Player_Details {
|
|||||||
$current_teams = array_filter( get_post_meta( $post->ID, 'sp_current_team', false ) );
|
$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><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><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
|
<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
|
<?php
|
||||||
if ( is_rtl() ) :
|
if ( is_rtl() ) :
|
||||||
?>
|
?>
|
||||||
@@ -103,7 +103,7 @@ class SP_Meta_Box_Player_Details {
|
|||||||
</select></p>
|
</select></p>
|
||||||
|
|
||||||
<?php if ( taxonomy_exists( 'sp_position' ) ) { ?>
|
<?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>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
@@ -111,7 +111,7 @@ class SP_Meta_Box_Player_Details {
|
|||||||
'name' => 'tax_input[sp_position][]',
|
'name' => 'tax_input[sp_position][]',
|
||||||
'selected' => $position_ids,
|
'selected' => $position_ids,
|
||||||
'values' => 'term_id',
|
'values' => 'term_id',
|
||||||
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Positions', 'sportspress' ) ),
|
'placeholder' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Positions', 'sportspress' ) ),
|
||||||
'class' => 'widefat',
|
'class' => 'widefat',
|
||||||
'property' => 'multiple',
|
'property' => 'multiple',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
@@ -121,7 +121,7 @@ class SP_Meta_Box_Player_Details {
|
|||||||
</p>
|
</p>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<p><strong><?php _e( 'Current Teams', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Current Teams', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
@@ -129,7 +129,7 @@ class SP_Meta_Box_Player_Details {
|
|||||||
'name' => 'sp_current_team[]',
|
'name' => 'sp_current_team[]',
|
||||||
'selected' => $current_teams,
|
'selected' => $current_teams,
|
||||||
'values' => 'ID',
|
'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',
|
'class' => 'sp-current-teams widefat',
|
||||||
'property' => 'multiple',
|
'property' => 'multiple',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
@@ -138,7 +138,7 @@ class SP_Meta_Box_Player_Details {
|
|||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p><strong><?php _e( 'Past Teams', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Past Teams', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
@@ -146,7 +146,7 @@ class SP_Meta_Box_Player_Details {
|
|||||||
'name' => 'sp_past_team[]',
|
'name' => 'sp_past_team[]',
|
||||||
'selected' => $past_teams,
|
'selected' => $past_teams,
|
||||||
'values' => 'ID',
|
'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',
|
'class' => 'sp-past-teams widefat',
|
||||||
'property' => 'multiple',
|
'property' => 'multiple',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
@@ -156,7 +156,7 @@ class SP_Meta_Box_Player_Details {
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<?php if ( taxonomy_exists( 'sp_league' ) ) { ?>
|
<?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>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
@@ -164,7 +164,7 @@ class SP_Meta_Box_Player_Details {
|
|||||||
'name' => 'tax_input[sp_league][]',
|
'name' => 'tax_input[sp_league][]',
|
||||||
'selected' => $league_ids,
|
'selected' => $league_ids,
|
||||||
'values' => 'term_id',
|
'values' => 'term_id',
|
||||||
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Leagues', 'sportspress' ) ),
|
'placeholder' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Leagues', 'sportspress' ) ),
|
||||||
'class' => 'widefat',
|
'class' => 'widefat',
|
||||||
'property' => 'multiple',
|
'property' => 'multiple',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
@@ -175,7 +175,7 @@ class SP_Meta_Box_Player_Details {
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ( taxonomy_exists( 'sp_season' ) ) { ?>
|
<?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>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
@@ -183,7 +183,7 @@ class SP_Meta_Box_Player_Details {
|
|||||||
'name' => 'tax_input[sp_season][]',
|
'name' => 'tax_input[sp_season][]',
|
||||||
'selected' => $season_ids,
|
'selected' => $season_ids,
|
||||||
'values' => 'term_id',
|
'values' => 'term_id',
|
||||||
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Seasons', 'sportspress' ) ),
|
'placeholder' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Seasons', 'sportspress' ) ),
|
||||||
'class' => 'widefat',
|
'class' => 'widefat',
|
||||||
'property' => 'multiple',
|
'property' => 'multiple',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class SP_Meta_Box_Player_Metrics {
|
|||||||
<?php
|
<?php
|
||||||
endforeach;
|
endforeach;
|
||||||
else :
|
else :
|
||||||
sp_post_adder( 'sp_metric', __( 'Add New', 'sportspress' ) );
|
sp_post_adder( 'sp_metric', esc_attr__( 'Add New', 'sportspress' ) );
|
||||||
endif;
|
endif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,14 +23,14 @@ class SP_Meta_Box_Player_Shortcode {
|
|||||||
public static function output( $post ) {
|
public static function output( $post ) {
|
||||||
?>
|
?>
|
||||||
<p class="howto">
|
<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>
|
||||||
<p>
|
<p>
|
||||||
<strong><?php _e( 'Details', 'sportspress' ); ?></strong>
|
<strong><?php esc_attr_e( 'Details', 'sportspress' ); ?></strong>
|
||||||
</p>
|
</p>
|
||||||
<p><input type="text" value="<?php sp_shortcode_template( 'player_details', $post->ID ); ?>" readonly="readonly" class="code widefat"></p>
|
<p><input type="text" value="<?php sp_shortcode_template( 'player_details', $post->ID ); ?>" readonly="readonly" class="code widefat"></p>
|
||||||
<p>
|
<p>
|
||||||
<strong><?php _e( 'Statistics', 'sportspress' ); ?></strong>
|
<strong><?php esc_attr_e( 'Statistics', 'sportspress' ); ?></strong>
|
||||||
</p>
|
</p>
|
||||||
<p><input type="text" value="<?php sp_shortcode_template( 'player_statistics', $post->ID ); ?>" readonly="readonly" class="code widefat"></p>
|
<p><input type="text" value="<?php sp_shortcode_template( 'player_statistics', $post->ID ); ?>" readonly="readonly" class="code widefat"></p>
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class SP_Meta_Box_Player_Statistics {
|
|||||||
endforeach;
|
endforeach;
|
||||||
if ( $show_career_totals ) {
|
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
|
<?php
|
||||||
list( $columns, $data, $placeholders, $merged, $seasons_teams, $has_checkboxes, $formats, $total_types ) = $player->data( 0, true );
|
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 );
|
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
|
// Determine order of sections
|
||||||
if ( 1 == $sections ) {
|
if ( 1 == $sections ) {
|
||||||
$section_order = array(
|
$section_order = array(
|
||||||
1 => __( 'Defense', 'sportspress' ),
|
1 => esc_attr__( 'Defense', 'sportspress' ),
|
||||||
0 => __( 'Offense', 'sportspress' ),
|
0 => esc_attr__( 'Offense', 'sportspress' ),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$section_order = array( __( 'Offense', 'sportspress' ), __( 'Defense', 'sportspress' ) );
|
$section_order = array( esc_attr__( 'Offense', 'sportspress' ), esc_attr__( 'Defense', 'sportspress' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
$s = 0;
|
$s = 0;
|
||||||
@@ -75,7 +75,7 @@ class SP_Meta_Box_Player_Statistics {
|
|||||||
endforeach;
|
endforeach;
|
||||||
if ( $show_career_totals ) {
|
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
|
<?php
|
||||||
list( $columns, $data, $placeholders, $merged, $seasons_teams, $has_checkboxes, $formats, $total_types ) = $player->data( 0, true, $section_id );
|
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 );
|
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">
|
<table class="widefat sp-data-table sp-player-statistics-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<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 ) ) : ?>
|
<?php if ( $team_select && apply_filters( 'sportspress_player_team_statistics', $league_id ) ) : ?>
|
||||||
<th>
|
<th>
|
||||||
<?php _e( 'Team', 'sportspress' ); ?>
|
<?php esc_attr_e( 'Team', 'sportspress' ); ?>
|
||||||
</th>
|
</th>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php
|
<?php
|
||||||
@@ -133,7 +133,7 @@ class SP_Meta_Box_Player_Statistics {
|
|||||||
<?php $div_stats = sp_array_value( $data, 0, array() ); ?>
|
<?php $div_stats = sp_array_value( $data, 0, array() ); ?>
|
||||||
<tr class="sp-row sp-total">
|
<tr class="sp-row sp-total">
|
||||||
<td>
|
<td>
|
||||||
<label><strong><?php _e( 'Total', 'sportspress' ); ?></strong></label>
|
<label><strong><?php esc_attr_e( 'Total', 'sportspress' ); ?></strong></label>
|
||||||
</td>
|
</td>
|
||||||
<?php if ( $team_select && apply_filters( 'sportspress_player_team_statistics', $league_id ) ) { ?>
|
<?php if ( $team_select && apply_filters( 'sportspress_player_team_statistics', $league_id ) ) { ?>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
@@ -158,10 +158,10 @@ class SP_Meta_Box_Player_Statistics {
|
|||||||
echo $value ? esc_html( $value ) : esc_html( $placeholder );
|
echo $value ? esc_html( $value ) : esc_html( $placeholder );
|
||||||
} else {
|
} else {
|
||||||
if ( 'time' === sp_array_value( $formats, $column, 'number' ) ) {
|
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-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[' . $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-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 {
|
} 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 ) {
|
if ( $i % 2 == 0 ) {
|
||||||
echo ' alternate';}
|
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>
|
<td>
|
||||||
<label>
|
<label>
|
||||||
<?php if ( ! apply_filters( 'sportspress_player_team_statistics', $league_id ) ) : ?>
|
<?php if ( ! apply_filters( 'sportspress_player_team_statistics', $league_id ) ) : ?>
|
||||||
@@ -197,9 +197,9 @@ class SP_Meta_Box_Player_Statistics {
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php
|
<?php
|
||||||
if ( 0 === $div_id ) {
|
if ( 0 === $div_id ) {
|
||||||
_e( 'Total', 'sportspress' );
|
esc_attr_e( 'Total', 'sportspress' );
|
||||||
} elseif ( 'WP_Error' != get_class( $div ) ) {
|
} 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>
|
</label>
|
||||||
@@ -214,7 +214,7 @@ class SP_Meta_Box_Player_Statistics {
|
|||||||
$args = array(
|
$args = array(
|
||||||
'post_type' => 'sp_team',
|
'post_type' => 'sp_team',
|
||||||
'name' => 'sp_leagues[' . $league_id . '][' . $div_id . ']',
|
'name' => 'sp_leagues[' . $league_id . '][' . $div_id . ']',
|
||||||
'show_option_none' => __( '— None —', 'sportspress' ),
|
'show_option_none' => esc_attr__( '— None —', 'sportspress' ),
|
||||||
'sort_order' => 'ASC',
|
'sort_order' => 'ASC',
|
||||||
'sort_column' => 'menu_order',
|
'sort_column' => 'menu_order',
|
||||||
'selected' => $value,
|
'selected' => $value,
|
||||||
@@ -235,7 +235,7 @@ class SP_Meta_Box_Player_Statistics {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
if ( ! sp_dropdown_pages( $args ) ) :
|
if ( ! sp_dropdown_pages( $args ) ) :
|
||||||
_e( '— None —', 'sportspress' );
|
esc_attr_e( '— None —', 'sportspress' );
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@@ -275,10 +275,10 @@ class SP_Meta_Box_Player_Statistics {
|
|||||||
echo $timeval ? esc_html( $timeval ) : esc_html( $placeholder );
|
echo $timeval ? esc_html( $timeval ) : esc_html( $placeholder );
|
||||||
} else {
|
} else {
|
||||||
if ( 'time' === sp_array_value( $formats, $column, 'number' ) ) {
|
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-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[' . $league_id . '][' . $div_id . '][' . $column . ']" value="' . esc_attr( $value ) . '" />';
|
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 {
|
} 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;
|
$readonly = false;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<p><strong><?php _e( 'Variable', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Variable', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<input name="sp_default_key" type="hidden" id="sp_default_key" value="<?php echo esc_attr( $post->post_name ); ?>">
|
<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 ); ?>"
|
<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>
|
readonly="readonly"<?php } ?>> <span class="description">(for, against)</span>
|
||||||
</p>
|
</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">
|
<p class="sp-precision-selector">
|
||||||
<input name="sp_precision" type="text" size="4" id="sp_precision" value="<?php echo esc_attr( $precision ); ?>" placeholder="0">
|
<input name="sp_precision" type="text" size="4" id="sp_precision" value="<?php echo esc_attr( $precision ); ?>" placeholder="0">
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -31,26 +31,26 @@ class SP_Meta_Box_Spec_Details extends SP_Meta_Box_Config {
|
|||||||
$visible = 1;
|
$visible = 1;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<p><strong><?php _e( 'Variable', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Variable', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<input name="sp_default_key" type="hidden" id="sp_default_key" value="<?php echo esc_attr( $post->post_name ); ?>">
|
<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 ); ?>">
|
<input name="sp_key" type="text" id="sp_key" value="<?php echo esc_attr( $post->post_name ); ?>">
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<strong><?php _e( 'Visible', 'sportspress' ); ?></strong>
|
<strong><?php esc_attr_e( 'Visible', 'sportspress' ); ?></strong>
|
||||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php _e( 'Display in event pages?', 'sportspress' ); ?>"></i>
|
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php esc_attr_e( 'Display in event pages?', 'sportspress' ); ?>"></i>
|
||||||
</p>
|
</p>
|
||||||
<ul class="sp-visible-selector">
|
<ul class="sp-visible-selector">
|
||||||
<li>
|
<li>
|
||||||
<label class="selectit">
|
<label class="selectit">
|
||||||
<input name="sp_visible" id="sp_visible_yes" type="radio" value="1" <?php checked( $visible ); ?>>
|
<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>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label class="selectit">
|
<label class="selectit">
|
||||||
<input name="sp_visible" id="sp_visible_no" type="radio" value="0" <?php checked( ! $visible ); ?>>
|
<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>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ class SP_Meta_Box_Staff_Details {
|
|||||||
$past_teams = array_filter( get_post_meta( $post->ID, 'sp_past_team', false ) );
|
$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 ) );
|
$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>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
@@ -70,19 +70,19 @@ class SP_Meta_Box_Staff_Details {
|
|||||||
'name' => 'tax_input[sp_role][]',
|
'name' => 'tax_input[sp_role][]',
|
||||||
'selected' => $role_ids,
|
'selected' => $role_ids,
|
||||||
'values' => 'term_id',
|
'values' => 'term_id',
|
||||||
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Jobs', 'sportspress' ) ),
|
'placeholder' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Jobs', 'sportspress' ) ),
|
||||||
'class' => 'widefat',
|
'class' => 'widefat',
|
||||||
'property' => 'multiple',
|
'property' => 'multiple',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
);
|
);
|
||||||
if ( ! sp_dropdown_taxonomies( $args ) ) :
|
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;
|
endif;
|
||||||
?>
|
?>
|
||||||
</p>
|
</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
|
<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
|
<?php
|
||||||
if ( is_rtl() ) :
|
if ( is_rtl() ) :
|
||||||
?>
|
?>
|
||||||
@@ -97,7 +97,7 @@ class SP_Meta_Box_Staff_Details {
|
|||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</select></p>
|
</select></p>
|
||||||
|
|
||||||
<p><strong><?php _e( 'Current Teams', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Current Teams', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
@@ -105,7 +105,7 @@ class SP_Meta_Box_Staff_Details {
|
|||||||
'name' => 'sp_current_team[]',
|
'name' => 'sp_current_team[]',
|
||||||
'selected' => $current_teams,
|
'selected' => $current_teams,
|
||||||
'values' => 'ID',
|
'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',
|
'class' => 'sp-current-teams widefat',
|
||||||
'property' => 'multiple',
|
'property' => 'multiple',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
@@ -114,7 +114,7 @@ class SP_Meta_Box_Staff_Details {
|
|||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p><strong><?php _e( 'Past Teams', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Past Teams', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
@@ -122,7 +122,7 @@ class SP_Meta_Box_Staff_Details {
|
|||||||
'name' => 'sp_past_team[]',
|
'name' => 'sp_past_team[]',
|
||||||
'selected' => $past_teams,
|
'selected' => $past_teams,
|
||||||
'values' => 'ID',
|
'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',
|
'class' => 'sp-past-teams widefat',
|
||||||
'property' => 'multiple',
|
'property' => 'multiple',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
@@ -131,7 +131,7 @@ class SP_Meta_Box_Staff_Details {
|
|||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p><strong><?php _e( 'Leagues', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Leagues', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
@@ -139,7 +139,7 @@ class SP_Meta_Box_Staff_Details {
|
|||||||
'name' => 'tax_input[sp_league][]',
|
'name' => 'tax_input[sp_league][]',
|
||||||
'selected' => $league_ids,
|
'selected' => $league_ids,
|
||||||
'values' => 'term_id',
|
'values' => 'term_id',
|
||||||
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Leagues', 'sportspress' ) ),
|
'placeholder' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Leagues', 'sportspress' ) ),
|
||||||
'class' => 'widefat',
|
'class' => 'widefat',
|
||||||
'property' => 'multiple',
|
'property' => 'multiple',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
@@ -148,7 +148,7 @@ class SP_Meta_Box_Staff_Details {
|
|||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p><strong><?php _e( 'Seasons', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Seasons', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
@@ -156,7 +156,7 @@ class SP_Meta_Box_Staff_Details {
|
|||||||
'name' => 'tax_input[sp_season][]',
|
'name' => 'tax_input[sp_season][]',
|
||||||
'selected' => $season_ids,
|
'selected' => $season_ids,
|
||||||
'values' => 'term_id',
|
'values' => 'term_id',
|
||||||
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Seasons', 'sportspress' ) ),
|
'placeholder' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Seasons', 'sportspress' ) ),
|
||||||
'class' => 'widefat',
|
'class' => 'widefat',
|
||||||
'property' => 'multiple',
|
'property' => 'multiple',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class SP_Meta_Box_Staff_Shortcode {
|
|||||||
public static function output( $post ) {
|
public static function output( $post ) {
|
||||||
?>
|
?>
|
||||||
<p class="howto">
|
<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>
|
||||||
<p><input type="text" value="<?php sp_shortcode_template( 'staff_profile', $post->ID ); ?>" readonly="readonly" class="code widefat"></p>
|
<p><input type="text" value="<?php sp_shortcode_template( 'staff_profile', $post->ID ); ?>" readonly="readonly" class="code widefat"></p>
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@@ -46,91 +46,91 @@ class SP_Meta_Box_Statistic_Details extends SP_Meta_Box_Config {
|
|||||||
$visible = 1;
|
$visible = 1;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<p><strong><?php _e( 'Key', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Key', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<input name="sp_default_key" type="hidden" id="sp_default_key" value="<?php echo esc_attr( $post->post_name ); ?>">
|
<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 ); ?>">
|
<input name="sp_key" type="text" id="sp_key" value="<?php echo esc_attr( $post->post_name ); ?>">
|
||||||
</p>
|
</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">
|
<p class="sp-precision-selector">
|
||||||
<input name="sp_precision" type="text" size="4" id="sp_precision" value="<?php echo esc_attr( $precision ); ?>" placeholder="0">
|
<input name="sp_precision" type="text" size="4" id="sp_precision" value="<?php echo esc_attr( $precision ); ?>" placeholder="0">
|
||||||
</p>
|
</p>
|
||||||
<p><strong><?php _e( 'Category', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Category', 'sportspress' ); ?></strong></p>
|
||||||
<p class="sp-section-selector">
|
<p class="sp-section-selector">
|
||||||
<select name="sp_section">
|
<select name="sp_section">
|
||||||
<?php
|
<?php
|
||||||
$options = apply_filters(
|
$options = apply_filters(
|
||||||
'sportspress_performance_sections',
|
'sportspress_performance_sections',
|
||||||
array(
|
array(
|
||||||
-1 => __( 'All', 'sportspress' ),
|
-1 => esc_attr__( 'All', 'sportspress' ),
|
||||||
0 => __( 'Offense', 'sportspress' ),
|
0 => esc_attr__( 'Offense', 'sportspress' ),
|
||||||
1 => __(
|
1 => esc_attr__(
|
||||||
'Defense',
|
'Defense',
|
||||||
'sportspress'
|
'sportspress'
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
foreach ( $options as $key => $value ) :
|
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;
|
endforeach;
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p><strong><?php _e( 'Format', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Format', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<select name="sp_format">
|
<select name="sp_format">
|
||||||
<?php
|
<?php
|
||||||
$options = apply_filters(
|
$options = apply_filters(
|
||||||
'sportspress_statistic_formats',
|
'sportspress_statistic_formats',
|
||||||
array(
|
array(
|
||||||
'number' => __( 'Number', 'sportspress' ),
|
'number' => esc_attr__( 'Number', 'sportspress' ),
|
||||||
'time' => __(
|
'time' => esc_attr__(
|
||||||
'Time',
|
'Time',
|
||||||
'sportspress'
|
'sportspress'
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
foreach ( $options as $key => $value ) :
|
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;
|
endforeach;
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p><strong><?php _e( 'Type', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Type', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<select name="sp_type">
|
<select name="sp_type">
|
||||||
<?php
|
<?php
|
||||||
$options = apply_filters(
|
$options = apply_filters(
|
||||||
'sportspress_statistic_total_types',
|
'sportspress_statistic_total_types',
|
||||||
array(
|
array(
|
||||||
'total' => __( 'Total', 'sportspress' ),
|
'total' => esc_attr__( 'Total', 'sportspress' ),
|
||||||
'average' => __(
|
'average' => esc_attr__(
|
||||||
'Average',
|
'Average',
|
||||||
'sportspress'
|
'sportspress'
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
foreach ( $options as $key => $value ) :
|
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;
|
endforeach;
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<strong><?php _e( 'Visible', 'sportspress' ); ?></strong>
|
<strong><?php esc_attr_e( 'Visible', 'sportspress' ); ?></strong>
|
||||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php _e( 'Display in player profile?', 'sportspress' ); ?>"></i>
|
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php esc_attr_e( 'Display in player profile?', 'sportspress' ); ?>"></i>
|
||||||
</p>
|
</p>
|
||||||
<ul class="sp-visible-selector">
|
<ul class="sp-visible-selector">
|
||||||
<li>
|
<li>
|
||||||
<label class="selectit">
|
<label class="selectit">
|
||||||
<input name="sp_visible" id="sp_visible_yes" type="radio" value="1" <?php checked( $visible ); ?>>
|
<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>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label class="selectit">
|
<label class="selectit">
|
||||||
<input name="sp_visible" id="sp_visible_no" type="radio" value="0" <?php checked( ! $visible ); ?>>
|
<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>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ class SP_Meta_Box_Table_Data {
|
|||||||
|
|
||||||
<?php if ( $readonly ) { ?>
|
<?php if ( $readonly ) { ?>
|
||||||
<p>
|
<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="
|
<a class="add-new-h2 sp-add-new-h2" href="
|
||||||
<?php
|
<?php
|
||||||
echo esc_url(
|
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>
|
</p>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<input type="hidden" name="sp_highlight" value="0">
|
<input type="hidden" name="sp_highlight" value="0">
|
||||||
<ul class="subsubsub sp-table-bar">
|
<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-values" class="current"><?php esc_attr_e( 'Values', 'sportspress' ); ?></a></li> |
|
||||||
<li><a href="#sp-table-adjustments" class=""><?php _e( 'Adjustments', 'sportspress' ); ?></a></li>
|
<li><a href="#sp-table-adjustments" class=""><?php esc_attr_e( 'Adjustments', 'sportspress' ); ?></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
@@ -94,9 +94,9 @@ class SP_Meta_Box_Table_Data {
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<?php if ( ! $readonly ) { ?>
|
<?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 } ?>
|
<?php } ?>
|
||||||
<th><?php _e( 'Team', 'sportspress' ); ?></th>
|
<th><?php esc_attr_e( 'Team', 'sportspress' ); ?></th>
|
||||||
<?php foreach ( $columns as $key => $label ) : ?>
|
<?php foreach ( $columns as $key => $label ) : ?>
|
||||||
<th><label for="sp_columns_<?php echo esc_attr( $key ); ?>">
|
<th><label for="sp_columns_<?php echo esc_attr( $key ); ?>">
|
||||||
<?php if ( ! $readonly ) { ?>
|
<?php if ( ! $readonly ) { ?>
|
||||||
@@ -140,12 +140,12 @@ class SP_Meta_Box_Table_Data {
|
|||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<span class="sp-default-value">
|
<span class="sp-default-value">
|
||||||
<span class="sp-default-value-input"><?php echo esc_html( $default_name ); ?></span>
|
<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>
|
||||||
<span class="hidden sp-custom-value">
|
<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">
|
<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-secondary sp-cancel"><?php esc_attr_e( 'Cancel', 'sportspress' ); ?></a>
|
||||||
<a class="button button-primary sp-save"><?php _e( 'Save', 'sportspress' ); ?></a>
|
<a class="button button-primary sp-save"><?php esc_attr_e( 'Save', 'sportspress' ); ?></a>
|
||||||
</span>
|
</span>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
@@ -167,10 +167,10 @@ class SP_Meta_Box_Table_Data {
|
|||||||
<td colspan="
|
<td colspan="
|
||||||
<?php
|
<?php
|
||||||
$colspan = sizeof( $columns ) + ( $readonly ? 1 : 2 );
|
$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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
@@ -183,7 +183,7 @@ class SP_Meta_Box_Table_Data {
|
|||||||
<table class="widefat sp-data-table sp-league-table">
|
<table class="widefat sp-data-table sp-league-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?php _e( 'Team', 'sportspress' ); ?></th>
|
<th><?php esc_attr_e( 'Team', 'sportspress' ); ?></th>
|
||||||
<?php foreach ( $columns as $key => $label ) : ?>
|
<?php foreach ( $columns as $key => $label ) : ?>
|
||||||
<th><?php echo esc_html( $label ); ?></th>
|
<th><?php echo esc_html( $label ); ?></th>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
@@ -205,7 +205,7 @@ class SP_Meta_Box_Table_Data {
|
|||||||
?>
|
?>
|
||||||
">
|
">
|
||||||
<td>
|
<td>
|
||||||
<?php echo get_the_title( $team_id ); ?>
|
<?php echo esc_attr( get_the_title( $team_id ) ); ?>
|
||||||
</td>
|
</td>
|
||||||
<?php
|
<?php
|
||||||
foreach ( $columns as $column => $label ) :
|
foreach ( $columns as $column => $label ) :
|
||||||
@@ -223,10 +223,10 @@ class SP_Meta_Box_Table_Data {
|
|||||||
<td colspan="
|
<td colspan="
|
||||||
<?php
|
<?php
|
||||||
$colspan = sizeof( $columns ) + 1;
|
$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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@@ -39,11 +39,11 @@ class SP_Meta_Box_Table_Details {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div>
|
<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><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">
|
<div class="sp-date-selector">
|
||||||
<p><strong><?php _e( 'Date', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Date', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
@@ -56,21 +56,21 @@ class SP_Meta_Box_Table_Details {
|
|||||||
</p>
|
</p>
|
||||||
<div class="sp-date-range">
|
<div class="sp-date-range">
|
||||||
<p class="sp-date-range-absolute">
|
<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>
|
||||||
|
|
||||||
<p class="sp-date-range-relative">
|
<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; ?>">
|
<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>
|
||||||
|
|
||||||
<p class="sp-date-relative">
|
<p class="sp-date-relative">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" name="sp_date_relative" value="1" id="sp_date_relative" <?php checked( $date_relative ); ?>>
|
<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>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -87,29 +87,29 @@ class SP_Meta_Box_Table_Details {
|
|||||||
</strong></p>
|
</strong></p>
|
||||||
<p class="sp-select-setting">
|
<p class="sp-select-setting">
|
||||||
<select name="sp_select">
|
<select name="sp_select">
|
||||||
<option value="auto" <?php selected( 'auto', $select ); ?>><?php _e( 'Auto', 'sportspress' ); ?></option>
|
<option value="auto" <?php selected( 'auto', $select ); ?>><?php esc_attr_e( 'Auto', 'sportspress' ); ?></option>
|
||||||
<option value="manual" <?php selected( 'manual', $select ); ?>><?php _e( 'Manual', 'sportspress' ); ?></option>
|
<option value="manual" <?php selected( 'manual', $select ); ?>><?php esc_attr_e( 'Manual', 'sportspress' ); ?></option>
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<?php
|
<?php
|
||||||
if ( 'manual' == $select ) {
|
if ( 'manual' == $select ) {
|
||||||
sp_post_checklist( $post->ID, $post_type, ( 'auto' == $select ? 'none' : 'block' ), array( 'sp_league', 'sp_season' ), null, 'sp_team' );
|
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>
|
<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="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>
|
<input type="checkbox" name="sp_event_status[]" value="future" <?php echo ( in_array( 'future', $event_status ) ) ? 'checked' : false; ?>> Scheduled/Future<br>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<p><strong><?php _e( 'Sort by', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Sort by', 'sportspress' ); ?></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
'prepend_options' => array(
|
'prepend_options' => array(
|
||||||
'default' => __( 'Default', 'sportspress' ),
|
'default' => esc_attr__( 'Default', 'sportspress' ),
|
||||||
'name' => __( 'Name', 'sportspress' ),
|
'name' => esc_attr__( 'Name', 'sportspress' ),
|
||||||
),
|
),
|
||||||
'post_type' => array( 'sp_column' ),
|
'post_type' => array( 'sp_column' ),
|
||||||
'name' => 'sp_orderby',
|
'name' => 'sp_orderby',
|
||||||
@@ -120,11 +120,11 @@ class SP_Meta_Box_Table_Details {
|
|||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<div id="sp_order" <?php echo ( $orderby === 'default' || $orderby === '' ? 'style="display: none;"' : '' ); ?>>
|
<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>
|
<p>
|
||||||
<select name="sp_order">
|
<select name="sp_order">
|
||||||
<option value="ASC" <?php selected( 'ASC', $order ); ?>><?php _e( 'Ascending', 'sportspress' ); ?></option>
|
<option value="ASC" <?php selected( 'ASC', $order ); ?>><?php esc_attr_e( 'Ascending', 'sportspress' ); ?></option>
|
||||||
<option value="DESC" <?php selected( 'DESC', $order ); ?>><?php _e( 'Descending', 'sportspress' ); ?></option>
|
<option value="DESC" <?php selected( 'DESC', $order ); ?>><?php esc_attr_e( 'Descending', 'sportspress' ); ?></option>
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ class SP_Meta_Box_Table_Mode {
|
|||||||
<div id="post-formats-select">
|
<div id="post-formats-select">
|
||||||
<?php
|
<?php
|
||||||
foreach ( array(
|
foreach ( array(
|
||||||
'team' => __( 'Team vs team', 'sportspress' ),
|
'team' => esc_attr__( 'Team vs team', 'sportspress' ),
|
||||||
'player' => __( 'Player vs player', 'sportspress' ),
|
'player' => esc_attr__( 'Player vs player', 'sportspress' ),
|
||||||
) as $key => $mode ) :
|
) 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>
|
<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">
|
<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>
|
||||||
<p><input type="text" value="<?php sp_shortcode_template( 'team_' . $the_format, $post->ID ); ?>" readonly="readonly" class="code widefat"></p>
|
<p><input type="text" value="<?php sp_shortcode_template( 'team_' . $the_format, $post->ID ); ?>" readonly="readonly" class="code widefat"></p>
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class SP_Meta_Box_Team_Columns {
|
|||||||
endforeach;
|
endforeach;
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
<p><strong><?php _e( 'Total', 'sportspress' ); ?></strong></p>
|
<p><strong><?php esc_attr_e( 'Total', 'sportspress' ); ?></strong></p>
|
||||||
<?php
|
<?php
|
||||||
list( $columns, $data, $placeholders ) = $team->columns( 0 );
|
list( $columns, $data, $placeholders ) = $team->columns( 0 );
|
||||||
self::table( 0, $columns, $data, $placeholders );
|
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">
|
<table class="widefat sp-data-table sp-team-column-table sp-select-all-range">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?php _e( 'Season', 'sportspress' ); ?></th>
|
<th><?php esc_attr_e( 'Season', 'sportspress' ); ?></th>
|
||||||
<?php foreach ( $columns as $label ) : ?>
|
<?php foreach ( $columns as $label ) : ?>
|
||||||
<th><?php echo esc_html( $label ); ?></th>
|
<th><?php echo esc_html( $label ); ?></th>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
@@ -83,7 +83,7 @@ endif;
|
|||||||
<label for="sp_leagues_<?php echo esc_attr( $league_id ); ?>_<?php echo esc_attr( $div_id ); ?>">
|
<label for="sp_leagues_<?php echo esc_attr( $league_id ); ?>_<?php echo esc_attr( $div_id ); ?>">
|
||||||
<?php
|
<?php
|
||||||
if ( 'WP_Error' == get_class( $div ) ) :
|
if ( 'WP_Error' == get_class( $div ) ) :
|
||||||
_e( 'Total', 'sportspress' );
|
esc_attr_e( 'Total', 'sportspress' );
|
||||||
else :
|
else :
|
||||||
echo esc_html( $div->name );
|
echo esc_html( $div->name );
|
||||||
endif;
|
endif;
|
||||||
@@ -98,7 +98,7 @@ endif;
|
|||||||
<?php
|
<?php
|
||||||
$value = sp_array_value( sp_array_value( $data, $div_id, array() ), $column, null );
|
$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 );
|
$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>
|
</td>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ class SP_Meta_Box_Team_Details {
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<?php if ( taxonomy_exists( 'sp_league' ) ) { ?>
|
<?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>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
@@ -68,7 +68,7 @@ class SP_Meta_Box_Team_Details {
|
|||||||
'name' => 'tax_input[sp_league][]',
|
'name' => 'tax_input[sp_league][]',
|
||||||
'selected' => $league_ids,
|
'selected' => $league_ids,
|
||||||
'values' => 'term_id',
|
'values' => 'term_id',
|
||||||
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Leagues', 'sportspress' ) ),
|
'placeholder' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Leagues', 'sportspress' ) ),
|
||||||
'class' => 'widefat',
|
'class' => 'widefat',
|
||||||
'property' => 'multiple',
|
'property' => 'multiple',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
@@ -79,7 +79,7 @@ class SP_Meta_Box_Team_Details {
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ( taxonomy_exists( 'sp_season' ) ) { ?>
|
<?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>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
@@ -87,7 +87,7 @@ class SP_Meta_Box_Team_Details {
|
|||||||
'name' => 'tax_input[sp_season][]',
|
'name' => 'tax_input[sp_season][]',
|
||||||
'selected' => $season_ids,
|
'selected' => $season_ids,
|
||||||
'values' => 'term_id',
|
'values' => 'term_id',
|
||||||
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Seasons', 'sportspress' ) ),
|
'placeholder' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Seasons', 'sportspress' ) ),
|
||||||
'class' => 'widefat',
|
'class' => 'widefat',
|
||||||
'property' => 'multiple',
|
'property' => 'multiple',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
@@ -98,7 +98,7 @@ class SP_Meta_Box_Team_Details {
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ( taxonomy_exists( 'sp_venue' ) ) { ?>
|
<?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>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
@@ -106,7 +106,7 @@ class SP_Meta_Box_Team_Details {
|
|||||||
'name' => 'tax_input[sp_venue][]',
|
'name' => 'tax_input[sp_venue][]',
|
||||||
'selected' => $venue_ids,
|
'selected' => $venue_ids,
|
||||||
'values' => 'term_id',
|
'values' => 'term_id',
|
||||||
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Venue', 'sportspress' ) ),
|
'placeholder' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Venue', 'sportspress' ) ),
|
||||||
'class' => 'widefat',
|
'class' => 'widefat',
|
||||||
'property' => 'multiple',
|
'property' => 'multiple',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
@@ -116,14 +116,14 @@ class SP_Meta_Box_Team_Details {
|
|||||||
</p>
|
</p>
|
||||||
<?php } ?>
|
<?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><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><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>
|
<p><input type="text" id="sp_abbreviation" name="sp_abbreviation" value="<?php echo esc_attr( $abbreviation ); ?>"></p>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class SP_Meta_Box_Team_Lists {
|
|||||||
|
|
||||||
else :
|
else :
|
||||||
|
|
||||||
printf( __( 'No results found.', 'sportspress' ) );
|
printf( esc_attr__( 'No results found.', 'sportspress' ) );
|
||||||
|
|
||||||
endif;
|
endif;
|
||||||
}
|
}
|
||||||
@@ -54,19 +54,19 @@ class SP_Meta_Box_Team_Lists {
|
|||||||
<tr>
|
<tr>
|
||||||
<th class="check-column"><input class="sp-select-all" type="checkbox"></th>
|
<th class="check-column"><input class="sp-select-all" type="checkbox"></th>
|
||||||
<th class="column-list">
|
<th class="column-list">
|
||||||
<?php _e( 'Player List', 'sportspress' ); ?>
|
<?php esc_attr_e( 'Player List', 'sportspress' ); ?>
|
||||||
</th>
|
</th>
|
||||||
<th class="column-players">
|
<th class="column-players">
|
||||||
<?php _e( 'Players', 'sportspress' ); ?>
|
<?php esc_attr_e( 'Players', 'sportspress' ); ?>
|
||||||
</th>
|
</th>
|
||||||
<th class="column-league">
|
<th class="column-league">
|
||||||
<?php _e( 'League', 'sportspress' ); ?>
|
<?php esc_attr_e( 'League', 'sportspress' ); ?>
|
||||||
</th>
|
</th>
|
||||||
<th class="column-season">
|
<th class="column-season">
|
||||||
<?php _e( 'Season', 'sportspress' ); ?>
|
<?php esc_attr_e( 'Season', 'sportspress' ); ?>
|
||||||
</th>
|
</th>
|
||||||
<th class="column-layout">
|
<th class="column-layout">
|
||||||
<?php _e( 'Layout', 'sportspress' ); ?>
|
<?php esc_attr_e( 'Layout', 'sportspress' ); ?>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -86,16 +86,16 @@ class SP_Meta_Box_Team_Lists {
|
|||||||
?>
|
?>
|
||||||
">
|
">
|
||||||
<td>
|
<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>
|
||||||
<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 ); ?>
|
<?php echo esc_html( $list->post_title ); ?>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td><?php echo sizeof( $players ); ?></td>
|
<td><?php echo esc_attr( 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_league' ) ? wp_kses_post( 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 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>
|
<td><?php echo esc_html( sp_array_value( SP()->formats->list, $format, '—' ) ); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
@@ -105,7 +105,7 @@ class SP_Meta_Box_Team_Lists {
|
|||||||
?>
|
?>
|
||||||
<tr class="sp-row alternate">
|
<tr class="sp-row alternate">
|
||||||
<td colspan="6">
|
<td colspan="6">
|
||||||
<?php _e( 'No results found.', 'sportspress' ); ?>
|
<?php esc_attr_e( 'No results found.', 'sportspress' ); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
@@ -114,7 +114,7 @@ class SP_Meta_Box_Team_Lists {
|
|||||||
?>
|
?>
|
||||||
<tr class="sp-row alternate">
|
<tr class="sp-row alternate">
|
||||||
<td colspan="6">
|
<td colspan="6">
|
||||||
<?php printf( __( 'Select %s', 'sportspress' ), __( 'Details', 'sportspress' ) ); ?>
|
<?php printf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Details', 'sportspress' ) ); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class SP_Meta_Box_Team_Staff {
|
|||||||
|
|
||||||
else :
|
else :
|
||||||
|
|
||||||
printf( __( 'No results found.', 'sportspress' ) );
|
printf( esc_attr__( 'No results found.', 'sportspress' ) );
|
||||||
|
|
||||||
endif;
|
endif;
|
||||||
}
|
}
|
||||||
@@ -54,16 +54,16 @@ class SP_Meta_Box_Team_Staff {
|
|||||||
<tr>
|
<tr>
|
||||||
<th class="check-column"><input class="sp-select-all" type="checkbox"></th>
|
<th class="check-column"><input class="sp-select-all" type="checkbox"></th>
|
||||||
<th class="column-staff">
|
<th class="column-staff">
|
||||||
<?php _e( 'Staff', 'sportspress' ); ?>
|
<?php esc_attr_e( 'Staff', 'sportspress' ); ?>
|
||||||
</th>
|
</th>
|
||||||
<th class="column-role">
|
<th class="column-role">
|
||||||
<?php _e( 'Job', 'sportspress' ); ?>
|
<?php esc_attr_e( 'Job', 'sportspress' ); ?>
|
||||||
</th>
|
</th>
|
||||||
<th class="column-league">
|
<th class="column-league">
|
||||||
<?php _e( 'League', 'sportspress' ); ?>
|
<?php esc_attr_e( 'League', 'sportspress' ); ?>
|
||||||
</th>
|
</th>
|
||||||
<th class="column-season">
|
<th class="column-season">
|
||||||
<?php _e( 'Season', 'sportspress' ); ?>
|
<?php esc_attr_e( 'Season', 'sportspress' ); ?>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -82,16 +82,16 @@ class SP_Meta_Box_Team_Staff {
|
|||||||
?>
|
?>
|
||||||
">
|
">
|
||||||
<td>
|
<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>
|
||||||
<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 ); ?>
|
<?php echo esc_html( $staff->post_title ); ?>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</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_role' ) ? wp_kses_post( 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_league' ) ? wp_kses_post( 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_season' ) ? wp_kses_post( the_terms( $staff->ID, 'sp_season' ) ) : '—'; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$i++;
|
$i++;
|
||||||
@@ -100,7 +100,7 @@ class SP_Meta_Box_Team_Staff {
|
|||||||
?>
|
?>
|
||||||
<tr class="sp-row alternate">
|
<tr class="sp-row alternate">
|
||||||
<td colspan="5">
|
<td colspan="5">
|
||||||
<?php _e( 'No results found.', 'sportspress' ); ?>
|
<?php esc_attr_e( 'No results found.', 'sportspress' ); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
@@ -109,7 +109,7 @@ class SP_Meta_Box_Team_Staff {
|
|||||||
?>
|
?>
|
||||||
<tr class="sp-row alternate">
|
<tr class="sp-row alternate">
|
||||||
<td colspan="5">
|
<td colspan="5">
|
||||||
<?php printf( __( 'Select %s', 'sportspress' ), __( 'Details', 'sportspress' ) ); ?>
|
<?php printf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Details', 'sportspress' ) ); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class SP_Meta_Box_Team_Tables {
|
|||||||
|
|
||||||
else :
|
else :
|
||||||
|
|
||||||
printf( __( 'No results found.', 'sportspress' ) );
|
printf( esc_attr__( 'No results found.', 'sportspress' ) );
|
||||||
|
|
||||||
endif;
|
endif;
|
||||||
}
|
}
|
||||||
@@ -54,16 +54,16 @@ class SP_Meta_Box_Team_Tables {
|
|||||||
<tr>
|
<tr>
|
||||||
<th class="check-column"><input class="sp-select-all" type="checkbox"></th>
|
<th class="check-column"><input class="sp-select-all" type="checkbox"></th>
|
||||||
<th class="column-table">
|
<th class="column-table">
|
||||||
<?php _e( 'League Table', 'sportspress' ); ?>
|
<?php esc_attr_e( 'League Table', 'sportspress' ); ?>
|
||||||
</th>
|
</th>
|
||||||
<th class="column-teams">
|
<th class="column-teams">
|
||||||
<?php _e( 'Teams', 'sportspress' ); ?>
|
<?php esc_attr_e( 'Teams', 'sportspress' ); ?>
|
||||||
</th>
|
</th>
|
||||||
<th class="column-league">
|
<th class="column-league">
|
||||||
<?php _e( 'League', 'sportspress' ); ?>
|
<?php esc_attr_e( 'League', 'sportspress' ); ?>
|
||||||
</th>
|
</th>
|
||||||
<th class="column-season">
|
<th class="column-season">
|
||||||
<?php _e( 'Season', 'sportspress' ); ?>
|
<?php esc_attr_e( 'Season', 'sportspress' ); ?>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -83,16 +83,16 @@ class SP_Meta_Box_Team_Tables {
|
|||||||
?>
|
?>
|
||||||
">
|
">
|
||||||
<td>
|
<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>
|
||||||
<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 ); ?>
|
<?php echo esc_html( $table->post_title ); ?>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td><?php echo sizeof( $teams ); ?></td>
|
<td><?php echo esc_attr( 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_league' ) ? wp_kses_post( 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 get_the_terms( $table->ID, 'sp_season' ) ? wp_kses_post( the_terms( $table->ID, 'sp_season' ) ) : '—'; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$i++;
|
$i++;
|
||||||
@@ -101,7 +101,7 @@ class SP_Meta_Box_Team_Tables {
|
|||||||
?>
|
?>
|
||||||
<tr class="sp-row alternate">
|
<tr class="sp-row alternate">
|
||||||
<td colspan="6">
|
<td colspan="6">
|
||||||
<?php _e( 'No results found.', 'sportspress' ); ?>
|
<?php esc_attr_e( 'No results found.', 'sportspress' ); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
@@ -110,7 +110,7 @@ class SP_Meta_Box_Team_Tables {
|
|||||||
?>
|
?>
|
||||||
<tr class="sp-row alternate">
|
<tr class="sp-row alternate">
|
||||||
<td colspan="5">
|
<td colspan="5">
|
||||||
<?php printf( __( 'Select %s', 'sportspress' ), __( 'Details', 'sportspress' ) ); ?>
|
<?php printf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Details', 'sportspress' ) ); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
$this->id = 'events';
|
$this->id = 'events';
|
||||||
$this->label = __( 'Events', 'sportspress' );
|
$this->label = esc_attr__( 'Events', 'sportspress' );
|
||||||
$this->template = 'event';
|
$this->template = 'event';
|
||||||
|
|
||||||
add_filter( 'sportspress_settings_tabs_array', array( $this, 'add_settings_page' ), 20 );
|
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(
|
$settings = array_merge(
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Event Options', 'sportspress' ),
|
'title' => esc_attr__( 'Event Options', 'sportspress' ),
|
||||||
'type' => 'title',
|
'type' => 'title',
|
||||||
'desc' => '',
|
'desc' => '',
|
||||||
'id' => 'event_options',
|
'id' => 'event_options',
|
||||||
@@ -56,8 +56,8 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
array_merge(
|
array_merge(
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Link', 'sportspress' ),
|
'title' => esc_attr__( 'Link', 'sportspress' ),
|
||||||
'desc' => __( 'Link events', 'sportspress' ),
|
'desc' => esc_attr__( 'Link events', 'sportspress' ),
|
||||||
'id' => 'sportspress_link_events',
|
'id' => 'sportspress_link_events',
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -71,8 +71,8 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
array( 'type' => 'event_tabs' ),
|
array( 'type' => 'event_tabs' ),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Details', 'sportspress' ),
|
'title' => esc_attr__( 'Details', 'sportspress' ),
|
||||||
'desc' => __( 'Date', 'sportspress' ),
|
'desc' => esc_attr__( 'Date', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_show_date',
|
'id' => 'sportspress_event_show_date',
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -80,7 +80,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'desc' => __( 'Time', 'sportspress' ),
|
'desc' => esc_attr__( 'Time', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_show_time',
|
'id' => 'sportspress_event_show_time',
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -88,7 +88,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'desc' => __( 'Match Day', 'sportspress' ),
|
'desc' => esc_attr__( 'Match Day', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_show_day',
|
'id' => 'sportspress_event_show_day',
|
||||||
'default' => 'no',
|
'default' => 'no',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -96,7 +96,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'desc' => __( 'Full Time', 'sportspress' ),
|
'desc' => esc_attr__( 'Full Time', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_show_full_time',
|
'id' => 'sportspress_event_show_full_time',
|
||||||
'default' => 'no',
|
'default' => 'no',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -106,23 +106,23 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Default mode', 'sportspress' ),
|
'title' => esc_attr__( 'Default mode', 'sportspress' ),
|
||||||
'id' => 'sportspress_mode',
|
'id' => 'sportspress_mode',
|
||||||
'default' => 'team',
|
'default' => 'team',
|
||||||
'type' => 'radio',
|
'type' => 'radio',
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'team' => __( 'Team vs team', 'sportspress' ),
|
'team' => esc_attr__( 'Team vs team', 'sportspress' ),
|
||||||
'player' => __( 'Player vs player', 'sportspress' ),
|
'player' => esc_attr__( 'Player vs player', 'sportspress' ),
|
||||||
),
|
),
|
||||||
'desc_tip' => _x( 'Who competes in events?', 'mode setting description', 'sportspress' ),
|
'desc_tip' => _x( 'Who competes in events?', 'mode setting description', 'sportspress' ),
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Limit', 'sportspress' ),
|
'title' => esc_attr__( 'Limit', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_teams',
|
'id' => 'sportspress_event_teams',
|
||||||
'class' => 'small-text',
|
'class' => 'small-text',
|
||||||
'default' => '2',
|
'default' => '2',
|
||||||
'desc' => __( 'teams', 'sportspress' ),
|
'desc' => esc_attr__( 'teams', 'sportspress' ),
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'custom_attributes' => array(
|
'custom_attributes' => array(
|
||||||
'min' => 0,
|
'min' => 0,
|
||||||
@@ -133,8 +133,8 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
array( 'type' => 'delimiter' ),
|
array( 'type' => 'delimiter' ),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Teams', 'sportspress' ),
|
'title' => esc_attr__( 'Teams', 'sportspress' ),
|
||||||
'desc' => __( 'Filter by league', 'sportspress' ),
|
'desc' => esc_attr__( 'Filter by league', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_filter_teams_by_league',
|
'id' => 'sportspress_event_filter_teams_by_league',
|
||||||
'default' => 'no',
|
'default' => 'no',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -142,7 +142,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'desc' => __( 'Filter by season', 'sportspress' ),
|
'desc' => esc_attr__( 'Filter by season', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_filter_teams_by_season',
|
'id' => 'sportspress_event_filter_teams_by_season',
|
||||||
'default' => 'no',
|
'default' => 'no',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -150,11 +150,11 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Full Time', 'sportspress' ),
|
'title' => esc_attr__( 'Full Time', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_minutes',
|
'id' => 'sportspress_event_minutes',
|
||||||
'class' => 'small-text',
|
'class' => 'small-text',
|
||||||
'default' => '90',
|
'default' => '90',
|
||||||
'desc' => __( 'mins', 'sportspress' ),
|
'desc' => esc_attr__( 'mins', 'sportspress' ),
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'custom_attributes' => array(
|
'custom_attributes' => array(
|
||||||
'min' => 0,
|
'min' => 0,
|
||||||
@@ -163,8 +163,8 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Comments', 'sportspress' ),
|
'title' => esc_attr__( 'Comments', 'sportspress' ),
|
||||||
'desc' => __( 'Allow people to post comments on new articles', 'sportspress' ),
|
'desc' => esc_attr__( 'Allow people to post comments on new articles', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_comment_status',
|
'id' => 'sportspress_event_comment_status',
|
||||||
'default' => 'no',
|
'default' => 'no',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -180,7 +180,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Venues', 'sportspress' ),
|
'title' => esc_attr__( 'Venues', 'sportspress' ),
|
||||||
'type' => 'title',
|
'type' => 'title',
|
||||||
'desc' => '',
|
'desc' => '',
|
||||||
'id' => 'venue_options',
|
'id' => 'venue_options',
|
||||||
@@ -190,34 +190,34 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
'sportspress_venue_options',
|
'sportspress_venue_options',
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Link', 'sportspress' ),
|
'title' => esc_attr__( 'Link', 'sportspress' ),
|
||||||
'desc' => __( 'Link venues', 'sportspress' ),
|
'desc' => esc_attr__( 'Link venues', 'sportspress' ),
|
||||||
'id' => 'sportspress_link_venues',
|
'id' => 'sportspress_link_venues',
|
||||||
'default' => 'no',
|
'default' => 'no',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Venue Map', 'sportspress' ),
|
'title' => esc_attr__( 'Venue Map', 'sportspress' ),
|
||||||
'desc' => __( 'Display venue map', 'sportspress' ),
|
'desc' => esc_attr__( 'Display venue map', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_show_maps',
|
'id' => 'sportspress_event_show_maps',
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Type', 'sportspress' ),
|
'title' => esc_attr__( 'Type', 'sportspress' ),
|
||||||
'id' => 'sportspress_map_type',
|
'id' => 'sportspress_map_type',
|
||||||
'default' => 'ROADMAP',
|
'default' => 'ROADMAP',
|
||||||
'type' => 'radio',
|
'type' => 'radio',
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'ROADMAP' => __( 'Default', 'sportspress' ),
|
'ROADMAP' => esc_attr__( 'Default', 'sportspress' ),
|
||||||
'SATELLITE' => __( 'Satellite', 'sportspress' ),
|
'SATELLITE' => esc_attr__( 'Satellite', 'sportspress' ),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Zoom', 'sportspress' ),
|
'title' => esc_attr__( 'Zoom', 'sportspress' ),
|
||||||
'id' => 'sportspress_map_zoom',
|
'id' => 'sportspress_map_zoom',
|
||||||
'class' => 'small-text',
|
'class' => 'small-text',
|
||||||
'default' => '15',
|
'default' => '15',
|
||||||
@@ -239,7 +239,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Teams', 'sportspress' ),
|
'title' => esc_attr__( 'Teams', 'sportspress' ),
|
||||||
'type' => 'title',
|
'type' => 'title',
|
||||||
'desc' => '',
|
'desc' => '',
|
||||||
'id' => 'event_logo_options',
|
'id' => 'event_logo_options',
|
||||||
@@ -249,27 +249,27 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
'sportspress_event_logo_options',
|
'sportspress_event_logo_options',
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Order', 'sportspress' ),
|
'title' => esc_attr__( 'Order', 'sportspress' ),
|
||||||
'desc' => __( 'Reverse order', 'sportspress' ),
|
'desc' => esc_attr__( 'Reverse order', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_reverse_teams',
|
'id' => 'sportspress_event_reverse_teams',
|
||||||
'default' => 'no',
|
'default' => 'no',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Layout', 'sportspress' ),
|
'title' => esc_attr__( 'Layout', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_logos_format',
|
'id' => 'sportspress_event_logos_format',
|
||||||
'default' => 'inline',
|
'default' => 'inline',
|
||||||
'type' => 'radio',
|
'type' => 'radio',
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'inline' => __( 'Inline', 'sportspress' ),
|
'inline' => esc_attr__( 'Inline', 'sportspress' ),
|
||||||
'block' => __( 'Block', 'sportspress' ),
|
'block' => esc_attr__( 'Block', 'sportspress' ),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Display', 'sportspress' ),
|
'title' => esc_attr__( 'Display', 'sportspress' ),
|
||||||
'desc' => __( 'Name', 'sportspress' ),
|
'desc' => esc_attr__( 'Name', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_logos_show_team_names',
|
'id' => 'sportspress_event_logos_show_team_names',
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -277,7 +277,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'desc' => __( 'Time', 'sportspress' ),
|
'desc' => esc_attr__( 'Time', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_logos_show_time',
|
'id' => 'sportspress_event_logos_show_time',
|
||||||
'default' => 'no',
|
'default' => 'no',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -285,7 +285,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'desc' => __( 'Results', 'sportspress' ),
|
'desc' => esc_attr__( 'Results', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_logos_show_results',
|
'id' => 'sportspress_event_logos_show_results',
|
||||||
'default' => 'no',
|
'default' => 'no',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -301,7 +301,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Players', 'sportspress' ),
|
'title' => esc_attr__( 'Players', 'sportspress' ),
|
||||||
'type' => 'title',
|
'type' => 'title',
|
||||||
'desc' => '',
|
'desc' => '',
|
||||||
'id' => 'eventplayer_options',
|
'id' => 'eventplayer_options',
|
||||||
@@ -311,13 +311,13 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
'sportspress_eventplayer_options',
|
'sportspress_eventplayer_options',
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Order', 'sportspress' ),
|
'title' => esc_attr__( 'Order', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_player_sort',
|
'id' => 'sportspress_event_player_sort',
|
||||||
'default' => 'jersey',
|
'default' => 'jersey',
|
||||||
'type' => 'radio',
|
'type' => 'radio',
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'jersey' => __( 'Jersey (e.g. "33. John Doe")', 'sportspress' ),
|
'jersey' => esc_attr__( 'Jersey (e.g. "33. John Doe")', 'sportspress' ),
|
||||||
'name' => __( 'Name (e.g. "John Doe (33)")', '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.',
|
'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(
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Event Results', 'sportspress' ),
|
'title' => esc_attr__( 'Event Results', 'sportspress' ),
|
||||||
'type' => 'title',
|
'type' => 'title',
|
||||||
'desc' => '',
|
'desc' => '',
|
||||||
'id' => 'result_options',
|
'id' => 'result_options',
|
||||||
@@ -342,19 +342,19 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
'sportspress_result_options',
|
'sportspress_result_options',
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Columns', 'sportspress' ),
|
'title' => esc_attr__( 'Columns', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_result_columns',
|
'id' => 'sportspress_event_result_columns',
|
||||||
'default' => 'auto',
|
'default' => 'auto',
|
||||||
'type' => 'radio',
|
'type' => 'radio',
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'auto' => __( 'Auto', 'sportspress' ),
|
'auto' => esc_attr__( 'Auto', 'sportspress' ),
|
||||||
'manual' => __( 'Manual', 'sportspress' ),
|
'manual' => esc_attr__( 'Manual', 'sportspress' ),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Outcome', 'sportspress' ),
|
'title' => esc_attr__( 'Outcome', 'sportspress' ),
|
||||||
'desc' => __( 'Display outcome', 'sportspress' ),
|
'desc' => esc_attr__( 'Display outcome', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_show_outcome',
|
'id' => 'sportspress_event_show_outcome',
|
||||||
'default' => 'no',
|
'default' => 'no',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -369,7 +369,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Box Score', 'sportspress' ),
|
'title' => esc_attr__( 'Box Score', 'sportspress' ),
|
||||||
'type' => 'title',
|
'type' => 'title',
|
||||||
'desc' => '',
|
'desc' => '',
|
||||||
'id' => 'performance_options',
|
'id' => 'performance_options',
|
||||||
@@ -380,8 +380,8 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
array_merge(
|
array_merge(
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Rows', 'sportspress' ),
|
'title' => esc_attr__( 'Rows', 'sportspress' ),
|
||||||
'desc' => __( 'Staff', 'sportspress' ),
|
'desc' => esc_attr__( 'Staff', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_show_staff',
|
'id' => 'sportspress_event_show_staff',
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -389,7 +389,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'desc' => __( 'Players', 'sportspress' ),
|
'desc' => esc_attr__( 'Players', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_show_players',
|
'id' => 'sportspress_event_show_players',
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -397,7 +397,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'desc' => __( 'Total', 'sportspress' ),
|
'desc' => esc_attr__( 'Total', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_show_total',
|
'id' => 'sportspress_event_show_total',
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -405,29 +405,29 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Columns', 'sportspress' ),
|
'title' => esc_attr__( 'Columns', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_performance_columns',
|
'id' => 'sportspress_event_performance_columns',
|
||||||
'default' => 'auto',
|
'default' => 'auto',
|
||||||
'type' => 'radio',
|
'type' => 'radio',
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'auto' => __( 'Auto', 'sportspress' ),
|
'auto' => esc_attr__( 'Auto', 'sportspress' ),
|
||||||
'manual' => __( 'Manual', 'sportspress' ),
|
'manual' => esc_attr__( 'Manual', 'sportspress' ),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Mode', 'sportspress' ),
|
'title' => esc_attr__( 'Mode', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_performance_mode',
|
'id' => 'sportspress_event_performance_mode',
|
||||||
'default' => 'values',
|
'default' => 'values',
|
||||||
'type' => 'radio',
|
'type' => 'radio',
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'values' => __( 'Values', 'sportspress' ),
|
'values' => esc_attr__( 'Values', 'sportspress' ),
|
||||||
'icons' => __( 'Icons', 'sportspress' ),
|
'icons' => esc_attr__( 'Icons', 'sportspress' ),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Awards', 'sportspress' ),
|
'title' => esc_attr__( 'Awards', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_performance_stars_type',
|
'id' => 'sportspress_event_performance_stars_type',
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
'type' => 'radio',
|
'type' => 'radio',
|
||||||
@@ -440,8 +440,8 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Positions', 'sportspress' ),
|
'title' => esc_attr__( 'Positions', 'sportspress' ),
|
||||||
'desc' => __( 'Top-level only', 'sportspress' ),
|
'desc' => esc_attr__( 'Top-level only', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_hide_child_positions',
|
'id' => 'sportspress_event_hide_child_positions',
|
||||||
'default' => 'no',
|
'default' => 'no',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -451,8 +451,8 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
'sportspress_event_performance_display_options',
|
'sportspress_event_performance_display_options',
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Display', 'sportspress' ),
|
'title' => esc_attr__( 'Display', 'sportspress' ),
|
||||||
'desc' => __( 'Squad Number', 'sportspress' ),
|
'desc' => esc_attr__( 'Squad Number', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_show_player_numbers',
|
'id' => 'sportspress_event_show_player_numbers',
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -460,7 +460,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'desc' => __( 'Position', 'sportspress' ),
|
'desc' => esc_attr__( 'Position', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_show_position',
|
'id' => 'sportspress_event_show_position',
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -468,7 +468,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'desc' => __( 'Minutes', 'sportspress' ),
|
'desc' => esc_attr__( 'Minutes', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_performance_show_minutes',
|
'id' => 'sportspress_event_performance_show_minutes',
|
||||||
'default' => 'no',
|
'default' => 'no',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -478,25 +478,25 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Performance', 'sportspress' ),
|
'title' => esc_attr__( 'Performance', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_performance_sections',
|
'id' => 'sportspress_event_performance_sections',
|
||||||
'default' => -1,
|
'default' => -1,
|
||||||
'type' => 'radio',
|
'type' => 'radio',
|
||||||
'options' => array(
|
'options' => array(
|
||||||
-1 => __( 'Combined', 'sportspress' ),
|
-1 => esc_attr__( 'Combined', 'sportspress' ),
|
||||||
0 => __( 'Offense', 'sportspress' ) . ' → ' . __( 'Defense', 'sportspress' ),
|
0 => esc_attr__( 'Offense', 'sportspress' ) . ' → ' . esc_attr__( 'Defense', 'sportspress' ),
|
||||||
1 => __( 'Defense', 'sportspress' ) . ' → ' . __( 'Offense', 'sportspress' ),
|
1 => esc_attr__( 'Defense', 'sportspress' ) . ' → ' . esc_attr__( 'Offense', 'sportspress' ),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Total', 'sportspress' ),
|
'title' => esc_attr__( 'Total', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_total_performance',
|
'id' => 'sportspress_event_total_performance',
|
||||||
'default' => 'all',
|
'default' => 'all',
|
||||||
'type' => 'radio',
|
'type' => 'radio',
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'all' => __( 'All', 'sportspress' ),
|
'all' => esc_attr__( 'All', 'sportspress' ),
|
||||||
'primary' => __( 'Primary', 'sportspress' ),
|
'primary' => esc_attr__( 'Primary', 'sportspress' ),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -537,9 +537,9 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) :
|
|||||||
$limit = 2;
|
$limit = 2;
|
||||||
}
|
}
|
||||||
if ( 3 >= $limit ) {
|
if ( 3 >= $limit ) {
|
||||||
$example = str_repeat( __( 'Team', 'sportspress' ) . ' %1$s ', $limit );
|
$example = str_repeat( esc_attr__( 'Team', 'sportspress' ) . ' %1$s ', $limit );
|
||||||
} else {
|
} else {
|
||||||
$example = str_repeat( __( 'Team', 'sportspress' ) . ' %1$s ', 3 ) . '…';
|
$example = str_repeat( esc_attr__( 'Team', 'sportspress' ) . ' %1$s ', 3 ) . '…';
|
||||||
}
|
}
|
||||||
$example = rtrim( $example, ' %1$s ' );
|
$example = rtrim( $example, ' %1$s ' );
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
|||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
$this->id = 'general';
|
$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_filter( 'sportspress_settings_tabs_array', array( $this, 'add_settings_page' ), 20 );
|
||||||
add_action( 'sportspress_settings_' . $this->id, array( $this, 'output' ) );
|
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();
|
$presets = SP_Admin_Sports::get_preset_options();
|
||||||
|
|
||||||
$leagues = array( '' => __( '— Select —', 'sportspress' ) );
|
$leagues = array( '' => esc_attr__( '— Select —', 'sportspress' ) );
|
||||||
|
|
||||||
$terms = get_terms(
|
$terms = get_terms(
|
||||||
array(
|
array(
|
||||||
@@ -57,7 +57,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$seasons = array( '' => __( '— Select —', 'sportspress' ) );
|
$seasons = array( '' => esc_attr__( '— Select —', 'sportspress' ) );
|
||||||
|
|
||||||
$terms = get_terms(
|
$terms = get_terms(
|
||||||
array(
|
array(
|
||||||
@@ -75,7 +75,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
|||||||
$settings = array_merge(
|
$settings = array_merge(
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'title' => __( 'General Options', 'sportspress' ),
|
'title' => esc_attr__( 'General Options', 'sportspress' ),
|
||||||
'type' => 'title',
|
'type' => 'title',
|
||||||
'desc' => '',
|
'desc' => '',
|
||||||
'id' => 'general_options',
|
'id' => 'general_options',
|
||||||
@@ -87,7 +87,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
|||||||
array( 'type' => 'timezone' ),
|
array( 'type' => 'timezone' ),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Sport', 'sportspress' ),
|
'title' => esc_attr__( 'Sport', 'sportspress' ),
|
||||||
'id' => 'sportspress_sport',
|
'id' => 'sportspress_sport',
|
||||||
'default' => 'none',
|
'default' => 'none',
|
||||||
'type' => 'sport',
|
'type' => 'sport',
|
||||||
@@ -95,7 +95,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Main League', 'sportspress' ),
|
'title' => esc_attr__( 'Main League', 'sportspress' ),
|
||||||
'id' => 'sportspress_league',
|
'id' => 'sportspress_league',
|
||||||
'default' => null,
|
'default' => null,
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
@@ -103,7 +103,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Current Season', 'sportspress' ),
|
'title' => esc_attr__( 'Current Season', 'sportspress' ),
|
||||||
'id' => 'sportspress_season',
|
'id' => 'sportspress_season',
|
||||||
'default' => null,
|
'default' => null,
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
@@ -117,7 +117,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
|||||||
'id' => 'general_options',
|
'id' => 'general_options',
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Styles and Scripts', 'sportspress' ),
|
'title' => esc_attr__( 'Styles and Scripts', 'sportspress' ),
|
||||||
'type' => 'title',
|
'type' => 'title',
|
||||||
'desc' => '',
|
'desc' => '',
|
||||||
'id' => 'script_styling_options',
|
'id' => 'script_styling_options',
|
||||||
@@ -134,24 +134,24 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
|||||||
$options,
|
$options,
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Align', 'sportspress' ),
|
'title' => esc_attr__( 'Align', 'sportspress' ),
|
||||||
'id' => 'sportspress_table_text_align',
|
'id' => 'sportspress_table_text_align',
|
||||||
'default' => 'default',
|
'default' => 'default',
|
||||||
'type' => 'radio',
|
'type' => 'radio',
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'default' => __( 'Default', 'sportspress' ),
|
'default' => esc_attr__( 'Default', 'sportspress' ),
|
||||||
'left' => __( 'Left', 'sportspress' ),
|
'left' => esc_attr__( 'Left', 'sportspress' ),
|
||||||
'center' => __( 'Center', 'sportspress' ),
|
'center' => esc_attr__( 'Center', 'sportspress' ),
|
||||||
'right' => __( 'Right', 'sportspress' ),
|
'right' => esc_attr__( 'Right', 'sportspress' ),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Padding', 'sportspress' ),
|
'title' => esc_attr__( 'Padding', 'sportspress' ),
|
||||||
'id' => 'sportspress_table_padding',
|
'id' => 'sportspress_table_padding',
|
||||||
'class' => 'small-text',
|
'class' => 'small-text',
|
||||||
'default' => null,
|
'default' => null,
|
||||||
'placeholder' => __( 'Auto', 'sportspress' ),
|
'placeholder' => esc_attr__( 'Auto', 'sportspress' ),
|
||||||
'desc' => 'px',
|
'desc' => 'px',
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'custom_attributes' => array(
|
'custom_attributes' => array(
|
||||||
@@ -166,7 +166,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
|||||||
$options,
|
$options,
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Custom CSS', 'sportspress' ),
|
'title' => esc_attr__( 'Custom CSS', 'sportspress' ),
|
||||||
'id' => 'sportspress_custom_css',
|
'id' => 'sportspress_custom_css',
|
||||||
'css' => 'width:100%; height: 130px;',
|
'css' => 'width:100%; height: 130px;',
|
||||||
'type' => 'textarea',
|
'type' => 'textarea',
|
||||||
@@ -176,29 +176,29 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
|||||||
'sportspress_general_script_options',
|
'sportspress_general_script_options',
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Scripts', 'sportspress' ),
|
'title' => esc_attr__( 'Scripts', 'sportspress' ),
|
||||||
'desc' => __( 'Live countdowns', 'sportspress' ),
|
'desc' => esc_attr__( 'Live countdowns', 'sportspress' ),
|
||||||
'id' => 'sportspress_enable_live_countdowns',
|
'id' => 'sportspress_enable_live_countdowns',
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'checkboxgroup' => 'start',
|
'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(
|
array(
|
||||||
'desc' => __( 'Shortcode menu', 'sportspress' ),
|
'desc' => esc_attr__( 'Shortcode menu', 'sportspress' ),
|
||||||
'id' => 'sportspress_rich_editing',
|
'id' => 'sportspress_rich_editing',
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'checkboxgroup' => 'end',
|
'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(
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Tables', 'sportspress' ),
|
'title' => esc_attr__( 'Tables', 'sportspress' ),
|
||||||
'desc' => __( 'Responsive', 'sportspress' ),
|
'desc' => esc_attr__( 'Responsive', 'sportspress' ),
|
||||||
'id' => 'sportspress_enable_responsive_tables',
|
'id' => 'sportspress_enable_responsive_tables',
|
||||||
'default' => 'no',
|
'default' => 'no',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -206,7 +206,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'desc' => __( 'Scrollable', 'sportspress' ),
|
'desc' => esc_attr__( 'Scrollable', 'sportspress' ),
|
||||||
'id' => 'sportspress_enable_scrollable_tables',
|
'id' => 'sportspress_enable_scrollable_tables',
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -214,7 +214,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'desc' => __( 'Sortable', 'sportspress' ),
|
'desc' => esc_attr__( 'Sortable', 'sportspress' ),
|
||||||
'id' => 'sportspress_enable_sortable_tables',
|
'id' => 'sportspress_enable_sortable_tables',
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -222,23 +222,23 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Widgets', 'sportspress' ),
|
'title' => esc_attr__( 'Widgets', 'sportspress' ),
|
||||||
'desc' => __( 'Unique', 'sportspress' ),
|
'desc' => esc_attr__( 'Unique', 'sportspress' ),
|
||||||
'id' => 'sportspress_widget_unique',
|
'id' => 'sportspress_widget_unique',
|
||||||
'default' => 'no',
|
'default' => 'no',
|
||||||
'type' => 'checkbox',
|
'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 ) ) {
|
if ( apply_filters( 'sportspress_enable_header', false ) ) {
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
'title' => __( 'Header Offset', 'sportspress' ),
|
'title' => esc_attr__( 'Header Offset', 'sportspress' ),
|
||||||
'id' => 'sportspress_header_offset',
|
'id' => 'sportspress_header_offset',
|
||||||
'class' => 'small-text',
|
'class' => 'small-text',
|
||||||
'default' => null,
|
'default' => null,
|
||||||
'placeholder' => __( 'Auto', 'sportspress' ),
|
'placeholder' => esc_attr__( 'Auto', 'sportspress' ),
|
||||||
'desc' => 'px',
|
'desc' => 'px',
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'custom_attributes' => array(
|
'custom_attributes' => array(
|
||||||
@@ -442,11 +442,11 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Show inputs
|
// Show inputs
|
||||||
$this->color_picker( __( 'Primary', 'sportspress' ), 'sportspress_frontend_css_primary', $colors['primary'] );
|
$this->color_picker( esc_attr__( 'Primary', 'sportspress' ), 'sportspress_frontend_css_primary', $colors['primary'] );
|
||||||
$this->color_picker( __( 'Background', 'sportspress' ), 'sportspress_frontend_css_background', $colors['background'] );
|
$this->color_picker( esc_attr__( 'Background', 'sportspress' ), 'sportspress_frontend_css_background', $colors['background'] );
|
||||||
$this->color_picker( __( 'Text', 'sportspress' ), 'sportspress_frontend_css_text', $colors['text'] );
|
$this->color_picker( esc_attr__( 'Text', 'sportspress' ), 'sportspress_frontend_css_text', $colors['text'] );
|
||||||
$this->color_picker( __( 'Heading', 'sportspress' ), 'sportspress_frontend_css_heading', $colors['heading'] );
|
$this->color_picker( esc_attr__( 'Heading', 'sportspress' ), 'sportspress_frontend_css_heading', $colors['heading'] );
|
||||||
$this->color_picker( __( 'Link', 'sportspress' ), 'sportspress_frontend_css_link', $colors['link'] );
|
$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 ) ) :
|
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() {
|
public function __construct() {
|
||||||
$this->id = 'licenses';
|
$this->id = 'licenses';
|
||||||
$this->label = __( 'Licenses', 'sportspress' );
|
$this->label = esc_attr__( 'Licenses', 'sportspress' );
|
||||||
|
|
||||||
$this->licenses = apply_filters(
|
$this->licenses = apply_filters(
|
||||||
'sportspress_licenses',
|
'sportspress_licenses',
|
||||||
@@ -159,7 +159,7 @@ if ( ! class_exists( 'SP_Settings_Licenses' ) ) :
|
|||||||
|
|
||||||
// Make sure the response came back okay
|
// Make sure the response came back okay
|
||||||
if ( is_wp_error( $response ) ) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -172,9 +172,9 @@ if ( ! class_exists( 'SP_Settings_Licenses' ) ) :
|
|||||||
// Update License or display error
|
// Update License or display error
|
||||||
if ( 'valid' == $license_data->license ) {
|
if ( 'valid' == $license_data->license ) {
|
||||||
update_site_option( 'sportspress_' . $id . '_license_key', $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 {
|
} 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
|
// make sure the response came back okay
|
||||||
if ( is_wp_error( $response ) ) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -224,9 +224,9 @@ if ( ! class_exists( 'SP_Settings_Licenses' ) ) :
|
|||||||
// $license_data->license will be either "deactivated" or "failed"
|
// $license_data->license will be either "deactivated" or "failed"
|
||||||
if ( $license_data->license == 'deactivated' ) {
|
if ( $license_data->license == 'deactivated' ) {
|
||||||
delete_site_option( 'sportspress_' . $id . '_license_status' );
|
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 {
|
} 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() {
|
public function __construct() {
|
||||||
$this->id = 'modules';
|
$this->id = 'modules';
|
||||||
$this->label = __( 'Modules', 'sportspress' );
|
$this->label = esc_attr__( 'Modules', 'sportspress' );
|
||||||
|
|
||||||
$this->sections = apply_filters(
|
$this->sections = apply_filters(
|
||||||
'sportspress_module_sections',
|
'sportspress_module_sections',
|
||||||
array(
|
array(
|
||||||
'general' => __( 'General', 'sportspress' ),
|
'general' => esc_attr__( 'General', 'sportspress' ),
|
||||||
'event' => __( 'Events', 'sportspress' ),
|
'event' => esc_attr__( 'Events', 'sportspress' ),
|
||||||
'team' => __( 'Teams', 'sportspress' ),
|
'team' => esc_attr__( 'Teams', 'sportspress' ),
|
||||||
'player_staff' => __( 'Players', 'sportspress' ) . ' & ' . __( 'Staff', 'sportspress' ),
|
'player_staff' => esc_attr__( 'Players', 'sportspress' ) . ' & ' . esc_attr__( 'Staff', 'sportspress' ),
|
||||||
'admin' => __( 'Dashboard', 'sportspress' ),
|
'admin' => esc_attr__( 'Dashboard', 'sportspress' ),
|
||||||
'other' => __( 'Other', 'sportspress' ),
|
'other' => esc_attr__( 'Other', 'sportspress' ),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -143,46 +143,46 @@ if ( ! class_exists( 'SP_Settings_Modules' ) ) :
|
|||||||
$categories = array(
|
$categories = array(
|
||||||
'documentation' => array(
|
'documentation' => array(
|
||||||
'icon' => 'sp-icon-book',
|
'icon' => 'sp-icon-book',
|
||||||
'label' => __( 'Documentation', 'sportspress' ),
|
'label' => esc_attr__( 'Documentation', 'sportspress' ),
|
||||||
'links' => array(
|
'links' => array(
|
||||||
'http://tboy.co/installation' => __( 'Getting Started', 'sportspress' ),
|
'http://tboy.co/installation' => esc_attr__( 'Getting Started', 'sportspress' ),
|
||||||
'http://tboy.co/manuals' => __( 'Manuals', 'sportspress' ),
|
'http://tboy.co/manuals' => esc_attr__( 'Manuals', 'sportspress' ),
|
||||||
'http://tboy.co/videos' => __( 'Videos', 'sportspress' ),
|
'http://tboy.co/videos' => esc_attr__( 'Videos', 'sportspress' ),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'help' => array(
|
'help' => array(
|
||||||
'icon' => 'dashicons dashicons-heart',
|
'icon' => 'dashicons dashicons-heart',
|
||||||
'label' => __( 'Help', 'sportspress' ),
|
'label' => esc_attr__( 'Help', 'sportspress' ),
|
||||||
'links' => array(
|
'links' => array(
|
||||||
'http://tboy.co/forums' => __( 'Support Forums', 'sportspress' ),
|
'http://tboy.co/forums' => esc_attr__( 'Support Forums', 'sportspress' ),
|
||||||
'http://tboy.co/ideas' => __( 'Feature Requests', 'sportspress' ),
|
'http://tboy.co/ideas' => esc_attr__( 'Feature Requests', 'sportspress' ),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'social' => array(
|
'social' => array(
|
||||||
'icon' => 'dashicons dashicons-share',
|
'icon' => 'dashicons dashicons-share',
|
||||||
'label' => __( 'Connect', 'sportspress' ),
|
'label' => esc_attr__( 'Connect', 'sportspress' ),
|
||||||
'links' => array(
|
'links' => array(
|
||||||
'http://tboy.co/twitter' => __( 'Twitter', 'sportspress' ),
|
'http://tboy.co/twitter' => esc_attr__( 'Twitter', 'sportspress' ),
|
||||||
'http://tboy.co/facebook' => __( 'Facebook', 'sportspress' ),
|
'http://tboy.co/facebook' => esc_attr__( 'Facebook', 'sportspress' ),
|
||||||
'http://tboy.co/youtube' => __( 'YouTube', 'sportspress' ),
|
'http://tboy.co/youtube' => esc_attr__( 'YouTube', 'sportspress' ),
|
||||||
'http://tboy.co/gplus' => __( 'Google+', 'sportspress' ),
|
'http://tboy.co/gplus' => esc_attr__( 'Google+', 'sportspress' ),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'developers' => array(
|
'developers' => array(
|
||||||
'icon' => 'dashicons dashicons-editor-code',
|
'icon' => 'dashicons dashicons-editor-code',
|
||||||
'label' => __( 'Developers', 'sportspress' ),
|
'label' => esc_attr__( 'Developers', 'sportspress' ),
|
||||||
'links' => array(
|
'links' => array(
|
||||||
'http://tboy.co/developers' => __( 'Reference', 'sportspress' ),
|
'http://tboy.co/developers' => esc_attr__( 'Reference', 'sportspress' ),
|
||||||
'http://tboy.co/slack' => __( 'Slack', 'sportspress' ),
|
'http://tboy.co/slack' => esc_attr__( 'Slack', 'sportspress' ),
|
||||||
'http://tboy.co/github' => __( 'GitHub', 'sportspress' ),
|
'http://tboy.co/github' => esc_attr__( 'GitHub', 'sportspress' ),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( class_exists( 'SportsPress_Pro' ) ) {
|
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 {
|
} 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 );
|
$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">
|
<table class="sp-modules-table widefat" cellspacing="0">
|
||||||
<thead>
|
<thead>
|
||||||
<tr><th>
|
<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>
|
</th></tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -226,7 +226,7 @@ if ( ! class_exists( 'SP_Settings_Modules' ) ) :
|
|||||||
<?php if ( isset( $module['class'] ) && ! class_exists( $module['class'] ) ) { ?>
|
<?php if ( isset( $module['class'] ) && ! class_exists( $module['class'] ) ) { ?>
|
||||||
<tr class="sp-module-unavailable"><td>
|
<tr class="sp-module-unavailable"><td>
|
||||||
<input type="checkbox" disabled="disabled">
|
<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>
|
<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 ) ); ?>
|
<?php echo esc_html( sp_array_value( $module, 'label', $id ) ); ?>
|
||||||
</span>
|
</span>
|
||||||
@@ -234,7 +234,7 @@ if ( ! class_exists( 'SP_Settings_Modules' ) ) :
|
|||||||
<span class="sp-desc">
|
<span class="sp-desc">
|
||||||
<?php echo wp_kses_post( $module['desc'] ); ?>
|
<?php echo wp_kses_post( $module['desc'] ); ?>
|
||||||
<?php if ( array_key_exists( 'link', $module ) ) { ?>
|
<?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 } ?>
|
<?php } ?>
|
||||||
</span>
|
</span>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) :
|
|||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
$this->id = 'players';
|
$this->id = 'players';
|
||||||
$this->label = __( 'Players', 'sportspress' );
|
$this->label = esc_attr__( 'Players', 'sportspress' );
|
||||||
$this->template = 'player';
|
$this->template = 'player';
|
||||||
|
|
||||||
add_filter( 'sportspress_settings_tabs_array', array( $this, 'add_settings_page' ), 20 );
|
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(
|
$settings = array_merge(
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Player Options', 'sportspress' ),
|
'title' => esc_attr__( 'Player Options', 'sportspress' ),
|
||||||
'type' => 'title',
|
'type' => 'title',
|
||||||
'desc' => '',
|
'desc' => '',
|
||||||
'id' => 'player_options',
|
'id' => 'player_options',
|
||||||
@@ -58,16 +58,16 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) :
|
|||||||
array( 'type' => 'player_tabs' ),
|
array( 'type' => 'player_tabs' ),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Link', 'sportspress' ),
|
'title' => esc_attr__( 'Link', 'sportspress' ),
|
||||||
'desc' => __( 'Link players', 'sportspress' ),
|
'desc' => esc_attr__( 'Link players', 'sportspress' ),
|
||||||
'id' => 'sportspress_link_players',
|
'id' => 'sportspress_link_players',
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Details', 'sportspress' ),
|
'title' => esc_attr__( 'Details', 'sportspress' ),
|
||||||
'desc' => __( 'Squad Number', 'sportspress' ),
|
'desc' => esc_attr__( 'Squad Number', 'sportspress' ),
|
||||||
'id' => 'sportspress_player_show_number',
|
'id' => 'sportspress_player_show_number',
|
||||||
'default' => 'no',
|
'default' => 'no',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -75,7 +75,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'desc' => __( 'Name', 'sportspress' ),
|
'desc' => esc_attr__( 'Name', 'sportspress' ),
|
||||||
'id' => 'sportspress_player_show_name',
|
'id' => 'sportspress_player_show_name',
|
||||||
'default' => 'no',
|
'default' => 'no',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -83,7 +83,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'desc' => __( 'Nationality', 'sportspress' ),
|
'desc' => esc_attr__( 'Nationality', 'sportspress' ),
|
||||||
'id' => 'sportspress_player_show_nationality',
|
'id' => 'sportspress_player_show_nationality',
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -91,7 +91,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'desc' => __( 'Position', 'sportspress' ),
|
'desc' => esc_attr__( 'Position', 'sportspress' ),
|
||||||
'id' => 'sportspress_player_show_positions',
|
'id' => 'sportspress_player_show_positions',
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -99,7 +99,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'desc' => __( 'Current Team', 'sportspress' ),
|
'desc' => esc_attr__( 'Current Team', 'sportspress' ),
|
||||||
'id' => 'sportspress_player_show_current_teams',
|
'id' => 'sportspress_player_show_current_teams',
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -107,7 +107,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'desc' => __( 'Past Teams', 'sportspress' ),
|
'desc' => esc_attr__( 'Past Teams', 'sportspress' ),
|
||||||
'id' => 'sportspress_player_show_past_teams',
|
'id' => 'sportspress_player_show_past_teams',
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -115,7 +115,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'desc' => __( 'Leagues', 'sportspress' ),
|
'desc' => esc_attr__( 'Leagues', 'sportspress' ),
|
||||||
'id' => 'sportspress_player_show_leagues',
|
'id' => 'sportspress_player_show_leagues',
|
||||||
'default' => 'no',
|
'default' => 'no',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -123,7 +123,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'desc' => __( 'Seasons', 'sportspress' ),
|
'desc' => esc_attr__( 'Seasons', 'sportspress' ),
|
||||||
'id' => 'sportspress_player_show_seasons',
|
'id' => 'sportspress_player_show_seasons',
|
||||||
'default' => 'no',
|
'default' => 'no',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -131,8 +131,8 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Nationality', 'sportspress' ),
|
'title' => esc_attr__( 'Nationality', 'sportspress' ),
|
||||||
'desc' => __( 'Display national flags', 'sportspress' ),
|
'desc' => esc_attr__( 'Display national flags', 'sportspress' ),
|
||||||
'id' => 'sportspress_player_show_flags',
|
'id' => 'sportspress_player_show_flags',
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -147,49 +147,49 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) :
|
|||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Statistics', 'sportspress' ),
|
'title' => esc_attr__( 'Statistics', 'sportspress' ),
|
||||||
'type' => 'title',
|
'type' => 'title',
|
||||||
'desc' => '',
|
'desc' => '',
|
||||||
'id' => 'player_statistic_options',
|
'id' => 'player_statistic_options',
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Columns', 'sportspress' ),
|
'title' => esc_attr__( 'Columns', 'sportspress' ),
|
||||||
'id' => 'sportspress_player_columns',
|
'id' => 'sportspress_player_columns',
|
||||||
'default' => 'auto',
|
'default' => 'auto',
|
||||||
'type' => 'radio',
|
'type' => 'radio',
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'auto' => __( 'Auto', 'sportspress' ),
|
'auto' => esc_attr__( 'Auto', 'sportspress' ),
|
||||||
'manual' => __( 'Manual', 'sportspress' ),
|
'manual' => esc_attr__( 'Manual', 'sportspress' ),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Mode', 'sportspress' ),
|
'title' => esc_attr__( 'Mode', 'sportspress' ),
|
||||||
'id' => 'sportspress_player_statistics_mode',
|
'id' => 'sportspress_player_statistics_mode',
|
||||||
'default' => 'values',
|
'default' => 'values',
|
||||||
'type' => 'radio',
|
'type' => 'radio',
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'values' => __( 'Values', 'sportspress' ),
|
'values' => esc_attr__( 'Values', 'sportspress' ),
|
||||||
'icons' => __( 'Icons', 'sportspress' ),
|
'icons' => esc_attr__( 'Icons', 'sportspress' ),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Categories', 'sportspress' ),
|
'title' => esc_attr__( 'Categories', 'sportspress' ),
|
||||||
'id' => 'sportspress_player_performance_sections',
|
'id' => 'sportspress_player_performance_sections',
|
||||||
'default' => -1,
|
'default' => -1,
|
||||||
'type' => 'radio',
|
'type' => 'radio',
|
||||||
'options' => array(
|
'options' => array(
|
||||||
-1 => __( 'Combined', 'sportspress' ),
|
-1 => esc_attr__( 'Combined', 'sportspress' ),
|
||||||
0 => __( 'Offense', 'sportspress' ) . ' → ' . __( 'Defense', 'sportspress' ),
|
0 => esc_attr__( 'Offense', 'sportspress' ) . ' → ' . esc_attr__( 'Defense', 'sportspress' ),
|
||||||
1 => __( 'Defense', 'sportspress' ) . ' → ' . __( 'Offense', 'sportspress' ),
|
1 => esc_attr__( 'Defense', 'sportspress' ) . ' → ' . esc_attr__( 'Offense', 'sportspress' ),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Display', 'sportspress' ),
|
'title' => esc_attr__( 'Display', 'sportspress' ),
|
||||||
'desc' => __( 'Total', 'sportspress' ),
|
'desc' => esc_attr__( 'Total', 'sportspress' ),
|
||||||
'id' => 'sportspress_player_show_total',
|
'id' => 'sportspress_player_show_total',
|
||||||
'default' => 'no',
|
'default' => 'no',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -197,7 +197,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'desc' => __( 'Career Total', 'sportspress' ),
|
'desc' => esc_attr__( 'Career Total', 'sportspress' ),
|
||||||
'id' => 'sportspress_player_show_career_total',
|
'id' => 'sportspress_player_show_career_total',
|
||||||
'default' => 'no',
|
'default' => 'no',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ if ( ! class_exists( 'SP_Settings_Staff' ) ) :
|
|||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
$this->id = 'staff';
|
$this->id = 'staff';
|
||||||
$this->label = __( 'Staff', 'sportspress' );
|
$this->label = esc_attr__( 'Staff', 'sportspress' );
|
||||||
$this->template = 'staff';
|
$this->template = 'staff';
|
||||||
|
|
||||||
add_filter( 'sportspress_settings_tabs_array', array( $this, 'add_settings_page' ), 20 );
|
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_merge(
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Staff Options', 'sportspress' ),
|
'title' => esc_attr__( 'Staff Options', 'sportspress' ),
|
||||||
'type' => 'title',
|
'type' => 'title',
|
||||||
'desc' => '',
|
'desc' => '',
|
||||||
'id' => 'staff_options',
|
'id' => 'staff_options',
|
||||||
@@ -60,16 +60,16 @@ if ( ! class_exists( 'SP_Settings_Staff' ) ) :
|
|||||||
array( 'type' => 'staff_tabs' ),
|
array( 'type' => 'staff_tabs' ),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Link', 'sportspress' ),
|
'title' => esc_attr__( 'Link', 'sportspress' ),
|
||||||
'desc' => __( 'Link staff', 'sportspress' ),
|
'desc' => esc_attr__( 'Link staff', 'sportspress' ),
|
||||||
'id' => 'sportspress_link_staff',
|
'id' => 'sportspress_link_staff',
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Details', 'sportspress' ),
|
'title' => esc_attr__( 'Details', 'sportspress' ),
|
||||||
'desc' => __( 'Nationality', 'sportspress' ),
|
'desc' => esc_attr__( 'Nationality', 'sportspress' ),
|
||||||
'id' => 'sportspress_staff_show_nationality',
|
'id' => 'sportspress_staff_show_nationality',
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -77,7 +77,7 @@ if ( ! class_exists( 'SP_Settings_Staff' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'desc' => __( 'Current Team', 'sportspress' ),
|
'desc' => esc_attr__( 'Current Team', 'sportspress' ),
|
||||||
'id' => 'sportspress_staff_show_current_teams',
|
'id' => 'sportspress_staff_show_current_teams',
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -85,7 +85,7 @@ if ( ! class_exists( 'SP_Settings_Staff' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'desc' => __( 'Past Teams', 'sportspress' ),
|
'desc' => esc_attr__( 'Past Teams', 'sportspress' ),
|
||||||
'id' => 'sportspress_staff_show_past_teams',
|
'id' => 'sportspress_staff_show_past_teams',
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
@@ -93,8 +93,8 @@ if ( ! class_exists( 'SP_Settings_Staff' ) ) :
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Nationality', 'sportspress' ),
|
'title' => esc_attr__( 'Nationality', 'sportspress' ),
|
||||||
'desc' => __( 'Display national flags', 'sportspress' ),
|
'desc' => esc_attr__( 'Display national flags', 'sportspress' ),
|
||||||
'id' => 'sportspress_staff_show_flags',
|
'id' => 'sportspress_staff_show_flags',
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
|||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
$this->id = 'status';
|
$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' ) ) {
|
if ( defined( 'WP_DEBUG' ) && true === WP_DEBUG && current_user_can( 'manage_options' ) ) {
|
||||||
add_filter( 'sportspress_settings_tabs_array', array( $this, 'add_settings_page' ), 99 );
|
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 );
|
$memory = sp_let_to_num( WP_MEMORY_LIMIT );
|
||||||
|
|
||||||
if ( $memory < 67108864 ) {
|
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 {
|
} else {
|
||||||
echo '<mark class="yes">' . esc_html( size_format( $memory ) ) . '</mark>';
|
echo '<mark class="yes">' . esc_html( size_format( $memory ) ) . '</mark>';
|
||||||
}
|
}
|
||||||
@@ -164,9 +164,9 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
|||||||
<?php
|
<?php
|
||||||
$default_timezone = date_default_timezone_get();
|
$default_timezone = date_default_timezone_get();
|
||||||
if ( 'UTC' !== $default_timezone ) {
|
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 {
|
} 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>
|
</td>
|
||||||
@@ -175,28 +175,28 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
|||||||
$posting = array();
|
$posting = array();
|
||||||
|
|
||||||
// fsockopen/cURL
|
// 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' ) ) {
|
||||||
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' ) ) {
|
} 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 {
|
} 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;
|
$posting['fsockopen_curl']['success'] = true;
|
||||||
} else {
|
} 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;
|
$posting['fsockopen_curl']['success'] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// SOAP
|
// SOAP
|
||||||
$posting['soap_client']['name'] = __( 'SOAP Client', 'sportspress' );
|
$posting['soap_client']['name'] = esc_attr__( 'SOAP Client', 'sportspress' );
|
||||||
if ( class_exists( 'SoapClient' ) ) {
|
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;
|
$posting['soap_client']['success'] = true;
|
||||||
} else {
|
} 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;
|
$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
|
// link the plugin name to the plugin url if available
|
||||||
$plugin_name = $plugin_data['Name'];
|
$plugin_name = $plugin_data['Name'];
|
||||||
if ( ! empty( $plugin_data['PluginURI'] ) ) {
|
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' ) ) {
|
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'], '>' ) ) {
|
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>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php esc_html_e( 'Sport', 'sportspress' ); ?>:</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php esc_html_e( 'Event Outcomes', 'sportspress' ); ?>:</td>
|
<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 );
|
$theme_version = $status->get_file_version( $theme_file );
|
||||||
|
|
||||||
if ( $core_version && ( empty( $theme_version ) || version_compare( $theme_version, $core_version, '<' ) ) ) {
|
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 {
|
} else {
|
||||||
$found_files[ $plugin_name ][] = sprintf( '<code>%s</code>', basename( $theme_file ) );
|
$found_files[ $plugin_name ][] = sprintf( '<code>%s</code>', basename( $theme_file ) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ if ( ! class_exists( 'SP_Settings_Teams' ) ) :
|
|||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
$this->id = 'teams';
|
$this->id = 'teams';
|
||||||
$this->label = __( 'Teams', 'sportspress' );
|
$this->label = esc_attr__( 'Teams', 'sportspress' );
|
||||||
$this->template = 'team';
|
$this->template = 'team';
|
||||||
|
|
||||||
add_filter( 'sportspress_settings_tabs_array', array( $this, 'add_settings_page' ), 20 );
|
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(
|
$settings = array_merge(
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Team Options', 'sportspress' ),
|
'title' => esc_attr__( 'Team Options', 'sportspress' ),
|
||||||
'type' => 'title',
|
'type' => 'title',
|
||||||
'desc' => '',
|
'desc' => '',
|
||||||
'id' => 'team_options',
|
'id' => 'team_options',
|
||||||
@@ -58,40 +58,40 @@ if ( ! class_exists( 'SP_Settings_Teams' ) ) :
|
|||||||
array( 'type' => 'team_tabs' ),
|
array( 'type' => 'team_tabs' ),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Staff', 'sportspress' ),
|
'title' => esc_attr__( 'Staff', 'sportspress' ),
|
||||||
'desc' => __( 'Link staff', 'sportspress' ),
|
'desc' => esc_attr__( 'Link staff', 'sportspress' ),
|
||||||
'id' => 'sportspress_team_link_staff',
|
'id' => 'sportspress_team_link_staff',
|
||||||
'default' => 'no',
|
'default' => 'no',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Link', 'sportspress' ),
|
'title' => esc_attr__( 'Link', 'sportspress' ),
|
||||||
'desc' => __( 'Link teams', 'sportspress' ),
|
'desc' => esc_attr__( 'Link teams', 'sportspress' ),
|
||||||
'id' => 'sportspress_link_teams',
|
'id' => 'sportspress_link_teams',
|
||||||
'default' => 'no',
|
'default' => 'no',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Venue', 'sportspress' ),
|
'title' => esc_attr__( 'Venue', 'sportspress' ),
|
||||||
'desc' => __( 'Link venues', 'sportspress' ),
|
'desc' => esc_attr__( 'Link venues', 'sportspress' ),
|
||||||
'id' => 'sportspress_team_link_venues',
|
'id' => 'sportspress_team_link_venues',
|
||||||
'default' => 'no',
|
'default' => 'no',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Visit Site', 'sportspress' ),
|
'title' => esc_attr__( 'Visit Site', 'sportspress' ),
|
||||||
'desc' => __( 'Open link in a new window/tab', 'sportspress' ),
|
'desc' => esc_attr__( 'Open link in a new window/tab', 'sportspress' ),
|
||||||
'id' => 'sportspress_team_site_target_blank',
|
'id' => 'sportspress_team_site_target_blank',
|
||||||
'default' => 'no',
|
'default' => 'no',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Comments', 'sportspress' ),
|
'title' => esc_attr__( 'Comments', 'sportspress' ),
|
||||||
'desc' => __( 'Allow people to post comments on Team page', 'sportspress' ),
|
'desc' => esc_attr__( 'Allow people to post comments on Team page', 'sportspress' ),
|
||||||
'id' => 'sportspress_team_comment_status',
|
'id' => 'sportspress_team_comment_status',
|
||||||
'default' => 'no',
|
'default' => 'no',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ if ( ! class_exists( 'SP_Settings_Text' ) ) :
|
|||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
$this->id = 'text';
|
$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_filter( 'sportspress_settings_tabs_array', array( $this, 'add_settings_page' ), 20 );
|
||||||
add_action( 'sportspress_settings_' . $this->id, array( $this, 'output' ) );
|
add_action( 'sportspress_settings_' . $this->id, array( $this, 'output' ) );
|
||||||
@@ -40,9 +40,9 @@ if ( ! class_exists( 'SP_Settings_Text' ) ) :
|
|||||||
|
|
||||||
$settings = array(
|
$settings = array(
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Text', 'sportspress' ),
|
'title' => esc_attr__( 'Text', 'sportspress' ),
|
||||||
'type' => 'title',
|
'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',
|
'id' => 'text_options',
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ $columns = get_option( 'sportspress_player_columns', 'auto' );
|
|||||||
|
|
||||||
<div class="wrap sportspress sportspress-config-wrap">
|
<div class="wrap sportspress sportspress-config-wrap">
|
||||||
<h2>
|
<h2>
|
||||||
<?php _e( 'Configure', 'sportspress' ); ?>
|
<?php esc_html_e( 'Configure', 'sportspress' ); ?>
|
||||||
</h2>
|
</h2>
|
||||||
<table class="form-table">
|
<table class="form-table">
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -20,18 +20,18 @@ $columns = get_option( 'sportspress_player_columns', 'auto' );
|
|||||||
?>
|
?>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<th scope="row" class="titledesc">
|
<th scope="row" class="titledesc">
|
||||||
<?php _e( 'Event Outcomes', 'sportspress' ); ?>
|
<?php esc_html_e( 'Event Outcomes', 'sportspress' ); ?>
|
||||||
<p class="description"><?php _e( 'Used for events.', 'sportspress' ); ?></p>
|
<p class="description"><?php esc_html_e( 'Used for events.', 'sportspress' ); ?></p>
|
||||||
</th>
|
</th>
|
||||||
<td class="forminp">
|
<td class="forminp">
|
||||||
<table class="widefat sp-admin-config-table">
|
<table class="widefat sp-admin-config-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
<th scope="col"><?php esc_html_e( 'Label', 'sportspress' ); ?></th>
|
||||||
<th scope="col"><?php _e( 'Variable', 'sportspress' ); ?></th>
|
<th scope="col"><?php esc_html_e( 'Variable', 'sportspress' ); ?></th>
|
||||||
<th scope="col"><?php _e( 'Abbreviation', 'sportspress' ); ?></th>
|
<th scope="col"><?php esc_html_e( 'Abbreviation', 'sportspress' ); ?></th>
|
||||||
<th scope="col"><?php _e( 'Condition', 'sportspress' ); ?></th>
|
<th scope="col"><?php esc_html_e( 'Condition', 'sportspress' ); ?></th>
|
||||||
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
<th scope="col"><?php esc_html_e( 'Description', 'sportspress' ); ?></th>
|
||||||
<th scope="col" class="edit"></th>
|
<th scope="col" class="edit"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</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_abbreviation( $row->ID ) ); ?></td>
|
||||||
<td><?php echo esc_html( sp_get_post_condition( $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><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>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$i++;
|
$i++;
|
||||||
endforeach; else :
|
endforeach; else :
|
||||||
?>
|
?>
|
||||||
<tr class="alternate">
|
<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>
|
</tr>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</table>
|
</table>
|
||||||
<div class="tablenav bottom">
|
<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 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 admin_url( 'post-new.php?post_type=sp_outcome' ); ?>"><?php _e( 'Add New', '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">
|
<br class="clear">
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -86,22 +86,22 @@ endforeach; else :
|
|||||||
?>
|
?>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<th scope="row" class="titledesc">
|
<th scope="row" class="titledesc">
|
||||||
<?php _e( 'Event Results', 'sportspress' ); ?>
|
<?php esc_html_e( 'Event Results', 'sportspress' ); ?>
|
||||||
<p class="description"><?php _e( 'Used for events.', 'sportspress' ); ?></p>
|
<p class="description"><?php esc_html_e( 'Used for events.', 'sportspress' ); ?></p>
|
||||||
</th>
|
</th>
|
||||||
<td class="forminp">
|
<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>
|
<form>
|
||||||
<?php wp_nonce_field( 'sp-save-primary-result', 'sp-primary-result-nonce', false ); ?>
|
<?php wp_nonce_field( 'sp-save-primary-result', 'sp-primary-result-nonce', false ); ?>
|
||||||
<table class="widefat sp-admin-config-table">
|
<table class="widefat sp-admin-config-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="radio" scope="col"><?php _e( 'Primary', 'sportspress' ); ?></th>
|
<th class="radio" scope="col"><?php esc_html_e( 'Primary', 'sportspress' ); ?></th>
|
||||||
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
<th scope="col"><?php esc_html_e( 'Label', 'sportspress' ); ?></th>
|
||||||
<th scope="col"><?php _e( 'Variables', 'sportspress' ); ?></th>
|
<th scope="col"><?php esc_html_e( 'Variables', 'sportspress' ); ?></th>
|
||||||
<th scope="col"><?php _e( 'Equation', 'sportspress' ); ?></th>
|
<th scope="col"><?php esc_html_e( 'Equation', 'sportspress' ); ?></th>
|
||||||
<th scope="col"><?php _e( 'Decimal Places', 'sportspress' ); ?></th>
|
<th scope="col"><?php esc_html_e( 'Decimal Places', 'sportspress' ); ?></th>
|
||||||
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
<th scope="col"><?php esc_html_e( 'Description', 'sportspress' ); ?></th>
|
||||||
<th scope="col" class="edit"></th>
|
<th scope="col" class="edit"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -113,9 +113,9 @@ endforeach; else :
|
|||||||
if ( sizeof( $data ) > 0 ) :
|
if ( sizeof( $data ) > 0 ) :
|
||||||
$default = end( $data );
|
$default = end( $data );
|
||||||
reset( $data );
|
reset( $data );
|
||||||
printf( __( 'Default (%s)', 'sportspress' ), $default->post_title );
|
printf( esc_html__( 'Default (%s)', 'sportspress' ), esc_html( $default->post_title ) );
|
||||||
else :
|
else :
|
||||||
_e( 'Default', 'sportspress' );
|
esc_attr_e( 'Default', 'sportspress' );
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
</label></th>
|
</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_equation( $row->ID ) ); ?></td>
|
||||||
<td><?php echo esc_html( sp_get_post_precision( $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><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>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$i++;
|
$i++;
|
||||||
endforeach; else :
|
endforeach; else :
|
||||||
?>
|
?>
|
||||||
<tr class="alternate">
|
<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>
|
</tr>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
<div class="tablenav bottom">
|
<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 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 admin_url( 'post-new.php?post_type=sp_result' ); ?>"><?php _e( 'Add New', '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">
|
<br class="clear">
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -179,29 +179,29 @@ endforeach; else :
|
|||||||
?>
|
?>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<th scope="row" class="titledesc">
|
<th scope="row" class="titledesc">
|
||||||
<?php _e( 'Player Performance', 'sportspress' ); ?>
|
<?php esc_html_e( 'Player Performance', 'sportspress' ); ?>
|
||||||
<p class="description"><?php _e( 'Used for events.', 'sportspress' ); ?></p>
|
<p class="description"><?php esc_html_e( 'Used for events.', 'sportspress' ); ?></p>
|
||||||
</th>
|
</th>
|
||||||
<td class="forminp">
|
<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>
|
<form>
|
||||||
<?php wp_nonce_field( 'sp-save-primary-performance', 'sp-primary-performance-nonce', false ); ?>
|
<?php wp_nonce_field( 'sp-save-primary-performance', 'sp-primary-performance-nonce', false ); ?>
|
||||||
<table class="widefat sp-admin-config-table">
|
<table class="widefat sp-admin-config-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="radio" scope="col"><?php _e( 'Primary', 'sportspress' ); ?></th>
|
<th class="radio" scope="col"><?php esc_html_e( 'Primary', 'sportspress' ); ?></th>
|
||||||
<th class="icon" scope="col"><?php _e( 'Icon', 'sportspress' ); ?></th>
|
<th class="icon" scope="col"><?php esc_html_e( 'Icon', 'sportspress' ); ?></th>
|
||||||
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
<th scope="col"><?php esc_html_e( 'Label', 'sportspress' ); ?></th>
|
||||||
<th scope="col"><?php _e( 'Variable', 'sportspress' ); ?></th>
|
<th scope="col"><?php esc_html_e( 'Variable', 'sportspress' ); ?></th>
|
||||||
<th scope="col"><?php _e( 'Category', 'sportspress' ); ?></th>
|
<th scope="col"><?php esc_html_e( 'Category', 'sportspress' ); ?></th>
|
||||||
<th scope="col"><?php _e( 'Format', 'sportspress' ); ?></th>
|
<th scope="col"><?php esc_html_e( 'Format', 'sportspress' ); ?></th>
|
||||||
<?php if ( 'auto' === $columns ) { ?>
|
<?php if ( 'auto' === $columns ) { ?>
|
||||||
<th scope="col">
|
<th scope="col">
|
||||||
<?php _e( 'Visible', 'sportspress' ); ?>
|
<?php esc_html_e( 'Visible', 'sportspress' ); ?>
|
||||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php _e( 'Display in player profile?', 'sportspress' ); ?>"></i>
|
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php esc_html_e( 'Display in player profile?', 'sportspress' ); ?>"></i>
|
||||||
</th>
|
</th>
|
||||||
<?php } ?>
|
<?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>
|
<th scope="col" class="edit"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -209,13 +209,13 @@ endforeach; else :
|
|||||||
<tr>
|
<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="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 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
|
<?php
|
||||||
if ( sizeof( $data ) > 0 ) :
|
if ( sizeof( $data ) > 0 ) :
|
||||||
$default = reset( $data );
|
$default = reset( $data );
|
||||||
printf( __( 'Default (%s)', 'sportspress' ), $default->post_title );
|
printf( esc_html__( 'Default (%s)', 'sportspress' ), esc_html( $default->post_title ) );
|
||||||
else :
|
else :
|
||||||
_e( 'Default', 'sportspress' );
|
esc_attr_e( 'Default', 'sportspress' );
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
</label></th>
|
</label></th>
|
||||||
@@ -246,7 +246,7 @@ endforeach; else :
|
|||||||
$icon = ' ';
|
$icon = ' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo apply_filters( 'sportspress_performance_icon', $icon, $row->ID );
|
echo wp_kses_post( apply_filters( 'sportspress_performance_icon', $icon, $row->ID ) );
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td class="row-title"><?php echo esc_html( $row->post_title ); ?></td>
|
<td class="row-title"><?php echo esc_html( $row->post_title ); ?></td>
|
||||||
@@ -266,21 +266,21 @@ endforeach; else :
|
|||||||
</td>
|
</td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<td><p class="description"><?php echo wp_kses_post( $row->post_excerpt ); ?></p></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>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$i++;
|
$i++;
|
||||||
endforeach; else :
|
endforeach; else :
|
||||||
?>
|
?>
|
||||||
<tr class="alternate">
|
<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>
|
</tr>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
<div class="tablenav bottom">
|
<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 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 admin_url( 'post-new.php?post_type=sp_performance' ); ?>"><?php _e( 'Add New', '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">
|
<br class="clear">
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -301,18 +301,18 @@ endforeach; else :
|
|||||||
?>
|
?>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<th scope="row" class="titledesc">
|
<th scope="row" class="titledesc">
|
||||||
<?php _e( 'Table Columns', 'sportspress' ); ?>
|
<?php esc_html_e( 'Table Columns', 'sportspress' ); ?>
|
||||||
<p class="description"><?php _e( 'Used for league tables.', 'sportspress' ); ?></p>
|
<p class="description"><?php esc_html_e( 'Used for league tables.', 'sportspress' ); ?></p>
|
||||||
</th>
|
</th>
|
||||||
<td class="forminp">
|
<td class="forminp">
|
||||||
<table class="widefat sp-admin-config-table">
|
<table class="widefat sp-admin-config-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
<th scope="col"><?php esc_html_e( 'Label', 'sportspress' ); ?></th>
|
||||||
<th scope="col"><?php _e( 'Equation', 'sportspress' ); ?></th>
|
<th scope="col"><?php esc_html_e( 'Equation', 'sportspress' ); ?></th>
|
||||||
<th scope="col"><?php _e( 'Decimal Places', 'sportspress' ); ?></th>
|
<th scope="col"><?php esc_html_e( 'Decimal Places', 'sportspress' ); ?></th>
|
||||||
<th scope="col"><?php _e( 'Sort Order', 'sportspress' ); ?></th>
|
<th scope="col"><?php esc_html_e( 'Sort Order', 'sportspress' ); ?></th>
|
||||||
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
<th scope="col"><?php esc_html_e( 'Description', 'sportspress' ); ?></th>
|
||||||
<th scope="col" class="edit"></th>
|
<th scope="col" class="edit"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</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_precision( $row->ID ) ); ?></td>
|
||||||
<td><?php echo esc_html( sp_get_post_order( $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><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>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$i++;
|
$i++;
|
||||||
endforeach; else :
|
endforeach; else :
|
||||||
?>
|
?>
|
||||||
<tr class="alternate">
|
<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>
|
</tr>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</table>
|
</table>
|
||||||
<div class="tablenav bottom">
|
<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 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 admin_url( 'post-new.php?post_type=sp_column' ); ?>"><?php _e( 'Add New', '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">
|
<br class="clear">
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@@ -366,16 +366,16 @@ endforeach; else :
|
|||||||
?>
|
?>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<th scope="row" class="titledesc">
|
<th scope="row" class="titledesc">
|
||||||
<?php _e( 'Player Metrics', 'sportspress' ); ?>
|
<?php esc_html_e( 'Player Metrics', 'sportspress' ); ?>
|
||||||
<p class="description"><?php _e( 'Used for player lists.', 'sportspress' ); ?></p>
|
<p class="description"><?php esc_html_e( 'Used for player lists.', 'sportspress' ); ?></p>
|
||||||
</th>
|
</th>
|
||||||
<td class="forminp">
|
<td class="forminp">
|
||||||
<table class="widefat sp-admin-config-table">
|
<table class="widefat sp-admin-config-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
<th scope="col"><?php esc_html_e( 'Label', 'sportspress' ); ?></th>
|
||||||
<th scope="col"><?php _e( 'Variable', 'sportspress' ); ?></th>
|
<th scope="col"><?php esc_html_e( 'Variable', 'sportspress' ); ?></th>
|
||||||
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
<th scope="col"><?php esc_html_e( 'Description', 'sportspress' ); ?></th>
|
||||||
<th scope="col" class="edit"></th>
|
<th scope="col" class="edit"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -392,20 +392,20 @@ endforeach; else :
|
|||||||
<td class="row-title"><?php echo esc_html( $row->post_title ); ?></td>
|
<td class="row-title"><?php echo esc_html( $row->post_title ); ?></td>
|
||||||
<td><code><?php echo esc_html( $row->post_name ); ?></code></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><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>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$i++;
|
$i++;
|
||||||
endforeach; else :
|
endforeach; else :
|
||||||
?>
|
?>
|
||||||
<tr class="alternate">
|
<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>
|
</tr>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</table>
|
</table>
|
||||||
<div class="tablenav bottom">
|
<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 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 admin_url( 'post-new.php?post_type=sp_metric' ); ?>"><?php _e( 'Add New', '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">
|
<br class="clear">
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -432,25 +432,25 @@ endforeach; else :
|
|||||||
?>
|
?>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<th scope="row" class="titledesc">
|
<th scope="row" class="titledesc">
|
||||||
<?php _e( 'Player Statistics', 'sportspress' ); ?>
|
<?php esc_html_e( 'Player Statistics', 'sportspress' ); ?>
|
||||||
<p class="description"><?php _e( 'Used for player lists.', 'sportspress' ); ?></p>
|
<p class="description"><?php esc_html_e( 'Used for player lists.', 'sportspress' ); ?></p>
|
||||||
</th>
|
</th>
|
||||||
<td class="forminp">
|
<td class="forminp">
|
||||||
<table class="widefat sp-admin-config-table">
|
<table class="widefat sp-admin-config-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
<th scope="col"><?php esc_html_e( 'Label', 'sportspress' ); ?></th>
|
||||||
<th class="icon" scope="col"><?php _e( 'Icon', 'sportspress' ); ?></th>
|
<th class="icon" scope="col"><?php esc_html_e( 'Icon', 'sportspress' ); ?></th>
|
||||||
<th scope="col"><?php _e( 'Equation', 'sportspress' ); ?></th>
|
<th scope="col"><?php esc_html_e( 'Equation', 'sportspress' ); ?></th>
|
||||||
<th scope="col"><?php _e( 'Decimal Places', 'sportspress' ); ?></th>
|
<th scope="col"><?php esc_html_e( 'Decimal Places', 'sportspress' ); ?></th>
|
||||||
<th scope="col"><?php _e( 'Category', 'sportspress' ); ?></th>
|
<th scope="col"><?php esc_html_e( 'Category', 'sportspress' ); ?></th>
|
||||||
<?php if ( 'auto' === $columns ) { ?>
|
<?php if ( 'auto' === $columns ) { ?>
|
||||||
<th scope="col">
|
<th scope="col">
|
||||||
<?php _e( 'Visible', 'sportspress' ); ?>
|
<?php esc_html_e( 'Visible', 'sportspress' ); ?>
|
||||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php _e( 'Display in player profile?', 'sportspress' ); ?>"></i>
|
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php esc_html_e( 'Display in player profile?', 'sportspress' ); ?>"></i>
|
||||||
</th>
|
</th>
|
||||||
<?php } ?>
|
<?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>
|
<th scope="col" class="edit"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -479,7 +479,7 @@ endforeach; else :
|
|||||||
$icon = ' ';
|
$icon = ' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo apply_filters( 'sportspress_performance_icon', $icon, $row->ID );
|
echo wp_kses_post( apply_filters( 'sportspress_performance_icon', $icon, $row->ID ) );
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td><?php echo wp_kses_post( sp_get_post_equation( $row->ID ) ); ?></td>
|
<td><?php echo wp_kses_post( sp_get_post_equation( $row->ID ) ); ?></td>
|
||||||
@@ -498,20 +498,20 @@ endforeach; else :
|
|||||||
</td>
|
</td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<td><p class="description"><?php echo wp_kses_post( $row->post_excerpt ); ?></p></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>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$i++;
|
$i++;
|
||||||
endforeach; else :
|
endforeach; else :
|
||||||
?>
|
?>
|
||||||
<tr class="alternate">
|
<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>
|
</tr>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</table>
|
</table>
|
||||||
<div class="tablenav bottom">
|
<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 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 admin_url( 'post-new.php?post_type=sp_statistic' ); ?>"><?php _e( 'Add New', '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">
|
<br class="clear">
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<div class="wrap sportspress">
|
<div class="wrap sportspress">
|
||||||
<h2><?php _e( 'System Status', 'sportspress' ); ?></h2>
|
<h2><?php esc_attr_e( 'System Status', 'sportspress' ); ?></h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="updated sportspress-message">
|
<div class="updated sportspress-message">
|
||||||
<p><?php _e( 'Please include this information when requesting support:', 'sportspress' ); ?> </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 _e( 'Get System Report', 'sportspress' ); ?></a></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 id="debug-report"><textarea readonly="readonly"></textarea></div>
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
<br/>
|
||||||
@@ -11,45 +11,45 @@
|
|||||||
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2"><?php _e( 'Environment', 'sportspress' ); ?></th>
|
<th colspan="2"><?php esc_attr_e( 'Environment', 'sportspress' ); ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'Home URL', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'Home URL', 'sportspress' ); ?>:</td>
|
||||||
<td><?php echo home_url(); ?></td>
|
<td><?php echo esc_url( home_url() ); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'Site URL', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'Site URL', 'sportspress' ); ?>:</td>
|
||||||
<td><?php echo site_url(); ?></td>
|
<td><?php echo esc_url( site_url() ); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td><?php echo esc_html( SP()->version ); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'WP Version', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'WP Version', 'sportspress' ); ?>:</td>
|
||||||
<td><?php bloginfo( 'version' ); ?></td>
|
<td><?php bloginfo( 'version' ); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'WP Multisite Enabled', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'WP Multisite Enabled', 'sportspress' ); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
if ( is_multisite() ) {
|
if ( is_multisite() ) {
|
||||||
_e( 'Yes', 'sportspress' );
|
esc_attr_e( 'Yes', 'sportspress' );
|
||||||
} else {
|
} else {
|
||||||
_e( 'No', 'sportspress' );
|
esc_attr_e( 'No', 'sportspress' );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td><?php echo esc_html( $_SERVER['SERVER_SOFTWARE'] ); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'PHP Version', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'PHP Version', 'sportspress' ); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
if ( function_exists( 'phpversion' ) ) {
|
if ( function_exists( 'phpversion' ) ) {
|
||||||
@@ -58,74 +58,74 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'WP Memory Limit', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'WP Memory Limit', 'sportspress' ); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$memory = sp_let_to_num( WP_MEMORY_LIMIT );
|
$memory = sp_let_to_num( WP_MEMORY_LIMIT );
|
||||||
|
|
||||||
if ( $memory < 67108864 ) {
|
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 {
|
} else {
|
||||||
echo '<mark class="yes">' . size_format( $memory ) . '</mark>';
|
echo '<mark class="yes">' . esc_html( size_format( $memory ) ) . '</mark>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'WP Debug Mode', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'WP Debug Mode', 'sportspress' ); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
|
if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
|
||||||
echo '<mark class="yes">' . __( 'Yes', 'sportspress' ) . '</mark>';
|
echo '<mark class="yes">' . esc_html__( 'Yes', 'sportspress' ) . '</mark>';
|
||||||
} else {
|
} else {
|
||||||
echo '<mark class="no">' . __( 'No', 'sportspress' ) . '</mark>';
|
echo '<mark class="no">' . esc_html__( 'No', 'sportspress' ) . '</mark>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'WP Language', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'WP Language', 'sportspress' ); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
if ( defined( 'WPLANG' ) && WPLANG ) {
|
if ( defined( 'WPLANG' ) && WPLANG ) {
|
||||||
echo WPLANG;
|
echo esc_html( WPLANG );
|
||||||
} else {
|
} else {
|
||||||
_e( 'Default', 'sportspress' );
|
esc_html_e( 'Default', 'sportspress' );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'WP Max Upload Size', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'WP Max Upload Size', 'sportspress' ); ?>:</td>
|
||||||
<td><?php echo size_format( wp_max_upload_size() ); ?></td>
|
<td><?php echo esc_html( size_format( wp_max_upload_size() ) ); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php if ( function_exists( 'ini_get' ) ) : ?>
|
<?php if ( function_exists( 'ini_get' ) ) : ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'PHP Post Max Size', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'PHP Post Max Size', 'sportspress' ); ?>:</td>
|
||||||
<td><?php echo size_format( sp_let_to_num( ini_get( 'post_max_size' ) ) ); ?></td>
|
<td><?php echo esc_html( size_format( sp_let_to_num( ini_get( 'post_max_size' ) ) ) ); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'PHP Time Limit', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'PHP Time Limit', 'sportspress' ); ?>:</td>
|
||||||
<td><?php echo ini_get( 'max_execution_time' ); ?></td>
|
<td><?php echo esc_html( ini_get( 'max_execution_time' ) ); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'PHP Max Input Vars', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'PHP Max Input Vars', 'sportspress' ); ?>:</td>
|
||||||
<td><?php echo ini_get( 'max_input_vars' ); ?></td>
|
<td><?php echo esc_html( ini_get( 'max_input_vars' ) ); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'SUHOSIN Installed', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'SUHOSIN Installed', 'sportspress' ); ?>:</td>
|
||||||
<td><?php echo extension_loaded( 'suhosin' ) ? __( 'Yes', 'sportspress' ) : __( 'No', 'sportspress' ); ?></td>
|
<td><?php echo extension_loaded( 'suhosin' ) ? esc_html__( 'Yes', 'sportspress' ) : esc_html__( 'No', 'sportspress' ); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'Default Timezone', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'Default Timezone', 'sportspress' ); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$default_timezone = date_default_timezone_get();
|
$default_timezone = date_default_timezone_get();
|
||||||
if ( 'UTC' !== $default_timezone ) {
|
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 {
|
} 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>
|
</td>
|
||||||
@@ -134,28 +134,28 @@
|
|||||||
$posting = array();
|
$posting = array();
|
||||||
|
|
||||||
// fsockopen/cURL
|
// 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' ) ) {
|
||||||
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' ) ) {
|
} 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 {
|
} 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;
|
$posting['fsockopen_curl']['success'] = true;
|
||||||
} else {
|
} 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;
|
$posting['fsockopen_curl']['success'] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// SOAP
|
// SOAP
|
||||||
$posting['soap_client']['name'] = __( 'SOAP Client', 'sportspress' );
|
$posting['soap_client']['name'] = esc_attr__( 'SOAP Client', 'sportspress' );
|
||||||
if ( class_exists( 'SoapClient' ) ) {
|
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;
|
$posting['soap_client']['success'] = true;
|
||||||
} else {
|
} 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;
|
$posting['soap_client']['success'] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,7 +167,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td><?php echo esc_html( $post['name'] ); ?>:</td>
|
<td><?php echo esc_html( $post['name'] ); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<mark class="<?php echo $mark; ?>">
|
<mark class="<?php echo esc_attr( $mark ); ?>">
|
||||||
<?php echo wp_kses_data( $post['note'] ); ?>
|
<?php echo wp_kses_data( $post['note'] ); ?>
|
||||||
</mark>
|
</mark>
|
||||||
</td>
|
</td>
|
||||||
@@ -179,13 +179,13 @@
|
|||||||
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2"><?php _e( 'Plugins', 'sportspress' ); ?></th>
|
<th colspan="2"><?php esc_attr_e( 'Plugins', 'sportspress' ); ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'Installed Plugins', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'Installed Plugins', 'sportspress' ); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$active_plugins = (array) get_option( 'active_plugins', array() );
|
$active_plugins = (array) get_option( 'active_plugins', array() );
|
||||||
@@ -207,7 +207,7 @@
|
|||||||
// link the plugin name to the plugin url if available
|
// link the plugin name to the plugin url if available
|
||||||
$plugin_name = $plugin_data['Name'];
|
$plugin_name = $plugin_data['Name'];
|
||||||
if ( ! empty( $plugin_data['PluginURI'] ) ) {
|
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' ) ) {
|
if ( strstr( $dirname, 'sportspress' ) ) {
|
||||||
@@ -236,11 +236,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty( $version_data['version'] ) && version_compare( $version_data['version'], $plugin_data['Version'], '>' ) ) {
|
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 ) {
|
if ( sizeof( $sp_plugins ) == 0 ) {
|
||||||
echo '-';
|
echo '-';
|
||||||
} else {
|
} else {
|
||||||
echo implode( ', <br/>', $sp_plugins );
|
echo wp_kses_post( implode( ', <br/>', $sp_plugins ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -258,17 +258,17 @@
|
|||||||
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2"><?php _e( 'SP Configuration', 'sportspress' ); ?></th>
|
<th colspan="2"><?php esc_attr_e( 'SP Configuration', 'sportspress' ); ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'Sport', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'Sport', 'sportspress' ); ?>:</td>
|
||||||
<td><?php echo get_option( 'sportspress_sport', __( 'None', 'sportspress' ) ); ?></td>
|
<td><?php echo esc_html( get_option( 'sportspress_sport', esc_attr__( 'None', 'sportspress' ) ) ); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'Event Outcomes', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'Event Outcomes', 'sportspress' ); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$display_posts = array();
|
$display_posts = array();
|
||||||
@@ -289,7 +289,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'Event Results', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'Event Results', 'sportspress' ); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$display_posts = array();
|
$display_posts = array();
|
||||||
@@ -310,7 +310,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'Player Performance', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'Player Performance', 'sportspress' ); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$display_posts = array();
|
$display_posts = array();
|
||||||
@@ -331,7 +331,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'Table Columns', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'Table Columns', 'sportspress' ); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$display_posts = array();
|
$display_posts = array();
|
||||||
@@ -352,7 +352,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'Player Metrics', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'Player Metrics', 'sportspress' ); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$display_posts = array();
|
$display_posts = array();
|
||||||
@@ -373,7 +373,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'Player Statistics', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'Player Statistics', 'sportspress' ); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$display_posts = array();
|
$display_posts = array();
|
||||||
@@ -397,13 +397,13 @@
|
|||||||
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2"><?php _e( 'SP Taxonomies', 'sportspress' ); ?></th>
|
<th colspan="2"><?php esc_attr_e( 'SP Taxonomies', 'sportspress' ); ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'Leagues', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'Leagues', 'sportspress' ); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$display_terms = array();
|
$display_terms = array();
|
||||||
@@ -416,7 +416,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'Seasons', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'Seasons', 'sportspress' ); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$display_terms = array();
|
$display_terms = array();
|
||||||
@@ -429,7 +429,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'Venues', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'Venues', 'sportspress' ); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$display_terms = array();
|
$display_terms = array();
|
||||||
@@ -442,7 +442,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'Positions', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'Positions', 'sportspress' ); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$display_terms = array();
|
$display_terms = array();
|
||||||
@@ -458,7 +458,7 @@
|
|||||||
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2"><?php _e( 'SP Post Types', 'sportspress' ); ?></th>
|
<th colspan="2"><?php esc_attr_e( 'SP Post Types', 'sportspress' ); ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
@@ -477,7 +477,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?php $count = wp_count_posts( $post_type ); ?>
|
<?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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
@@ -485,7 +485,7 @@
|
|||||||
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2"><?php _e( 'Theme', 'sportspress' ); ?></th>
|
<th colspan="2"><?php esc_attr_e( 'Theme', 'sportspress' ); ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
@@ -527,7 +527,7 @@
|
|||||||
?>
|
?>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'Theme Name', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'Theme Name', 'sportspress' ); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
echo esc_html( $active_theme->Name );
|
echo esc_html( $active_theme->Name );
|
||||||
@@ -535,19 +535,19 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'Theme Version', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'Theme Version', 'sportspress' ); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?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, '!=' ) ) {
|
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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php _e( 'Author URL', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'Author URL', 'sportspress' ); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
echo esc_url( $active_theme->{'Author URI'} );
|
echo esc_url( $active_theme->{'Author URI'} );
|
||||||
@@ -558,7 +558,7 @@
|
|||||||
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2"><?php _e( 'Templates', 'sportspress' ); ?></th>
|
<th colspan="2"><?php esc_attr_e( 'Templates', 'sportspress' ); ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
@@ -592,7 +592,7 @@
|
|||||||
$theme_version = $this->get_file_version( $theme_file );
|
$theme_version = $this->get_file_version( $theme_file );
|
||||||
|
|
||||||
if ( $core_version && ( empty( $theme_version ) || version_compare( $theme_version, $core_version, '<' ) ) ) {
|
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 {
|
} else {
|
||||||
$found_files[ $plugin_name ][] = sprintf( '<code>%s</code>', basename( $theme_file ) );
|
$found_files[ $plugin_name ][] = sprintf( '<code>%s</code>', basename( $theme_file ) );
|
||||||
}
|
}
|
||||||
@@ -603,14 +603,14 @@
|
|||||||
if ( $found_files ) {
|
if ( $found_files ) {
|
||||||
foreach ( $found_files as $plugin_name => $found_plugin_files ) {
|
foreach ( $found_files as $plugin_name => $found_plugin_files ) {
|
||||||
?>
|
?>
|
||||||
<td><?php _e( 'Template Overrides', 'sportspress' ); ?> (<?php echo $plugin_name; ?>):</td>
|
<td><?php esc_attr_e( 'Template Overrides', 'sportspress' ); ?> (<?php echo esc_html( $plugin_name ); ?>):</td>
|
||||||
<td><?php echo implode( ', <br/>', $found_plugin_files ); ?></td>
|
<td><?php echo wp_kses_post( implode( ', <br/>', $found_plugin_files ) ); ?></td>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
<td><?php _e( 'Template Overrides', 'sportspress' ); ?>:</td>
|
<td><?php esc_attr_e( 'Template Overrides', 'sportspress' ); ?>:</td>
|
||||||
<td><?php _e( 'No overrides present in theme.', 'sportspress' ); ?></td>
|
<td><?php esc_attr_e( 'No overrides present in theme.', 'sportspress' ); ?></td>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<div class="wrap sportspress">
|
<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">
|
<form method="post" id="mainform" action="" enctype="multipart/form-data">
|
||||||
<h2 class="nav-tab-wrapper sp-nav-tab-wrapper">
|
<h2 class="nav-tab-wrapper sp-nav-tab-wrapper">
|
||||||
<?php
|
<?php
|
||||||
foreach ( $tabs as $name => $label ) :
|
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' ); ?>
|
<?php do_action( 'sportspress_settings_tabs' ); ?>
|
||||||
</h2>
|
</h2>
|
||||||
<?php
|
<?php
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
?>
|
?>
|
||||||
<p class="submit">
|
<p class="submit">
|
||||||
<?php if ( ! isset( $GLOBALS['hide_save_button'] ) ) : ?>
|
<?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; ?>
|
<?php endif; ?>
|
||||||
<input type="hidden" name="subtab" id="last_tab" />
|
<input type="hidden" name="subtab" id="last_tab" />
|
||||||
<?php wp_nonce_field( 'sportspress-settings' ); ?>
|
<?php wp_nonce_field( 'sportspress-settings' ); ?>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div id="message" class="updated sportspress-message">
|
<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">
|
<p class="submit">
|
||||||
<a class="button-primary" href="
|
<a class="button-primary" href="
|
||||||
<?php
|
<?php
|
||||||
@@ -20,7 +20,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
"><?php _e( 'Run the Setup Wizard', 'sportspress' ); ?></a>
|
"><?php esc_attr_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>
|
<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>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,5 +4,5 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div id="message" class="error">
|
<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>
|
</div>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div id="message" class="updated sportspress-message wc-connect">
|
<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="
|
<p class="submit"><a class="button-primary" href="
|
||||||
<?php
|
<?php
|
||||||
echo esc_url(
|
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>
|
</div>
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div id="message" class="error sportspress-message">
|
<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 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 _e( 'Have you tried the free Rookie theme yet?', 'sportspress' ); ?></p>
|
<p><?php esc_attr_e( 'Have you tried the free Rookie theme yet?', 'sportspress' ); ?></p>
|
||||||
<p class="submit">
|
<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-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 _e( 'Theme Integration Guide', '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 add_query_arg( 'hide_theme_support_notice', 'true' ); ?>"><?php _e( 'Hide this notice', '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>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Teams', 'sportspress' ),
|
'description' => esc_attr__( 'Teams', 'sportspress' ),
|
||||||
'type' => 'array',
|
'type' => 'array',
|
||||||
'context' => array( 'view', 'edit', 'embed' ),
|
'context' => array( 'view', 'edit', 'embed' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -86,7 +86,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
array(
|
array(
|
||||||
'get_callback' => 'SP_REST_API::get_post_data',
|
'get_callback' => 'SP_REST_API::get_post_data',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Main Results', 'sportspress' ),
|
'description' => esc_attr__( 'Main Results', 'sportspress' ),
|
||||||
'type' => 'array',
|
'type' => 'array',
|
||||||
'context' => array( 'view', 'embed' ),
|
'context' => array( 'view', 'embed' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -102,7 +102,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
array(
|
array(
|
||||||
'get_callback' => 'SP_REST_API::get_post_data',
|
'get_callback' => 'SP_REST_API::get_post_data',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Outcome', 'sportspress' ),
|
'description' => esc_attr__( 'Outcome', 'sportspress' ),
|
||||||
'type' => 'array',
|
'type' => 'array',
|
||||||
'context' => array( 'view', 'embed' ),
|
'context' => array( 'view', 'embed' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -118,7 +118,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
array(
|
array(
|
||||||
'get_callback' => 'SP_REST_API::get_post_data',
|
'get_callback' => 'SP_REST_API::get_post_data',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Winner', 'sportspress' ),
|
'description' => esc_attr__( 'Winner', 'sportspress' ),
|
||||||
'type' => 'integer',
|
'type' => 'integer',
|
||||||
'context' => array( 'view', 'embed' ),
|
'context' => array( 'view', 'embed' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -135,7 +135,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
'get_callback' => 'SP_REST_API::get_post_data',
|
'get_callback' => 'SP_REST_API::get_post_data',
|
||||||
'update_callback' => 'SP_REST_API::update_post_meta',
|
'update_callback' => 'SP_REST_API::update_post_meta',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Format', 'sportspress' ),
|
'description' => esc_attr__( 'Format', 'sportspress' ),
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'context' => array( 'view', 'edit', 'embed' ),
|
'context' => array( 'view', 'edit', 'embed' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -152,7 +152,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
'get_callback' => 'SP_REST_API::get_post_data',
|
'get_callback' => 'SP_REST_API::get_post_data',
|
||||||
'update_callback' => 'SP_REST_API::update_post_meta',
|
'update_callback' => 'SP_REST_API::update_post_meta',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Mode', 'sportspress' ),
|
'description' => esc_attr__( 'Mode', 'sportspress' ),
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'context' => array( 'view', 'edit', 'embed' ),
|
'context' => array( 'view', 'edit', 'embed' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -169,7 +169,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
'get_callback' => 'SP_REST_API::get_post_data',
|
'get_callback' => 'SP_REST_API::get_post_data',
|
||||||
'update_callback' => 'SP_REST_API::update_post_meta',
|
'update_callback' => 'SP_REST_API::update_post_meta',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Match Day', 'sportspress' ),
|
'description' => esc_attr__( 'Match Day', 'sportspress' ),
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'context' => array( 'view', 'edit', 'embed' ),
|
'context' => array( 'view', 'edit', 'embed' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -186,7 +186,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
'get_callback' => 'SP_REST_API::get_post_data',
|
'get_callback' => 'SP_REST_API::get_post_data',
|
||||||
'update_callback' => 'SP_REST_API::update_post_meta',
|
'update_callback' => 'SP_REST_API::update_post_meta',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Full Time', 'sportspress' ),
|
'description' => esc_attr__( 'Full Time', 'sportspress' ),
|
||||||
'type' => 'integer',
|
'type' => 'integer',
|
||||||
'context' => array( 'view', 'edit', 'embed' ),
|
'context' => array( 'view', 'edit', 'embed' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -203,7 +203,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Players', 'sportspress' ),
|
'description' => esc_attr__( 'Players', 'sportspress' ),
|
||||||
'type' => 'array',
|
'type' => 'array',
|
||||||
'context' => array( 'view', 'edit' ),
|
'context' => array( 'view', 'edit' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -220,7 +220,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Offense', 'sportspress' ),
|
'description' => esc_attr__( 'Offense', 'sportspress' ),
|
||||||
'type' => 'array',
|
'type' => 'array',
|
||||||
'context' => array( 'view', 'edit' ),
|
'context' => array( 'view', 'edit' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -237,7 +237,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Defense', 'sportspress' ),
|
'description' => esc_attr__( 'Defense', 'sportspress' ),
|
||||||
'type' => 'array',
|
'type' => 'array',
|
||||||
'context' => array( 'view', 'edit' ),
|
'context' => array( 'view', 'edit' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -254,7 +254,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Staff', 'sportspress' ),
|
'description' => esc_attr__( 'Staff', 'sportspress' ),
|
||||||
'type' => 'array',
|
'type' => 'array',
|
||||||
'context' => array( 'view', 'edit' ),
|
'context' => array( 'view', 'edit' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -271,7 +271,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
'get_callback' => 'SP_REST_API::get_post_data',
|
'get_callback' => 'SP_REST_API::get_post_data',
|
||||||
'update_callback' => 'SP_REST_API::update_post_meta_arrays',
|
'update_callback' => 'SP_REST_API::update_post_meta_arrays',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Results', 'sportspress' ),
|
'description' => esc_attr__( 'Results', 'sportspress' ),
|
||||||
'type' => 'object',
|
'type' => 'object',
|
||||||
'context' => array( 'view', 'edit' ),
|
'context' => array( 'view', 'edit' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -288,7 +288,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
'get_callback' => 'SP_REST_API::get_post_data',
|
'get_callback' => 'SP_REST_API::get_post_data',
|
||||||
'update_callback' => 'SP_REST_API::update_post_meta_arrays_multi',
|
'update_callback' => 'SP_REST_API::update_post_meta_arrays_multi',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Box Score', 'sportspress' ),
|
'description' => esc_attr__( 'Box Score', 'sportspress' ),
|
||||||
'type' => 'object',
|
'type' => 'object',
|
||||||
'context' => array( 'view', 'edit' ),
|
'context' => array( 'view', 'edit' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -305,7 +305,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Staff', 'sportspress' ),
|
'description' => esc_attr__( 'Staff', 'sportspress' ),
|
||||||
'type' => 'array',
|
'type' => 'array',
|
||||||
'context' => array( 'view', 'edit' ),
|
'context' => array( 'view', 'edit' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -322,7 +322,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'League Tables', 'sportspress' ),
|
'description' => esc_attr__( 'League Tables', 'sportspress' ),
|
||||||
'type' => 'array',
|
'type' => 'array',
|
||||||
'context' => array( 'view', 'edit' ),
|
'context' => array( 'view', 'edit' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -339,7 +339,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Player Lists', 'sportspress' ),
|
'description' => esc_attr__( 'Player Lists', 'sportspress' ),
|
||||||
'type' => 'array',
|
'type' => 'array',
|
||||||
'context' => array( 'view', 'edit' ),
|
'context' => array( 'view', 'edit' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -355,7 +355,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
array(
|
array(
|
||||||
'get_callback' => 'SP_REST_API::get_post_ids_with_meta',
|
'get_callback' => 'SP_REST_API::get_post_ids_with_meta',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Events', 'sportspress' ),
|
'description' => esc_attr__( 'Events', 'sportspress' ),
|
||||||
'type' => 'array',
|
'type' => 'array',
|
||||||
'context' => array( 'view' ),
|
'context' => array( 'view' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -372,7 +372,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
'get_callback' => 'SP_REST_API::get_post_meta',
|
'get_callback' => 'SP_REST_API::get_post_meta',
|
||||||
'update_callback' => 'SP_REST_API::update_post_meta',
|
'update_callback' => 'SP_REST_API::update_post_meta',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Abbreviation', 'sportspress' ),
|
'description' => esc_attr__( 'Abbreviation', 'sportspress' ),
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'context' => array( 'view', 'edit', 'embed' ),
|
'context' => array( 'view', 'edit', 'embed' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -389,7 +389,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
'get_callback' => 'SP_REST_API::get_post_meta',
|
'get_callback' => 'SP_REST_API::get_post_meta',
|
||||||
'update_callback' => 'SP_REST_API::update_post_meta',
|
'update_callback' => 'SP_REST_API::update_post_meta',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Site URL', 'sportspress' ),
|
'description' => esc_attr__( 'Site URL', 'sportspress' ),
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'context' => array( 'view', 'edit', 'embed' ),
|
'context' => array( 'view', 'edit', 'embed' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -406,7 +406,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
'get_callback' => 'SP_REST_API::get_post_meta',
|
'get_callback' => 'SP_REST_API::get_post_meta',
|
||||||
'update_callback' => 'SP_REST_API::update_post_meta',
|
'update_callback' => 'SP_REST_API::update_post_meta',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Squad Number', 'sportspress' ),
|
'description' => esc_attr__( 'Squad Number', 'sportspress' ),
|
||||||
'type' => 'integer',
|
'type' => 'integer',
|
||||||
'context' => array( 'view', 'edit', 'embed' ),
|
'context' => array( 'view', 'edit', 'embed' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -423,7 +423,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Teams', 'sportspress' ),
|
'description' => esc_attr__( 'Teams', 'sportspress' ),
|
||||||
'type' => 'array',
|
'type' => 'array',
|
||||||
'context' => array( 'view', 'edit' ),
|
'context' => array( 'view', 'edit' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -440,7 +440,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Current Teams', 'sportspress' ),
|
'description' => esc_attr__( 'Current Teams', 'sportspress' ),
|
||||||
'type' => 'array',
|
'type' => 'array',
|
||||||
'context' => array( 'view', 'edit' ),
|
'context' => array( 'view', 'edit' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -457,7 +457,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Past Teams', 'sportspress' ),
|
'description' => esc_attr__( 'Past Teams', 'sportspress' ),
|
||||||
'type' => 'array',
|
'type' => 'array',
|
||||||
'context' => array( 'view', 'edit' ),
|
'context' => array( 'view', 'edit' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -474,7 +474,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
'get_callback' => 'SP_REST_API::get_post_data',
|
'get_callback' => 'SP_REST_API::get_post_data',
|
||||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Nationalities', 'sportspress' ),
|
'description' => esc_attr__( 'Nationalities', 'sportspress' ),
|
||||||
'type' => 'array',
|
'type' => 'array',
|
||||||
'context' => array( 'view', 'embed' ),
|
'context' => array( 'view', 'embed' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -491,7 +491,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
'get_callback' => 'SP_REST_API::get_post_data',
|
'get_callback' => 'SP_REST_API::get_post_data',
|
||||||
'update_callback' => 'SP_REST_API::update_post_meta_array',
|
'update_callback' => 'SP_REST_API::update_post_meta_array',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Metrics', 'sportspress' ),
|
'description' => esc_attr__( 'Metrics', 'sportspress' ),
|
||||||
'context' => array( 'view', 'edit' ),
|
'context' => array( 'view', 'edit' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
'sanitize_callback' => 'rest_sanitize_request_arg',
|
'sanitize_callback' => 'rest_sanitize_request_arg',
|
||||||
@@ -507,7 +507,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
'get_callback' => 'SP_REST_API::get_post_data',
|
'get_callback' => 'SP_REST_API::get_post_data',
|
||||||
'update_callback' => 'SP_REST_API::update_post_meta_arrays_multi',
|
'update_callback' => 'SP_REST_API::update_post_meta_arrays_multi',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Statistics', 'sportspress' ),
|
'description' => esc_attr__( 'Statistics', 'sportspress' ),
|
||||||
'type' => 'object',
|
'type' => 'object',
|
||||||
'context' => array( 'view', 'edit' ),
|
'context' => array( 'view', 'edit' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -524,7 +524,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Teams', 'sportspress' ),
|
'description' => esc_attr__( 'Teams', 'sportspress' ),
|
||||||
'type' => 'array',
|
'type' => 'array',
|
||||||
'context' => array( 'view', 'edit' ),
|
'context' => array( 'view', 'edit' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -541,7 +541,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Current Teams', 'sportspress' ),
|
'description' => esc_attr__( 'Current Teams', 'sportspress' ),
|
||||||
'type' => 'array',
|
'type' => 'array',
|
||||||
'context' => array( 'view', 'edit' ),
|
'context' => array( 'view', 'edit' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -558,7 +558,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
'get_callback' => 'SP_REST_API::get_post_meta_recursive',
|
||||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Past Teams', 'sportspress' ),
|
'description' => esc_attr__( 'Past Teams', 'sportspress' ),
|
||||||
'type' => 'array',
|
'type' => 'array',
|
||||||
'context' => array( 'view', 'edit' ),
|
'context' => array( 'view', 'edit' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
@@ -575,7 +575,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) :
|
|||||||
'get_callback' => 'SP_REST_API::get_post_data',
|
'get_callback' => 'SP_REST_API::get_post_data',
|
||||||
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
'update_callback' => 'SP_REST_API::update_post_meta_recursive',
|
||||||
'schema' => array(
|
'schema' => array(
|
||||||
'description' => __( 'Nationalities', 'sportspress' ),
|
'description' => esc_attr__( 'Nationalities', 'sportspress' ),
|
||||||
'type' => 'array',
|
'type' => 'array',
|
||||||
'context' => array( 'view', 'embed' ),
|
'context' => array( 'view', 'embed' ),
|
||||||
'arg_options' => array(
|
'arg_options' => array(
|
||||||
|
|||||||
@@ -469,7 +469,7 @@ class SP_AJAX {
|
|||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<label>
|
<label>
|
||||||
<?php printf( esc_html__( 'Select %s:', 'sportspress' ), __( 'Calendar', 'sportspress' ) ); ?>
|
<?php printf( esc_html__( 'Select %s:', 'sportspress' ), esc_attr__( 'Calendar', 'sportspress' ) ); ?>
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
'post_type' => 'sp_calendar',
|
'post_type' => 'sp_calendar',
|
||||||
@@ -793,7 +793,7 @@ class SP_AJAX {
|
|||||||
→
|
→
|
||||||
<?php esc_html_e( 'Next', 'sportspress' ); ?>
|
<?php esc_html_e( 'Next', 'sportspress' ); ?>
|
||||||
<input type="number" min="0" step="1" class="tiny-text" name="date_future" value="default">
|
<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>esc_html
|
||||||
|
|
||||||
<p class="sp-date-relative">
|
<p class="sp-date-relative">
|
||||||
|
|||||||
@@ -277,235 +277,235 @@ class SP_Countries {
|
|||||||
$this->countries = apply_filters(
|
$this->countries = apply_filters(
|
||||||
'sportspress_countries',
|
'sportspress_countries',
|
||||||
array(
|
array(
|
||||||
'afg' => __( 'Afghanistan', 'sportspress' ),
|
'afg' => esc_attr__( 'Afghanistan', 'sportspress' ),
|
||||||
'aia' => __( 'Anguilla', 'sportspress' ),
|
'aia' => esc_attr__( 'Anguilla', 'sportspress' ),
|
||||||
'alb' => __( 'Albania', 'sportspress' ),
|
'alb' => esc_attr__( 'Albania', 'sportspress' ),
|
||||||
'alg' => __( 'Algeria', 'sportspress' ),
|
'alg' => esc_attr__( 'Algeria', 'sportspress' ),
|
||||||
'and' => __( 'Andorra', 'sportspress' ),
|
'and' => esc_attr__( 'Andorra', 'sportspress' ),
|
||||||
'ang' => __( 'Angola', 'sportspress' ),
|
'ang' => esc_attr__( 'Angola', 'sportspress' ),
|
||||||
'arg' => __( 'Argentina', 'sportspress' ),
|
'arg' => esc_attr__( 'Argentina', 'sportspress' ),
|
||||||
'arm' => __( 'Armenia', 'sportspress' ),
|
'arm' => esc_attr__( 'Armenia', 'sportspress' ),
|
||||||
'aru' => __( 'Aruba', 'sportspress' ),
|
'aru' => esc_attr__( 'Aruba', 'sportspress' ),
|
||||||
'asa' => __( 'American Samoa', 'sportspress' ),
|
'asa' => esc_attr__( 'American Samoa', 'sportspress' ),
|
||||||
'atg' => __( 'Antigua and Barbuda', 'sportspress' ),
|
'atg' => esc_attr__( 'Antigua and Barbuda', 'sportspress' ),
|
||||||
'aus' => __( 'Australia', 'sportspress' ),
|
'aus' => esc_attr__( 'Australia', 'sportspress' ),
|
||||||
'aut' => __( 'Austria', 'sportspress' ),
|
'aut' => esc_attr__( 'Austria', 'sportspress' ),
|
||||||
'aze' => __( 'Azerbaijan', 'sportspress' ),
|
'aze' => esc_attr__( 'Azerbaijan', 'sportspress' ),
|
||||||
'bah' => __( 'Bahamas', 'sportspress' ),
|
'bah' => esc_attr__( 'Bahamas', 'sportspress' ),
|
||||||
'ban' => __( 'Bangladesh', 'sportspress' ),
|
'ban' => esc_attr__( 'Bangladesh', 'sportspress' ),
|
||||||
'bdi' => __( 'Burundi', 'sportspress' ),
|
'bdi' => esc_attr__( 'Burundi', 'sportspress' ),
|
||||||
'bel' => __( 'Belgium', 'sportspress' ),
|
'bel' => esc_attr__( 'Belgium', 'sportspress' ),
|
||||||
'ben' => __( 'Benin', 'sportspress' ),
|
'ben' => esc_attr__( 'Benin', 'sportspress' ),
|
||||||
'ber' => __( 'Bermuda', 'sportspress' ),
|
'ber' => esc_attr__( 'Bermuda', 'sportspress' ),
|
||||||
'bfa' => __( 'Burkina Faso', 'sportspress' ),
|
'bfa' => esc_attr__( 'Burkina Faso', 'sportspress' ),
|
||||||
'bhr' => __( 'Bahrain', 'sportspress' ),
|
'bhr' => esc_attr__( 'Bahrain', 'sportspress' ),
|
||||||
'bhu' => __( 'Bhutan', 'sportspress' ),
|
'bhu' => esc_attr__( 'Bhutan', 'sportspress' ),
|
||||||
'bih' => __( 'Bosnia and Herzegovina', 'sportspress' ),
|
'bih' => esc_attr__( 'Bosnia and Herzegovina', 'sportspress' ),
|
||||||
'blr' => __( 'Belarus', 'sportspress' ),
|
'blr' => esc_attr__( 'Belarus', 'sportspress' ),
|
||||||
'blz' => __( 'Belize', 'sportspress' ),
|
'blz' => esc_attr__( 'Belize', 'sportspress' ),
|
||||||
'bol' => __( 'Bolivia', 'sportspress' ),
|
'bol' => esc_attr__( 'Bolivia', 'sportspress' ),
|
||||||
'bot' => __( 'Botswana', 'sportspress' ),
|
'bot' => esc_attr__( 'Botswana', 'sportspress' ),
|
||||||
'bra' => __( 'Brazil', 'sportspress' ),
|
'bra' => esc_attr__( 'Brazil', 'sportspress' ),
|
||||||
'brb' => __( 'Barbados', 'sportspress' ),
|
'brb' => esc_attr__( 'Barbados', 'sportspress' ),
|
||||||
'bru' => __( 'Brunei', 'sportspress' ),
|
'bru' => esc_attr__( 'Brunei', 'sportspress' ),
|
||||||
'bul' => __( 'Bulgaria', 'sportspress' ),
|
'bul' => esc_attr__( 'Bulgaria', 'sportspress' ),
|
||||||
'cam' => __( 'Cambodia', 'sportspress' ),
|
'cam' => esc_attr__( 'Cambodia', 'sportspress' ),
|
||||||
'can' => __( 'Canada', 'sportspress' ),
|
'can' => esc_attr__( 'Canada', 'sportspress' ),
|
||||||
'cay' => __( 'Cayman Islands', 'sportspress' ),
|
'cay' => esc_attr__( 'Cayman Islands', 'sportspress' ),
|
||||||
'cgo' => __( 'Republic of the Congo', 'sportspress' ),
|
'cgo' => esc_attr__( 'Republic of the Congo', 'sportspress' ),
|
||||||
'cha' => __( 'Chad', 'sportspress' ),
|
'cha' => esc_attr__( 'Chad', 'sportspress' ),
|
||||||
'chi' => __( 'Chile', 'sportspress' ),
|
'chi' => esc_attr__( 'Chile', 'sportspress' ),
|
||||||
'chn' => __( 'China', 'sportspress' ),
|
'chn' => esc_attr__( 'China', 'sportspress' ),
|
||||||
'civ' => __( 'Ivory Coast', 'sportspress' ),
|
'civ' => esc_attr__( 'Ivory Coast', 'sportspress' ),
|
||||||
'cmr' => __( 'Cameroon', 'sportspress' ),
|
'cmr' => esc_attr__( 'Cameroon', 'sportspress' ),
|
||||||
'cod' => __( 'Democratic Republic of the Congo', 'sportspress' ),
|
'cod' => esc_attr__( 'Democratic Republic of the Congo', 'sportspress' ),
|
||||||
'cok' => __( 'Cook Islands', 'sportspress' ),
|
'cok' => esc_attr__( 'Cook Islands', 'sportspress' ),
|
||||||
'col' => __( 'Colombia', 'sportspress' ),
|
'col' => esc_attr__( 'Colombia', 'sportspress' ),
|
||||||
'com' => __( 'Comoros', 'sportspress' ),
|
'com' => esc_attr__( 'Comoros', 'sportspress' ),
|
||||||
'cpv' => __( 'Cape Verde', 'sportspress' ),
|
'cpv' => esc_attr__( 'Cape Verde', 'sportspress' ),
|
||||||
'crc' => __( 'Costa Rica', 'sportspress' ),
|
'crc' => esc_attr__( 'Costa Rica', 'sportspress' ),
|
||||||
'cro' => __( 'Croatia', 'sportspress' ),
|
'cro' => esc_attr__( 'Croatia', 'sportspress' ),
|
||||||
'cta' => __( 'Central African Republic', 'sportspress' ),
|
'cta' => esc_attr__( 'Central African Republic', 'sportspress' ),
|
||||||
'cub' => __( 'Cuba', 'sportspress' ),
|
'cub' => esc_attr__( 'Cuba', 'sportspress' ),
|
||||||
'cuw' => __( 'Curacao', 'sportspress' ),
|
'cuw' => esc_attr__( 'Curacao', 'sportspress' ),
|
||||||
'cyp' => __( 'Cyprus', 'sportspress' ),
|
'cyp' => esc_attr__( 'Cyprus', 'sportspress' ),
|
||||||
'cze' => __( 'Czechia', 'sportspress' ),
|
'cze' => esc_attr__( 'Czechia', 'sportspress' ),
|
||||||
'den' => __( 'Denmark', 'sportspress' ),
|
'den' => esc_attr__( 'Denmark', 'sportspress' ),
|
||||||
'dji' => __( 'Djibouti', 'sportspress' ),
|
'dji' => esc_attr__( 'Djibouti', 'sportspress' ),
|
||||||
'dma' => __( 'Dominica', 'sportspress' ),
|
'dma' => esc_attr__( 'Dominica', 'sportspress' ),
|
||||||
'dom' => __( 'Dominican Republic', 'sportspress' ),
|
'dom' => esc_attr__( 'Dominican Republic', 'sportspress' ),
|
||||||
'ecu' => __( 'Ecuador', 'sportspress' ),
|
'ecu' => esc_attr__( 'Ecuador', 'sportspress' ),
|
||||||
'egy' => __( 'Egypt', 'sportspress' ),
|
'egy' => esc_attr__( 'Egypt', 'sportspress' ),
|
||||||
'eng' => __( 'England', 'sportspress' ),
|
'eng' => esc_attr__( 'England', 'sportspress' ),
|
||||||
'eqg' => __( 'Equatorial Guinea', 'sportspress' ),
|
'eqg' => esc_attr__( 'Equatorial Guinea', 'sportspress' ),
|
||||||
'eri' => __( 'Eritrea', 'sportspress' ),
|
'eri' => esc_attr__( 'Eritrea', 'sportspress' ),
|
||||||
'esh' => __( 'Western Sahara', 'sportspress' ),
|
'esh' => esc_attr__( 'Western Sahara', 'sportspress' ),
|
||||||
'esp' => __( 'Spain', 'sportspress' ),
|
'esp' => esc_attr__( 'Spain', 'sportspress' ),
|
||||||
'est' => __( 'Estonia', 'sportspress' ),
|
'est' => esc_attr__( 'Estonia', 'sportspress' ),
|
||||||
'eth' => __( 'Ethiopia', 'sportspress' ),
|
'eth' => esc_attr__( 'Ethiopia', 'sportspress' ),
|
||||||
'fij' => __( 'Fiji', 'sportspress' ),
|
'fij' => esc_attr__( 'Fiji', 'sportspress' ),
|
||||||
'fin' => __( 'Finland', 'sportspress' ),
|
'fin' => esc_attr__( 'Finland', 'sportspress' ),
|
||||||
'fra' => __( 'France', 'sportspress' ),
|
'fra' => esc_attr__( 'France', 'sportspress' ),
|
||||||
'fro' => __( 'Faroe Islands', 'sportspress' ),
|
'fro' => esc_attr__( 'Faroe Islands', 'sportspress' ),
|
||||||
'guf' => __( 'French Guiana', 'sportspress' ),
|
'guf' => esc_attr__( 'French Guiana', 'sportspress' ),
|
||||||
'pyf' => __( 'French Polynesia', 'sportspress' ),
|
'pyf' => esc_attr__( 'French Polynesia', 'sportspress' ),
|
||||||
'fsm' => __( 'Micronesia', 'sportspress' ),
|
'fsm' => esc_attr__( 'Micronesia', 'sportspress' ),
|
||||||
'gab' => __( 'Gabon', 'sportspress' ),
|
'gab' => esc_attr__( 'Gabon', 'sportspress' ),
|
||||||
'gam' => __( 'Gambia', 'sportspress' ),
|
'gam' => esc_attr__( 'Gambia', 'sportspress' ),
|
||||||
'gbr' => __( 'United Kingdom', 'sportspress' ),
|
'gbr' => esc_attr__( 'United Kingdom', 'sportspress' ),
|
||||||
'geo' => __( 'Georgia', 'sportspress' ),
|
'geo' => esc_attr__( 'Georgia', 'sportspress' ),
|
||||||
'ger' => __( 'Germany', 'sportspress' ),
|
'ger' => esc_attr__( 'Germany', 'sportspress' ),
|
||||||
'gha' => __( 'Ghana', 'sportspress' ),
|
'gha' => esc_attr__( 'Ghana', 'sportspress' ),
|
||||||
'gib' => __( 'Gibraltar', 'sportspress' ),
|
'gib' => esc_attr__( 'Gibraltar', 'sportspress' ),
|
||||||
'glp' => __( 'Guadeloupe', 'sportspress' ),
|
'glp' => esc_attr__( 'Guadeloupe', 'sportspress' ),
|
||||||
'gnb' => __( 'Guinea-Bissau', 'sportspress' ),
|
'gnb' => esc_attr__( 'Guinea-Bissau', 'sportspress' ),
|
||||||
'gre' => __( 'Greece', 'sportspress' ),
|
'gre' => esc_attr__( 'Greece', 'sportspress' ),
|
||||||
'grl' => __( 'Greenland', 'sportspress' ),
|
'grl' => esc_attr__( 'Greenland', 'sportspress' ),
|
||||||
'grn' => __( 'Grenada', 'sportspress' ),
|
'grn' => esc_attr__( 'Grenada', 'sportspress' ),
|
||||||
'gua' => __( 'Guatemala', 'sportspress' ),
|
'gua' => esc_attr__( 'Guatemala', 'sportspress' ),
|
||||||
'gui' => __( 'Guinea', 'sportspress' ),
|
'gui' => esc_attr__( 'Guinea', 'sportspress' ),
|
||||||
'gum' => __( 'Guam', 'sportspress' ),
|
'gum' => esc_attr__( 'Guam', 'sportspress' ),
|
||||||
'guy' => __( 'Guyana', 'sportspress' ),
|
'guy' => esc_attr__( 'Guyana', 'sportspress' ),
|
||||||
'hai' => __( 'Haiti', 'sportspress' ),
|
'hai' => esc_attr__( 'Haiti', 'sportspress' ),
|
||||||
'hkg' => __( 'Hong Kong', 'sportspress' ),
|
'hkg' => esc_attr__( 'Hong Kong', 'sportspress' ),
|
||||||
'hon' => __( 'Honduras', 'sportspress' ),
|
'hon' => esc_attr__( 'Honduras', 'sportspress' ),
|
||||||
'hun' => __( 'Hungary', 'sportspress' ),
|
'hun' => esc_attr__( 'Hungary', 'sportspress' ),
|
||||||
'idn' => __( 'Indonesia', 'sportspress' ),
|
'idn' => esc_attr__( 'Indonesia', 'sportspress' ),
|
||||||
'ind' => __( 'India', 'sportspress' ),
|
'ind' => esc_attr__( 'India', 'sportspress' ),
|
||||||
'irl' => __( 'Ireland', 'sportspress' ),
|
'irl' => esc_attr__( 'Ireland', 'sportspress' ),
|
||||||
'irn' => __( 'Iran', 'sportspress' ),
|
'irn' => esc_attr__( 'Iran', 'sportspress' ),
|
||||||
'irq' => __( 'Iraq', 'sportspress' ),
|
'irq' => esc_attr__( 'Iraq', 'sportspress' ),
|
||||||
'isl' => __( 'Iceland', 'sportspress' ),
|
'isl' => esc_attr__( 'Iceland', 'sportspress' ),
|
||||||
'isr' => __( 'Israel', 'sportspress' ),
|
'isr' => esc_attr__( 'Israel', 'sportspress' ),
|
||||||
'ita' => __( 'Italy', 'sportspress' ),
|
'ita' => esc_attr__( 'Italy', 'sportspress' ),
|
||||||
'jam' => __( 'Jamaica', 'sportspress' ),
|
'jam' => esc_attr__( 'Jamaica', 'sportspress' ),
|
||||||
'jor' => __( 'Jordan', 'sportspress' ),
|
'jor' => esc_attr__( 'Jordan', 'sportspress' ),
|
||||||
'jpn' => __( 'Japan', 'sportspress' ),
|
'jpn' => esc_attr__( 'Japan', 'sportspress' ),
|
||||||
'kaz' => __( 'Kazakhstan', 'sportspress' ),
|
'kaz' => esc_attr__( 'Kazakhstan', 'sportspress' ),
|
||||||
'ken' => __( 'Kenya', 'sportspress' ),
|
'ken' => esc_attr__( 'Kenya', 'sportspress' ),
|
||||||
'kos' => __( 'Kosovo', 'sportspress' ),
|
'kos' => esc_attr__( 'Kosovo', 'sportspress' ),
|
||||||
'kgz' => __( 'Kyrgyzstan', 'sportspress' ),
|
'kgz' => esc_attr__( 'Kyrgyzstan', 'sportspress' ),
|
||||||
'kir' => __( 'Kiribati', 'sportspress' ),
|
'kir' => esc_attr__( 'Kiribati', 'sportspress' ),
|
||||||
'mtq' => __( 'Martinique', 'sportspress' ),
|
'mtq' => esc_attr__( 'Martinique', 'sportspress' ),
|
||||||
'kor' => __( 'South Korea', 'sportspress' ),
|
'kor' => esc_attr__( 'South Korea', 'sportspress' ),
|
||||||
'ksa' => __( 'Saudi Arabia', 'sportspress' ),
|
'ksa' => esc_attr__( 'Saudi Arabia', 'sportspress' ),
|
||||||
'kuw' => __( 'Kuwait', 'sportspress' ),
|
'kuw' => esc_attr__( 'Kuwait', 'sportspress' ),
|
||||||
'lao' => __( 'Laos', 'sportspress' ),
|
'lao' => esc_attr__( 'Laos', 'sportspress' ),
|
||||||
'lbr' => __( 'Liberia', 'sportspress' ),
|
'lbr' => esc_attr__( 'Liberia', 'sportspress' ),
|
||||||
'lby' => __( 'Libya', 'sportspress' ),
|
'lby' => esc_attr__( 'Libya', 'sportspress' ),
|
||||||
'lca' => __( 'Saint Lucia', 'sportspress' ),
|
'lca' => esc_attr__( 'Saint Lucia', 'sportspress' ),
|
||||||
'les' => __( 'Lesotho', 'sportspress' ),
|
'les' => esc_attr__( 'Lesotho', 'sportspress' ),
|
||||||
'lib' => __( 'Lebanon', 'sportspress' ),
|
'lib' => esc_attr__( 'Lebanon', 'sportspress' ),
|
||||||
'lie' => __( 'Liechtenstein', 'sportspress' ),
|
'lie' => esc_attr__( 'Liechtenstein', 'sportspress' ),
|
||||||
'ltu' => __( 'Lithuania', 'sportspress' ),
|
'ltu' => esc_attr__( 'Lithuania', 'sportspress' ),
|
||||||
'lux' => __( 'Luxembourg', 'sportspress' ),
|
'lux' => esc_attr__( 'Luxembourg', 'sportspress' ),
|
||||||
'lva' => __( 'Latvia', 'sportspress' ),
|
'lva' => esc_attr__( 'Latvia', 'sportspress' ),
|
||||||
'mac' => __( 'Macau', 'sportspress' ),
|
'mac' => esc_attr__( 'Macau', 'sportspress' ),
|
||||||
'mad' => __( 'Madagascar', 'sportspress' ),
|
'mad' => esc_attr__( 'Madagascar', 'sportspress' ),
|
||||||
'mar' => __( 'Morocco', 'sportspress' ),
|
'mar' => esc_attr__( 'Morocco', 'sportspress' ),
|
||||||
'mas' => __( 'Malaysia', 'sportspress' ),
|
'mas' => esc_attr__( 'Malaysia', 'sportspress' ),
|
||||||
'mco' => __( 'Monaco', 'sportspress' ),
|
'mco' => esc_attr__( 'Monaco', 'sportspress' ),
|
||||||
'mda' => __( 'Moldova', 'sportspress' ),
|
'mda' => esc_attr__( 'Moldova', 'sportspress' ),
|
||||||
'mdv' => __( 'Maldives', 'sportspress' ),
|
'mdv' => esc_attr__( 'Maldives', 'sportspress' ),
|
||||||
'mex' => __( 'Mexico', 'sportspress' ),
|
'mex' => esc_attr__( 'Mexico', 'sportspress' ),
|
||||||
'mhl' => __( 'Marshall Islands', 'sportspress' ),
|
'mhl' => esc_attr__( 'Marshall Islands', 'sportspress' ),
|
||||||
'mkd' => __( 'North Macedonia', 'sportspress' ),
|
'mkd' => esc_attr__( 'North Macedonia', 'sportspress' ),
|
||||||
'mli' => __( 'Mali', 'sportspress' ),
|
'mli' => esc_attr__( 'Mali', 'sportspress' ),
|
||||||
'mlt' => __( 'Malta', 'sportspress' ),
|
'mlt' => esc_attr__( 'Malta', 'sportspress' ),
|
||||||
'mne' => __( 'Montenegro', 'sportspress' ),
|
'mne' => esc_attr__( 'Montenegro', 'sportspress' ),
|
||||||
'mng' => __( 'Mongolia', 'sportspress' ),
|
'mng' => esc_attr__( 'Mongolia', 'sportspress' ),
|
||||||
'moz' => __( 'Mozambique', 'sportspress' ),
|
'moz' => esc_attr__( 'Mozambique', 'sportspress' ),
|
||||||
'mri' => __( 'Mauritius', 'sportspress' ),
|
'mri' => esc_attr__( 'Mauritius', 'sportspress' ),
|
||||||
'msr' => __( 'Montserrat', 'sportspress' ),
|
'msr' => esc_attr__( 'Montserrat', 'sportspress' ),
|
||||||
'mtn' => __( 'Mauritania', 'sportspress' ),
|
'mtn' => esc_attr__( 'Mauritania', 'sportspress' ),
|
||||||
'mwi' => __( 'Malawi', 'sportspress' ),
|
'mwi' => esc_attr__( 'Malawi', 'sportspress' ),
|
||||||
'mya' => __( 'Myanmar', 'sportspress' ),
|
'mya' => esc_attr__( 'Myanmar', 'sportspress' ),
|
||||||
'nam' => __( 'Namibia', 'sportspress' ),
|
'nam' => esc_attr__( 'Namibia', 'sportspress' ),
|
||||||
'nca' => __( 'Nicaragua', 'sportspress' ),
|
'nca' => esc_attr__( 'Nicaragua', 'sportspress' ),
|
||||||
'ncl' => __( 'New Caledonia', 'sportspress' ),
|
'ncl' => esc_attr__( 'New Caledonia', 'sportspress' ),
|
||||||
'ned' => __( 'Netherlands', 'sportspress' ),
|
'ned' => esc_attr__( 'Netherlands', 'sportspress' ),
|
||||||
'nep' => __( 'Nepal', 'sportspress' ),
|
'nep' => esc_attr__( 'Nepal', 'sportspress' ),
|
||||||
'nga' => __( 'Nigeria', 'sportspress' ),
|
'nga' => esc_attr__( 'Nigeria', 'sportspress' ),
|
||||||
'nig' => __( 'Niger', 'sportspress' ),
|
'nig' => esc_attr__( 'Niger', 'sportspress' ),
|
||||||
'nir' => __( 'Northern Ireland', 'sportspress' ),
|
'nir' => esc_attr__( 'Northern Ireland', 'sportspress' ),
|
||||||
'nor' => __( 'Norway', 'sportspress' ),
|
'nor' => esc_attr__( 'Norway', 'sportspress' ),
|
||||||
'nru' => __( 'Nauru', 'sportspress' ),
|
'nru' => esc_attr__( 'Nauru', 'sportspress' ),
|
||||||
'nzl' => __( 'New Zealand', 'sportspress' ),
|
'nzl' => esc_attr__( 'New Zealand', 'sportspress' ),
|
||||||
'oma' => __( 'Oman', 'sportspress' ),
|
'oma' => esc_attr__( 'Oman', 'sportspress' ),
|
||||||
'pak' => __( 'Pakistan', 'sportspress' ),
|
'pak' => esc_attr__( 'Pakistan', 'sportspress' ),
|
||||||
'pan' => __( 'Panama', 'sportspress' ),
|
'pan' => esc_attr__( 'Panama', 'sportspress' ),
|
||||||
'par' => __( 'Paraguay', 'sportspress' ),
|
'par' => esc_attr__( 'Paraguay', 'sportspress' ),
|
||||||
'per' => __( 'Peru', 'sportspress' ),
|
'per' => esc_attr__( 'Peru', 'sportspress' ),
|
||||||
'phi' => __( 'Philippines', 'sportspress' ),
|
'phi' => esc_attr__( 'Philippines', 'sportspress' ),
|
||||||
'ple' => __( 'Palestine', 'sportspress' ),
|
'ple' => esc_attr__( 'Palestine', 'sportspress' ),
|
||||||
'plw' => __( 'Palau', 'sportspress' ),
|
'plw' => esc_attr__( 'Palau', 'sportspress' ),
|
||||||
'png' => __( 'Papua New Guinea', 'sportspress' ),
|
'png' => esc_attr__( 'Papua New Guinea', 'sportspress' ),
|
||||||
'pol' => __( 'Poland', 'sportspress' ),
|
'pol' => esc_attr__( 'Poland', 'sportspress' ),
|
||||||
'por' => __( 'Portugal', 'sportspress' ),
|
'por' => esc_attr__( 'Portugal', 'sportspress' ),
|
||||||
'prk' => __( 'North Korea', 'sportspress' ),
|
'prk' => esc_attr__( 'North Korea', 'sportspress' ),
|
||||||
'pur' => __( 'Puerto Rico', 'sportspress' ),
|
'pur' => esc_attr__( 'Puerto Rico', 'sportspress' ),
|
||||||
'qat' => __( 'Qatar', 'sportspress' ),
|
'qat' => esc_attr__( 'Qatar', 'sportspress' ),
|
||||||
'rou' => __( 'Romania', 'sportspress' ),
|
'rou' => esc_attr__( 'Romania', 'sportspress' ),
|
||||||
'rsa' => __( 'South Africa', 'sportspress' ),
|
'rsa' => esc_attr__( 'South Africa', 'sportspress' ),
|
||||||
'reu' => __( 'Reunion', 'sportspress' ),
|
'reu' => esc_attr__( 'Reunion', 'sportspress' ),
|
||||||
'rus' => __( 'Russia', 'sportspress' ),
|
'rus' => esc_attr__( 'Russia', 'sportspress' ),
|
||||||
'rwa' => __( 'Rwanda', 'sportspress' ),
|
'rwa' => esc_attr__( 'Rwanda', 'sportspress' ),
|
||||||
'sam' => __( 'Samoa', 'sportspress' ),
|
'sam' => esc_attr__( 'Samoa', 'sportspress' ),
|
||||||
'sco' => __( 'Scotland', 'sportspress' ),
|
'sco' => esc_attr__( 'Scotland', 'sportspress' ),
|
||||||
'sdn' => __( 'Sudan', 'sportspress' ),
|
'sdn' => esc_attr__( 'Sudan', 'sportspress' ),
|
||||||
'sen' => __( 'Senegal', 'sportspress' ),
|
'sen' => esc_attr__( 'Senegal', 'sportspress' ),
|
||||||
'sey' => __( 'Seychelles', 'sportspress' ),
|
'sey' => esc_attr__( 'Seychelles', 'sportspress' ),
|
||||||
'sin' => __( 'Singapore', 'sportspress' ),
|
'sin' => esc_attr__( 'Singapore', 'sportspress' ),
|
||||||
'skn' => __( 'Saint Kitts and Nevis', 'sportspress' ),
|
'skn' => esc_attr__( 'Saint Kitts and Nevis', 'sportspress' ),
|
||||||
'sle' => __( 'Sierra Leone', 'sportspress' ),
|
'sle' => esc_attr__( 'Sierra Leone', 'sportspress' ),
|
||||||
'slv' => __( 'El Salvador', 'sportspress' ),
|
'slv' => esc_attr__( 'El Salvador', 'sportspress' ),
|
||||||
'smr' => __( 'San Marino', 'sportspress' ),
|
'smr' => esc_attr__( 'San Marino', 'sportspress' ),
|
||||||
'sol' => __( 'Solomon Islands', 'sportspress' ),
|
'sol' => esc_attr__( 'Solomon Islands', 'sportspress' ),
|
||||||
'som' => __( 'Somalia', 'sportspress' ),
|
'som' => esc_attr__( 'Somalia', 'sportspress' ),
|
||||||
'srb' => __( 'Serbia', 'sportspress' ),
|
'srb' => esc_attr__( 'Serbia', 'sportspress' ),
|
||||||
'sri' => __( 'Sri Lanka', 'sportspress' ),
|
'sri' => esc_attr__( 'Sri Lanka', 'sportspress' ),
|
||||||
'ssd' => __( 'South Sudan', 'sportspress' ),
|
'ssd' => esc_attr__( 'South Sudan', 'sportspress' ),
|
||||||
'stp' => __( 'Sao Tome and Principe', 'sportspress' ),
|
'stp' => esc_attr__( 'Sao Tome and Principe', 'sportspress' ),
|
||||||
'sui' => __( 'Switzerland', 'sportspress' ),
|
'sui' => esc_attr__( 'Switzerland', 'sportspress' ),
|
||||||
'sur' => __( 'Suriname', 'sportspress' ),
|
'sur' => esc_attr__( 'Suriname', 'sportspress' ),
|
||||||
'svk' => __( 'Slovakia', 'sportspress' ),
|
'svk' => esc_attr__( 'Slovakia', 'sportspress' ),
|
||||||
'svn' => __( 'Slovenia', 'sportspress' ),
|
'svn' => esc_attr__( 'Slovenia', 'sportspress' ),
|
||||||
'swe' => __( 'Sweden', 'sportspress' ),
|
'swe' => esc_attr__( 'Sweden', 'sportspress' ),
|
||||||
'swz' => __( 'Eswatini', 'sportspress' ),
|
'swz' => esc_attr__( 'Eswatini', 'sportspress' ),
|
||||||
'sxm' => __( 'Sint Maarten', 'sportspress' ),
|
'sxm' => esc_attr__( 'Sint Maarten', 'sportspress' ),
|
||||||
'syr' => __( 'Syria', 'sportspress' ),
|
'syr' => esc_attr__( 'Syria', 'sportspress' ),
|
||||||
'tah' => __( 'Tahiti', 'sportspress' ),
|
'tah' => esc_attr__( 'Tahiti', 'sportspress' ),
|
||||||
'tan' => __( 'Tanzania', 'sportspress' ),
|
'tan' => esc_attr__( 'Tanzania', 'sportspress' ),
|
||||||
'tca' => __( 'Turks and Caicos Islands', 'sportspress' ),
|
'tca' => esc_attr__( 'Turks and Caicos Islands', 'sportspress' ),
|
||||||
'tga' => __( 'Tonga', 'sportspress' ),
|
'tga' => esc_attr__( 'Tonga', 'sportspress' ),
|
||||||
'tha' => __( 'Thailand', 'sportspress' ),
|
'tha' => esc_attr__( 'Thailand', 'sportspress' ),
|
||||||
'tjk' => __( 'Tajikistan', 'sportspress' ),
|
'tjk' => esc_attr__( 'Tajikistan', 'sportspress' ),
|
||||||
'tkm' => __( 'Turkmenistan', 'sportspress' ),
|
'tkm' => esc_attr__( 'Turkmenistan', 'sportspress' ),
|
||||||
'tls' => __( 'East Timor', 'sportspress' ),
|
'tls' => esc_attr__( 'East Timor', 'sportspress' ),
|
||||||
'tog' => __( 'Togo', 'sportspress' ),
|
'tog' => esc_attr__( 'Togo', 'sportspress' ),
|
||||||
'tpe' => __( 'Taiwan', 'sportspress' ),
|
'tpe' => esc_attr__( 'Taiwan', 'sportspress' ),
|
||||||
'tri' => __( 'Trinidad and Tobago', 'sportspress' ),
|
'tri' => esc_attr__( 'Trinidad and Tobago', 'sportspress' ),
|
||||||
'tun' => __( 'Tunisia', 'sportspress' ),
|
'tun' => esc_attr__( 'Tunisia', 'sportspress' ),
|
||||||
'tur' => __( 'Turkey', 'sportspress' ),
|
'tur' => esc_attr__( 'Turkey', 'sportspress' ),
|
||||||
'tuv' => __( 'Tuvalu', 'sportspress' ),
|
'tuv' => esc_attr__( 'Tuvalu', 'sportspress' ),
|
||||||
'uae' => __( 'United Arab Emirates', 'sportspress' ),
|
'uae' => esc_attr__( 'United Arab Emirates', 'sportspress' ),
|
||||||
'uga' => __( 'Uganda', 'sportspress' ),
|
'uga' => esc_attr__( 'Uganda', 'sportspress' ),
|
||||||
'ukr' => __( 'Ukraine', 'sportspress' ),
|
'ukr' => esc_attr__( 'Ukraine', 'sportspress' ),
|
||||||
'uru' => __( 'Uruguay', 'sportspress' ),
|
'uru' => esc_attr__( 'Uruguay', 'sportspress' ),
|
||||||
'usa' => __( 'United States', 'sportspress' ),
|
'usa' => esc_attr__( 'United States', 'sportspress' ),
|
||||||
'uzb' => __( 'Uzbekistan', 'sportspress' ),
|
'uzb' => esc_attr__( 'Uzbekistan', 'sportspress' ),
|
||||||
'van' => __( 'Vanuatu', 'sportspress' ),
|
'van' => esc_attr__( 'Vanuatu', 'sportspress' ),
|
||||||
'vat' => __( 'Vatican City', 'sportspress' ),
|
'vat' => esc_attr__( 'Vatican City', 'sportspress' ),
|
||||||
'ven' => __( 'Venezuela', 'sportspress' ),
|
'ven' => esc_attr__( 'Venezuela', 'sportspress' ),
|
||||||
'vgb' => __( 'British Virgin Islands', 'sportspress' ),
|
'vgb' => esc_attr__( 'British Virgin Islands', 'sportspress' ),
|
||||||
'vie' => __( 'Vietnam', 'sportspress' ),
|
'vie' => esc_attr__( 'Vietnam', 'sportspress' ),
|
||||||
'vin' => __( 'Saint Vincent and the Grenadines', 'sportspress' ),
|
'vin' => esc_attr__( 'Saint Vincent and the Grenadines', 'sportspress' ),
|
||||||
'vir' => __( 'US Virgin Islands', 'sportspress' ),
|
'vir' => esc_attr__( 'US Virgin Islands', 'sportspress' ),
|
||||||
'wal' => __( 'Wales', 'sportspress' ),
|
'wal' => esc_attr__( 'Wales', 'sportspress' ),
|
||||||
'wif' => __( 'West Indies', 'sportspress' ),
|
'wif' => esc_attr__( 'West Indies', 'sportspress' ),
|
||||||
'yem' => __( 'Yemen', 'sportspress' ),
|
'yem' => esc_attr__( 'Yemen', 'sportspress' ),
|
||||||
'zam' => __( 'Zambia', 'sportspress' ),
|
'zam' => esc_attr__( 'Zambia', 'sportspress' ),
|
||||||
'zim' => __( 'Zimbabwe', 'sportspress' ),
|
'zim' => esc_attr__( 'Zimbabwe', 'sportspress' ),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ class SP_Event extends SP_Custom_Post {
|
|||||||
return array( $columns, $usecolumns, $data );
|
return array( $columns, $usecolumns, $data );
|
||||||
else :
|
else :
|
||||||
// Add outcome to result columns
|
// Add outcome to result columns
|
||||||
$columns['outcome'] = __( 'Outcome', 'sportspress' );
|
$columns['outcome'] = esc_attr__( 'Outcome', 'sportspress' );
|
||||||
if ( is_array( $usecolumns ) ) :
|
if ( is_array( $usecolumns ) ) :
|
||||||
if ( 'manual' == get_option( 'sportspress_event_result_columns', 'auto' ) ) :
|
if ( 'manual' == get_option( 'sportspress_event_result_columns', 'auto' ) ) :
|
||||||
foreach ( $columns as $key => $label ) :
|
foreach ( $columns as $key => $label ) :
|
||||||
@@ -87,7 +87,7 @@ class SP_Event extends SP_Custom_Post {
|
|||||||
endif;
|
endif;
|
||||||
|
|
||||||
if ( 'yes' == get_option( 'sportspress_event_show_outcome', 'no' ) ) :
|
if ( 'yes' == get_option( 'sportspress_event_show_outcome', 'no' ) ) :
|
||||||
$columns['outcome'] = __( 'Outcome', 'sportspress' );
|
$columns['outcome'] = esc_attr__( 'Outcome', 'sportspress' );
|
||||||
endif;
|
endif;
|
||||||
endif;
|
endif;
|
||||||
$data[0] = $columns;
|
$data[0] = $columns;
|
||||||
@@ -179,7 +179,7 @@ class SP_Event extends SP_Custom_Post {
|
|||||||
else :
|
else :
|
||||||
// Add position to performance labels
|
// Add position to performance labels
|
||||||
if ( taxonomy_exists( 'sp_position' ) ) :
|
if ( taxonomy_exists( 'sp_position' ) ) :
|
||||||
$labels = array_merge( array( 'position' => __( 'Position', 'sportspress' ) ), $labels );
|
$labels = array_merge( array( 'position' => esc_attr__( 'Position', 'sportspress' ) ), $labels );
|
||||||
endif;
|
endif;
|
||||||
if ( 'manual' == get_option( 'sportspress_event_performance_columns', 'auto' ) && is_array( $columns ) ) :
|
if ( 'manual' == get_option( 'sportspress_event_performance_columns', 'auto' ) && is_array( $columns ) ) :
|
||||||
foreach ( $labels as $key => $label ) :
|
foreach ( $labels as $key => $label ) :
|
||||||
@@ -457,7 +457,7 @@ class SP_Event extends SP_Custom_Post {
|
|||||||
$stats[ $index ]['label'] = $name;
|
$stats[ $index ]['label'] = $name;
|
||||||
$stats[ $index ]['icon'] = sp_get_logo( $details['team'] );
|
$stats[ $index ]['icon'] = sp_get_logo( $details['team'] );
|
||||||
} elseif ( 'sub' === $details['key'] ) {
|
} 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'] );
|
$sub_number = sp_array_value( $player_numbers, $details['sub'] );
|
||||||
|
|
||||||
if ( '' !== $sub_number ) {
|
if ( '' !== $sub_number ) {
|
||||||
@@ -468,7 +468,7 @@ class SP_Event extends SP_Custom_Post {
|
|||||||
|
|
||||||
$stats[ $index ]['sub_name'] = $sub_name;
|
$stats[ $index ]['sub_name'] = $sub_name;
|
||||||
$stats[ $index ]['sub_number'] = $sub_number;
|
$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>';
|
$stats[ $index ]['icon'] = '<i class="sp-icon-sub" title="' . $icon_title . '"></i>';
|
||||||
} else {
|
} else {
|
||||||
$stats[ $index ]['label'] = sp_array_value( $performance_labels, $details['key'] );
|
$stats[ $index ]['label'] = sp_array_value( $performance_labels, $details['key'] );
|
||||||
|
|||||||
@@ -24,15 +24,15 @@ class SP_Feeds {
|
|||||||
'calendar' => array(
|
'calendar' => array(
|
||||||
'ical' => array(
|
'ical' => array(
|
||||||
'apple' => array(
|
'apple' => array(
|
||||||
'name' => __( 'Apple Calendar', 'sportspress' ),
|
'name' => esc_attr__( 'Apple Calendar', 'sportspress' ),
|
||||||
'protocol' => 'webcal',
|
'protocol' => 'webcal',
|
||||||
),
|
),
|
||||||
'outlook' => array(
|
'outlook' => array(
|
||||||
'name' => __( 'Outlook', 'sportspress' ),
|
'name' => esc_attr__( 'Outlook', 'sportspress' ),
|
||||||
'protocol' => 'webcal',
|
'protocol' => 'webcal',
|
||||||
),
|
),
|
||||||
'google' => array(
|
'google' => array(
|
||||||
'name' => __( 'Google', 'sportspress' ),
|
'name' => esc_attr__( 'Google', 'sportspress' ),
|
||||||
'protocol' => 'webcal',
|
'protocol' => 'webcal',
|
||||||
'prefix' => 'http://www.google.com/calendar/render?cid=',
|
'prefix' => 'http://www.google.com/calendar/render?cid=',
|
||||||
),
|
),
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user