Escape outputs

This commit is contained in:
Brian Miyaji
2021-11-13 20:42:08 +09:00
parent 051d3e3055
commit 23ba2446b1
190 changed files with 2837 additions and 2837 deletions

View File

@@ -60,7 +60,7 @@ if ( ! class_exists( 'SportsPress_Admin_Bar' ) ) :
$args = array(
'id' => 'sportspress',
'title' => __( 'SportsPress', 'sportspress' ),
'title' => esc_attr__( 'SportsPress', 'sportspress' ),
'href' => add_query_arg( 'page', 'sportspress', admin_url( 'admin.php' ) ),
);
$wp_admin_bar->add_node( $args );

View File

@@ -74,9 +74,9 @@ if ( ! class_exists( 'SportsPress_Birthdays' ) ) :
case 'Published on: <b>%1$s</b>':
case 'Schedule for: <b>%1$s</b>':
case 'Publish on: <b>%1$s</b>':
return __( 'Birthday: <b>%1$s</b>', 'sportspress' );
return esc_attr__( 'Birthday: <b>%1$s</b>', 'sportspress' );
case 'Publish <b>immediately</b>':
return __( 'Birthday', 'sportspress' );
return esc_attr__( 'Birthday', 'sportspress' );
case 'M j, Y @ G:i':
return 'M j, Y';
case '%1$s %2$s, %3$s @ %4$s : %5$s':
@@ -112,8 +112,8 @@ if ( ! class_exists( 'SportsPress_Birthdays' ) ) :
$options,
array(
array(
'title' => __( 'Birthday', 'sportspress' ),
'desc' => __( 'Display birthday', 'sportspress' ),
'title' => esc_attr__( 'Birthday', 'sportspress' ),
'desc' => esc_attr__( 'Display birthday', 'sportspress' ),
'id' => 'sportspress_player_show_birthday',
'default' => 'no',
'type' => 'checkbox',
@@ -121,7 +121,7 @@ if ( ! class_exists( 'SportsPress_Birthdays' ) ) :
),
array(
'desc' => __( 'Display age', 'sportspress' ),
'desc' => esc_attr__( 'Display age', 'sportspress' ),
'id' => 'sportspress_player_show_age',
'default' => 'no',
'type' => 'checkbox',
@@ -143,8 +143,8 @@ if ( ! class_exists( 'SportsPress_Birthdays' ) ) :
$options,
array(
array(
'title' => __( 'Birthday', 'sportspress' ),
'desc' => __( 'Display birthday', 'sportspress' ),
'title' => esc_attr__( 'Birthday', 'sportspress' ),
'desc' => esc_attr__( 'Display birthday', 'sportspress' ),
'id' => 'sportspress_staff_show_birthday',
'default' => 'no',
'type' => 'checkbox',
@@ -152,7 +152,7 @@ if ( ! class_exists( 'SportsPress_Birthdays' ) ) :
),
array(
'desc' => __( 'Display age', 'sportspress' ),
'desc' => esc_attr__( 'Display age', 'sportspress' ),
'id' => 'sportspress_staff_show_age',
'default' => 'no',
'type' => 'checkbox',
@@ -171,11 +171,11 @@ if ( ! class_exists( 'SportsPress_Birthdays' ) ) :
*/
public function add_player_details( $data, $post_id ) {
if ( 'yes' == get_option( 'sportspress_player_show_birthday', 'no' ) ) {
$data[ __( 'Birthday', 'sportspress' ) ] = get_the_date( get_option( 'date_format' ), $post_id );
$data[ esc_attr__( 'Birthday', 'sportspress' ) ] = get_the_date( get_option( 'date_format' ), $post_id );
}
if ( 'yes' == get_option( 'sportspress_player_show_age', 'no' ) ) {
$data[ __( 'Age', 'sportspress' ) ] = $this->get_age( get_the_date( 'm-d-Y', $post_id ) );
$data[ esc_attr__( 'Age', 'sportspress' ) ] = $this->get_age( get_the_date( 'm-d-Y', $post_id ) );
}
return $data;
@@ -188,11 +188,11 @@ if ( ! class_exists( 'SportsPress_Birthdays' ) ) :
*/
public function add_staff_details( $data, $post_id ) {
if ( 'yes' == get_option( 'sportspress_staff_show_birthday', 'no' ) ) {
$data[ __( 'Birthday', 'sportspress' ) ] = get_the_date( get_option( 'date_format' ), $post_id );
$data[ esc_attr__( 'Birthday', 'sportspress' ) ] = get_the_date( get_option( 'date_format' ), $post_id );
}
if ( 'yes' == get_option( 'sportspress_staff_show_age', 'no' ) ) {
$data[ __( 'Age', 'sportspress' ) ] = $this->get_age( get_the_date( 'm-d-Y', $post_id ) );
$data[ esc_attr__( 'Age', 'sportspress' ) ] = $this->get_age( get_the_date( 'm-d-Y', $post_id ) );
}
return $data;
@@ -213,13 +213,13 @@ if ( ! class_exists( 'SportsPress_Birthdays' ) ) :
<li>
<label class="selectit">
<input value="dob" type="checkbox" name="sp_columns[]" id="sp_columns_dob" <?php checked( in_array( 'dob', $selected ) ); ?>>
<?php _e( 'Date of Birth', 'sportspress' ); ?>
<?php esc_attr_e( 'Date of Birth', 'sportspress' ); ?>
</label>
</li>
<li>
<label class="selectit">
<input value="age" type="checkbox" name="sp_columns[]" id="sp_columns_age" <?php checked( in_array( 'age', $selected ) ); ?>>
<?php _e( 'Age', 'sportspress' ); ?>
<?php esc_attr_e( 'Age', 'sportspress' ); ?>
</label>
</li>
<?php

View File

@@ -63,7 +63,7 @@ if ( ! class_exists( 'SportsPress_Bulk_Actions' ) ) :
* Add option to the team bulk actions dropdown.
*/
public function team_actions( $bulk_actions ) {
$bulk_actions['sp_calendar'] = __( 'Generate Calendars', 'sportspress' );
$bulk_actions['sp_calendar'] = esc_attr__( 'Generate Calendars', 'sportspress' );
return $bulk_actions;
}
@@ -77,7 +77,7 @@ if ( ! class_exists( 'SportsPress_Bulk_Actions' ) ) :
foreach ( $post_ids as $post_id ) {
$post = array();
$post['post_title'] = get_the_title( $post_id ) . ' ' . __( 'Calendar', 'sportspress' );
$post['post_title'] = get_the_title( $post_id ) . ' ' . esc_attr__( 'Calendar', 'sportspress' );
$post['post_type'] = 'sp_calendar';
$post['post_status'] = 'publish';
@@ -100,9 +100,9 @@ if ( ! class_exists( 'SportsPress_Bulk_Actions' ) ) :
* Add option to the event bulk actions dropdown.
*/
public function event_actions( $bulk_actions ) {
$bulk_actions['sp_postpone'] = __( 'Postpone events', 'sportspress' );
$bulk_actions['sp_cancel'] = __( 'Cancel events', 'sportspress' );
$bulk_actions['sp_ok'] = __( 'Set events as on time', 'sportspress' );
$bulk_actions['sp_postpone'] = esc_attr__( 'Postpone events', 'sportspress' );
$bulk_actions['sp_cancel'] = esc_attr__( 'Cancel events', 'sportspress' );
$bulk_actions['sp_ok'] = esc_attr__( 'Set events as on time', 'sportspress' );
return $bulk_actions;
}
@@ -143,52 +143,52 @@ if ( ! class_exists( 'SportsPress_Bulk_Actions' ) ) :
printf(
'<div id="message" class="updated notice notice-success is-dismissible"><p>' .
_n(
esc_attr( _n(
'Generated %s calendar.',
'Generated %s calendars.',
$count,
'sportspress'
) . ' <a href="' . admin_url( 'edit.php?post_type=sp_calendar' ) . '">' . __( 'View', 'sportspress' ) . '</a></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>',
$count
) ) . ' <a href="' . esc_url( admin_url( 'edit.php?post_type=sp_calendar' ) ) . '">' . esc_attr__( 'View', 'sportspress' ) . '</a></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>',
esc_attr( $count )
);
} elseif ( ! empty( $_REQUEST['sp_bulk_postponed_events'] ) ) {
$count = intval( $_REQUEST['sp_bulk_postponed_events'] );
printf(
'<div id="message" class="updated notice notice-success is-dismissible"><p>' .
_n(
esc_attr( _n(
'Postponed %s event.',
'Postponed %s events.',
$count,
'sportspress'
) . '</p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>',
$count
) ) . '</p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>',
esc_attr( $count )
);
} elseif ( ! empty( $_REQUEST['sp_bulk_cancelled_events'] ) ) {
$count = intval( $_REQUEST['sp_bulk_cancelled_events'] );
printf(
'<div id="message" class="updated notice notice-success is-dismissible"><p>' .
_n(
esc_attr( _n(
'Canceled %s event.',
'Canceled %s events.',
$count,
'sportspress'
) . '</p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>',
$count
) ) . '</p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>',
esc_attr( $count )
);
} elseif ( ! empty( $_REQUEST['sp_bulk_ok_events'] ) ) {
$count = intval( $_REQUEST['sp_bulk_ok_events'] );
printf(
'<div id="message" class="updated notice notice-success is-dismissible"><p>' .
_n(
esc_attr( _n(
'Set %s event as on time.',
'Set %s event as on time.',
$count,
'sportspress'
) . '</p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>',
$count
) ) . '</p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>',
esc_attr( $count )
);
}
}

View File

@@ -75,15 +75,15 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) :
'sportspress_register_post_type_calendar',
array(
'labels' => array(
'name' => __( 'Calendars', 'sportspress' ),
'singular_name' => __( 'Calendar', 'sportspress' ),
'add_new_item' => __( 'Add New Calendar', 'sportspress' ),
'edit_item' => __( 'Edit Calendar', 'sportspress' ),
'new_item' => __( 'New', 'sportspress' ),
'view_item' => __( 'View Calendar', 'sportspress' ),
'search_items' => __( 'Search', 'sportspress' ),
'not_found' => __( 'No results found.', 'sportspress' ),
'not_found_in_trash' => __( 'No results found.', 'sportspress' ),
'name' => esc_attr__( 'Calendars', 'sportspress' ),
'singular_name' => esc_attr__( 'Calendar', 'sportspress' ),
'add_new_item' => esc_attr__( 'Add New Calendar', 'sportspress' ),
'edit_item' => esc_attr__( 'Edit Calendar', 'sportspress' ),
'new_item' => esc_attr__( 'New', 'sportspress' ),
'view_item' => esc_attr__( 'View Calendar', 'sportspress' ),
'search_items' => esc_attr__( 'Search', 'sportspress' ),
'not_found' => esc_attr__( 'No results found.', 'sportspress' ),
'not_found_in_trash' => esc_attr__( 'No results found.', 'sportspress' ),
),
'public' => true,
'show_ui' => true,
@@ -150,7 +150,7 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) :
'get_callback' => 'SP_REST_API::get_post_meta',
'update_callback' => 'SP_REST_API::update_post_meta',
'schema' => array(
'description' => __( 'Layout', 'sportspress' ),
'description' => esc_attr__( 'Layout', 'sportspress' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
'arg_options' => array(
@@ -166,7 +166,7 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) :
array(
'get_callback' => 'SP_REST_API::get_post_data',
'schema' => array(
'description' => __( 'Events', 'sportspress' ),
'description' => esc_attr__( 'Events', 'sportspress' ),
'type' => 'array',
'context' => array( 'view' ),
'arg_options' => array(
@@ -185,40 +185,40 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) :
public function add_meta_boxes( $meta_boxes ) {
$meta_boxes['sp_calendar'] = array(
'shortcode' => array(
'title' => __( 'Shortcode', 'sportspress' ),
'title' => esc_attr__( 'Shortcode', 'sportspress' ),
'output' => 'SP_Meta_Box_Calendar_Shortcode::output',
'context' => 'side',
'priority' => 'default',
),
'feeds' => array(
'title' => __( 'Feeds', 'sportspress' ),
'title' => esc_attr__( 'Feeds', 'sportspress' ),
'output' => 'SP_Meta_Box_Calendar_Feeds::output',
'context' => 'side',
'priority' => 'default',
),
'format' => array(
'title' => __( 'Layout', 'sportspress' ),
'title' => esc_attr__( 'Layout', 'sportspress' ),
'save' => 'SP_Meta_Box_Calendar_Format::save',
'output' => 'SP_Meta_Box_Calendar_Format::output',
'context' => 'side',
'priority' => 'default',
),
'columns' => array(
'title' => __( 'Columns', 'sportspress' ),
'title' => esc_attr__( 'Columns', 'sportspress' ),
'save' => 'SP_Meta_Box_Calendar_Columns::save',
'output' => 'SP_Meta_Box_Calendar_Columns::output',
'context' => 'side',
'priority' => 'default',
),
'details' => array(
'title' => __( 'Details', 'sportspress' ),
'title' => esc_attr__( 'Details', 'sportspress' ),
'save' => 'SP_Meta_Box_Calendar_Details::save',
'output' => 'SP_Meta_Box_Calendar_Details::output',
'context' => 'side',
'priority' => 'default',
),
'data' => array(
'title' => __( 'Events', 'sportspress' ),
'title' => esc_attr__( 'Events', 'sportspress' ),
'save' => 'SP_Meta_Box_Calendar_Data::save',
'output' => 'SP_Meta_Box_Calendar_Data::output',
'context' => 'normal',
@@ -250,7 +250,7 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) :
$settings,
array(
array(
'title' => __( 'Event List', 'sportspress' ),
'title' => esc_attr__( 'Event List', 'sportspress' ),
'type' => 'title',
'id' => 'event_list_options',
),
@@ -259,60 +259,60 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) :
'sportspress_event_list_options',
array(
array(
'title' => __( 'Title', 'sportspress' ),
'desc' => __( 'Display calendar title', 'sportspress' ),
'title' => esc_attr__( 'Title', 'sportspress' ),
'desc' => esc_attr__( 'Display calendar title', 'sportspress' ),
'id' => 'sportspress_event_list_show_title',
'default' => 'yes',
'type' => 'checkbox',
),
array(
'title' => __( 'Teams', 'sportspress' ),
'desc' => __( 'Display logos', 'sportspress' ),
'title' => esc_attr__( 'Teams', 'sportspress' ),
'desc' => esc_attr__( 'Display logos', 'sportspress' ),
'id' => 'sportspress_event_list_show_logos',
'default' => 'no',
'type' => 'checkbox',
),
array(
'title' => __( 'Title Format', 'sportspress' ),
'title' => esc_attr__( 'Title Format', 'sportspress' ),
'id' => 'sportspress_event_list_title_format',
'default' => 'title',
'type' => 'select',
'options' => array(
'title' => __( 'Title', 'sportspress' ),
'teams' => __( 'Teams', 'sportspress' ),
'homeaway' => sprintf( '%s | %s', __( 'Home', 'sportspress' ), __( 'Away', 'sportspress' ) ),
'title' => esc_attr__( 'Title', 'sportspress' ),
'teams' => esc_attr__( 'Teams', 'sportspress' ),
'homeaway' => sprintf( '%s | %s', esc_attr__( 'Home', 'sportspress' ), esc_attr__( 'Away', 'sportspress' ) ),
),
),
array(
'title' => __( 'Time/Results Format', 'sportspress' ),
'title' => esc_attr__( 'Time/Results Format', 'sportspress' ),
'id' => 'sportspress_event_list_time_format',
'default' => 'combined',
'type' => 'select',
'options' => array(
'combined' => __( 'Combined', 'sportspress' ),
'separate' => __( 'Separate', 'sportspress' ),
'time' => __( 'Time Only', 'sportspress' ),
'results' => __( 'Results Only', 'sportspress' ),
'combined' => esc_attr__( 'Combined', 'sportspress' ),
'separate' => esc_attr__( 'Separate', 'sportspress' ),
'time' => esc_attr__( 'Time Only', 'sportspress' ),
'results' => esc_attr__( 'Results Only', 'sportspress' ),
),
),
array(
'title' => __( 'Pagination', 'sportspress' ),
'desc' => __( 'Paginate', 'sportspress' ),
'title' => esc_attr__( 'Pagination', 'sportspress' ),
'desc' => esc_attr__( 'Paginate', 'sportspress' ),
'id' => 'sportspress_event_list_paginated',
'default' => 'yes',
'type' => 'checkbox',
),
array(
'title' => __( 'Limit', 'sportspress' ),
'title' => esc_attr__( 'Limit', 'sportspress' ),
'id' => 'sportspress_event_list_rows',
'class' => 'small-text',
'default' => '10',
'desc' => __( 'events', 'sportspress' ),
'desc' => esc_attr__( 'events', 'sportspress' ),
'type' => 'number',
'custom_attributes' => array(
'min' => 1,
@@ -327,7 +327,7 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) :
'id' => 'event_list_options',
),
array(
'title' => __( 'Event Blocks', 'sportspress' ),
'title' => esc_attr__( 'Event Blocks', 'sportspress' ),
'type' => 'title',
'id' => 'event_blocks_options',
),
@@ -336,24 +336,24 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) :
'sportspress_event_blocks_options',
array(
array(
'title' => __( 'Title', 'sportspress' ),
'desc' => __( 'Display calendar title', 'sportspress' ),
'title' => esc_attr__( 'Title', 'sportspress' ),
'desc' => esc_attr__( 'Display calendar title', 'sportspress' ),
'id' => 'sportspress_event_blocks_show_title',
'default' => 'no',
'type' => 'checkbox',
),
array(
'title' => __( 'Teams', 'sportspress' ),
'desc' => __( 'Display logos', 'sportspress' ),
'title' => esc_attr__( 'Teams', 'sportspress' ),
'desc' => esc_attr__( 'Display logos', 'sportspress' ),
'id' => 'sportspress_event_blocks_show_logos',
'default' => 'yes',
'type' => 'checkbox',
),
array(
'title' => __( 'Details', 'sportspress' ),
'desc' => __( 'Display league', 'sportspress' ),
'title' => esc_attr__( 'Details', 'sportspress' ),
'desc' => esc_attr__( 'Display league', 'sportspress' ),
'id' => 'sportspress_event_blocks_show_league',
'default' => 'no',
'type' => 'checkbox',
@@ -361,7 +361,7 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) :
),
array(
'desc' => __( 'Display season', 'sportspress' ),
'desc' => esc_attr__( 'Display season', 'sportspress' ),
'id' => 'sportspress_event_blocks_show_season',
'default' => 'no',
'type' => 'checkbox',
@@ -369,7 +369,7 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) :
),
array(
'desc' => __( 'Display matchday', 'sportspress' ),
'desc' => esc_attr__( 'Display matchday', 'sportspress' ),
'id' => 'sportspress_event_blocks_show_matchday',
'default' => 'no',
'type' => 'checkbox',
@@ -377,7 +377,7 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) :
),
array(
'desc' => __( 'Display venue', 'sportspress' ),
'desc' => esc_attr__( 'Display venue', 'sportspress' ),
'id' => 'sportspress_event_blocks_show_venue',
'default' => 'no',
'type' => 'checkbox',
@@ -385,19 +385,19 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) :
),
array(
'title' => __( 'Pagination', 'sportspress' ),
'desc' => __( 'Paginate', 'sportspress' ),
'title' => esc_attr__( 'Pagination', 'sportspress' ),
'desc' => esc_attr__( 'Paginate', 'sportspress' ),
'id' => 'sportspress_event_blocks_paginated',
'default' => 'yes',
'type' => 'checkbox',
),
array(
'title' => __( 'Limit', 'sportspress' ),
'title' => esc_attr__( 'Limit', 'sportspress' ),
'id' => 'sportspress_event_blocks_rows',
'class' => 'small-text',
'default' => '5',
'desc' => __( 'events', 'sportspress' ),
'desc' => esc_attr__( 'events', 'sportspress' ),
'type' => 'number',
'custom_attributes' => array(
'min' => 1,
@@ -426,14 +426,14 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) :
$options,
array(
array(
'title' => __( 'Events', 'sportspress' ),
'title' => esc_attr__( 'Events', 'sportspress' ),
'id' => 'sportspress_team_events_format',
'default' => 'title',
'type' => 'select',
'options' => array(
'blocks' => __( 'Blocks', 'sportspress' ),
'calendar' => __( 'Calendar', 'sportspress' ),
'list' => __( 'List', 'sportspress' ),
'blocks' => esc_attr__( 'Blocks', 'sportspress' ),
'calendar' => esc_attr__( 'Calendar', 'sportspress' ),
'list' => esc_attr__( 'List', 'sportspress' ),
),
),
)
@@ -450,7 +450,7 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) :
$templates,
array(
'events' => array(
'title' => __( 'Events', 'sportspress' ),
'title' => esc_attr__( 'Events', 'sportspress' ),
'option' => 'sportspress_player_show_events',
'action' => 'sportspress_output_player_events',
'default' => 'no',
@@ -469,14 +469,14 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) :
$options,
array(
array(
'title' => __( 'Events', 'sportspress' ),
'title' => esc_attr__( 'Events', 'sportspress' ),
'id' => 'sportspress_player_events_format',
'default' => 'title',
'type' => 'select',
'options' => array(
'blocks' => __( 'Blocks', 'sportspress' ),
'calendar' => __( 'Calendar', 'sportspress' ),
'list' => __( 'List', 'sportspress' ),
'blocks' => esc_attr__( 'Blocks', 'sportspress' ),
'calendar' => esc_attr__( 'Calendar', 'sportspress' ),
'list' => esc_attr__( 'List', 'sportspress' ),
),
),
)
@@ -493,7 +493,7 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) :
$templates,
array(
'events' => array(
'title' => __( 'Events', 'sportspress' ),
'title' => esc_attr__( 'Events', 'sportspress' ),
'option' => 'sportspress_team_show_events',
'action' => 'sportspress_output_team_events',
'default' => 'no',

View File

@@ -79,7 +79,7 @@ if ( ! class_exists( 'SportsPress_Comments_Scheduled_Events' ) ) :
}
} else {
if ( get_option( 'comment_registration' ) ) {
return new WP_Error( 'not_logged_in', __( 'Sorry, you must be logged in to comment.' ), 403 );
return new WP_Error( 'not_logged_in', esc_attr__( 'Sorry, you must be logged in to comment.' ), 403 );
}
}
@@ -87,17 +87,17 @@ if ( ! class_exists( 'SportsPress_Comments_Scheduled_Events' ) ) :
if ( get_option( 'require_name_email' ) && ! $user->exists() ) {
if ( '' == $comment_author_email || '' == $comment_author ) {
// return new WP_Error( 'require_name_email', __( '<strong>ERROR</strong>: please fill the required fields (name, email).' ), 200 );
wp_die( __( '<strong>ERROR</strong>: please fill the required fields (name, email).' ), __( 'ERROR: please fill the required fields (name, email).' ), array( 'back_link' => true ) );
// return new WP_Error( 'require_name_email', esc_attr__( '<strong>ERROR</strong>: please fill the required fields (name, email).' ), 200 );
wp_die( esc_attr__( '<strong>ERROR</strong>: please fill the required fields (name, email).' ), esc_attr__( 'ERROR: please fill the required fields (name, email).' ), array( 'back_link' => true ) );
} elseif ( ! is_email( $comment_author_email ) ) {
// return new WP_Error( 'require_valid_email', __( '<strong>ERROR</strong>: please enter a valid email address.' ), 200 );
wp_die( __( '<strong>ERROR</strong>: please enter a valid email address.' ), __( 'ERROR: please enter a valid email address.' ), array( 'back_link' => true ) );
// return new WP_Error( 'require_valid_email', esc_attr__( '<strong>ERROR</strong>: please enter a valid email address.' ), 200 );
wp_die( esc_attr__( '<strong>ERROR</strong>: please enter a valid email address.' ), esc_attr__( 'ERROR: please enter a valid email address.' ), array( 'back_link' => true ) );
}
}
if ( '' == $comment_content ) {
// return new WP_Error( 'require_valid_comment', __( '<strong>ERROR</strong>: please type a comment.' ), 200 );
wp_die( __( '<strong>ERROR</strong>: please type a comment.' ), __( 'ERROR: please type a comment.' ), array( 'back_link' => true ) );
// return new WP_Error( 'require_valid_comment', esc_attr__( '<strong>ERROR</strong>: please type a comment.' ), 200 );
wp_die( esc_attr__( '<strong>ERROR</strong>: please type a comment.' ), esc_attr__( 'ERROR: please type a comment.' ), array( 'back_link' => true ) );
}
$comment_parent = isset( $_POST['comment_parent'] ) ? absint( $_POST['comment_parent'] ) : 0;
@@ -124,8 +124,8 @@ if ( ! class_exists( 'SportsPress_Comments_Scheduled_Events' ) ) :
}
if ( ! $comment_id ) {
// return new WP_Error( 'comment_save_error', __( '<strong>ERROR</strong>: The comment could not be saved. Please try again later.' ), 500 );
wp_die( __( '<strong>ERROR</strong>: The comment could not be saved. Please try again later.' ), __( 'ERROR: The comment could not be saved. Please try again later.' ), array( 'back_link' => true ) );
// return new WP_Error( 'comment_save_error', esc_attr__( '<strong>ERROR</strong>: The comment could not be saved. Please try again later.' ), 500 );
wp_die( esc_attr__( '<strong>ERROR</strong>: The comment could not be saved. Please try again later.' ), esc_attr__( 'ERROR: The comment could not be saved. Please try again later.' ), array( 'back_link' => true ) );
}
$comment = get_comment( $comment_id );

View File

@@ -85,7 +85,7 @@ if ( ! class_exists( 'SportsPress_Countdowns' ) ) :
$settings,
array(
array(
'title' => __( 'Countdown', 'sportspress' ),
'title' => esc_attr__( 'Countdown', 'sportspress' ),
'type' => 'title',
'id' => 'countdown_options',
),
@@ -94,15 +94,15 @@ if ( ! class_exists( 'SportsPress_Countdowns' ) ) :
'sportspress_countdown_options',
array(
array(
'title' => __( 'Display', 'sportspress' ),
'desc' => __( 'Logos', 'sportspress' ),
'title' => esc_attr__( 'Display', 'sportspress' ),
'desc' => esc_attr__( 'Logos', 'sportspress' ),
'id' => 'sportspress_countdown_show_logos',
'default' => 'no',
'type' => 'checkbox',
'checkboxgroup' => 'start',
),
array(
'desc' => __( 'Featured Image', 'sportspress' ),
'desc' => esc_attr__( 'Featured Image', 'sportspress' ),
'id' => 'sportspress_countdown_show_thumbnail',
'default' => 'no',
'type' => 'checkbox',

View File

@@ -54,12 +54,12 @@ if ( ! class_exists( 'SportsPress_Default_Nationality' ) ) :
* Add option to SportsPress General Settings.
*/
public function add_general_options( $settings ) {
$countries[''] = __( '&mdash; None &mdash;', 'sportspress' );
$countries[''] = esc_attr__( '&mdash; None &mdash;', 'sportspress' );
$sp_countries = new SP_Countries();
$countries = array_merge( $countries, $sp_countries->countries );
$settings[] = array(
'title' => __( 'Default Nationality', 'sportspress' ),
'title' => esc_attr__( 'Default Nationality', 'sportspress' ),
'id' => 'sportspress_default_nationality',
'default' => '',
'type' => 'select',

View File

@@ -73,15 +73,15 @@ if ( ! class_exists( 'SportsPress_Event_Specs' ) ) :
'sportspress_register_post_type_spec',
array(
'labels' => array(
'name' => __( 'Event Specs', 'sportspress' ),
'singular_name' => __( 'Event Spec', 'sportspress' ),
'add_new_item' => __( 'Add New Event Spec', 'sportspress' ),
'edit_item' => __( 'Edit Event Spec', 'sportspress' ),
'new_item' => __( 'New', 'sportspress' ),
'view_item' => __( 'View', 'sportspress' ),
'search_items' => __( 'Search', 'sportspress' ),
'not_found' => __( 'No results found.', 'sportspress' ),
'not_found_in_trash' => __( 'No results found.', 'sportspress' ),
'name' => esc_attr__( 'Event Specs', 'sportspress' ),
'singular_name' => esc_attr__( 'Event Spec', 'sportspress' ),
'add_new_item' => esc_attr__( 'Add New Event Spec', 'sportspress' ),
'edit_item' => esc_attr__( 'Edit Event Spec', 'sportspress' ),
'new_item' => esc_attr__( 'New', 'sportspress' ),
'view_item' => esc_attr__( 'View', 'sportspress' ),
'search_items' => esc_attr__( 'Search', 'sportspress' ),
'not_found' => esc_attr__( 'No results found.', 'sportspress' ),
'not_found_in_trash' => esc_attr__( 'No results found.', 'sportspress' ),
),
'public' => false,
'show_ui' => true,
@@ -148,16 +148,16 @@ if ( ! class_exists( 'SportsPress_Event_Specs' ) ) :
?>
<tr valign="top">
<th scope="row" class="titledesc">
<?php _e( 'Event Specs', 'sportspress' ); ?>
<p class="description"><?php _e( 'Add more details to an event.', 'sportspress' ); ?></p>
<?php esc_attr_e( 'Event Specs', 'sportspress' ); ?>
<p class="description"><?php esc_attr_e( 'Add more details to an event.', 'sportspress' ); ?></p>
</th>
<td class="forminp">
<table class="widefat sp-admin-config-table">
<thead>
<tr>
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
<th scope="col"><?php _e( 'Variable', 'sportspress' ); ?></th>
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
<th scope="col"><?php esc_attr_e( 'Label', 'sportspress' ); ?></th>
<th scope="col"><?php esc_attr_e( 'Variable', 'sportspress' ); ?></th>
<th scope="col"><?php esc_attr_e( 'Description', 'sportspress' ); ?></th>
<th scope="col" class="edit"></th>
</tr>
</thead>
@@ -171,23 +171,23 @@ if ( ! class_exists( 'SportsPress_Event_Specs' ) ) :
echo ' class="alternate"';}
?>
>
<td class="row-title"><?php echo $row->post_title; ?></td>
<td><code><?php echo $row->post_name; ?></code></td>
<td><p class="description"><?php echo $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="row-title"><?php echo wp_kses_post( $row->post_title ); ?></td>
<td><code><?php echo wp_kses_post( $row->post_name ); ?></code></td>
<td><p class="description"><?php echo wp_kses_post( $row->post_excerpt ); ?></p></td>
<td class="edit"><a class="button" href="<?php echo esc_url( get_edit_post_link( $row->ID ) ); ?>"><?php esc_attr_e( 'Edit', 'sportspress' ); ?></s></td>
</tr>
<?php
$i++;
endforeach; else :
?>
<tr class="alternate">
<td colspan="4"><?php _e( 'No results found.', 'sportspress' ); ?></td>
<td colspan="4"><?php esc_attr_e( 'No results found.', 'sportspress' ); ?></td>
</tr>
<?php endif; ?>
</table>
<div class="tablenav bottom">
<a class="button alignleft" href="<?php echo admin_url( 'edit.php?post_type=sp_spec' ); ?>"><?php _e( 'View All', 'sportspress' ); ?></a>
<a class="button button-primary alignright" href="<?php echo admin_url( 'post-new.php?post_type=sp_spec' ); ?>"><?php _e( 'Add New', 'sportspress' ); ?></a>
<a class="button alignleft" href="<?php echo esc_url( admin_url( 'edit.php?post_type=sp_spec' ) ); ?>"><?php esc_attr_e( 'View All', 'sportspress' ); ?></a>
<a class="button button-primary alignright" href="<?php echo esc_url( admin_url( 'post-new.php?post_type=sp_spec' ) ); ?>"><?php esc_attr_e( 'Add New', 'sportspress' ); ?></a>
<br class="clear">
</div>
</td>
@@ -205,7 +205,7 @@ endforeach; else :
public function add_meta_boxes( $meta_boxes ) {
$meta_boxes['sp_spec'] = array(
'details' => array(
'title' => __( 'Specs', 'sportspress' ),
'title' => esc_attr__( 'Specs', 'sportspress' ),
'save' => 'SP_Meta_Box_Spec_Details::save',
'output' => 'SP_Meta_Box_Spec_Details::output',
'context' => 'normal',
@@ -213,7 +213,7 @@ endforeach; else :
),
);
$meta_boxes['sp_event']['specs'] = array(
'title' => __( 'Specs', 'sportspress' ),
'title' => esc_attr__( 'Specs', 'sportspress' ),
'save' => 'SP_Meta_Box_Event_Specs::save',
'output' => 'SP_Meta_Box_Event_Specs::output',
'context' => 'side',
@@ -245,7 +245,7 @@ endforeach; else :
* @return array
*/
public function calendar_columns( $columns = array() ) {
$columns['event_specs'] = __( 'Event Specs', 'sportspress' );
$columns['event_specs'] = esc_attr__( 'Event Specs', 'sportspress' );
return $columns;
}
@@ -263,7 +263,7 @@ endforeach; else :
foreach ( $spec_labels as $spec_label ) {
?>
<th class="data-specs">
<?php echo $spec_label; ?>
<?php echo wp_kses_post( $spec_label ); ?>
</th>
<?php
}
@@ -284,7 +284,7 @@ endforeach; else :
<td class="data-spec">
<?php
if ( isset( $specs[ $spec_label ] ) ) {
echo $specs[ $spec_label ];
echo wp_kses_post( $specs[ $spec_label ] );
} else {
echo '-';
}
@@ -304,7 +304,7 @@ endforeach; else :
$specs = $event->specs( false );
$spec_labels = (array) sp_get_var_labels( 'sp_spec', null, false );
foreach ( $specs as $spec_label => $spec_value ) {
echo '<div class="sp_event_spec"><span class="sp_event_spec_label">' . $spec_label . ':</span><span class="sp_event_spec_value"> ' . $spec_value . '</span></div>';
echo '<div class="sp_event_spec"><span class="sp_event_spec_label">' . wp_kses_post( $spec_label ) . ':</span><span class="sp_event_spec_value"> ' . wp_kses_post( $spec_value ) . '</span></div>';
}
}
}

View File

@@ -68,10 +68,10 @@ if ( ! class_exists( 'SportsPress_Event_Status' ) ) :
$this->statuses = apply_filters(
'sportspress_event_statuses',
array(
'ok' => __( 'On time', 'sportspress' ),
'tbd' => __( 'TBD', 'sportspress' ),
'postponed' => __( 'Postponed', 'sportspress' ),
'cancelled' => __( 'Canceled', 'sportspress' ),
'ok' => esc_attr__( 'On time', 'sportspress' ),
'tbd' => esc_attr__( 'TBD', 'sportspress' ),
'postponed' => esc_attr__( 'Postponed', 'sportspress' ),
'cancelled' => esc_attr__( 'Canceled', 'sportspress' ),
)
);
}
@@ -89,11 +89,11 @@ if ( ! class_exists( 'SportsPress_Event_Status' ) ) :
}
?>
<div class="misc-pub-section sp-pub-event-status">
<span class="sp-event-status"><?php _e( 'Time:', 'sportspress' ); ?> <strong class="sp-event-status-display" data-sp-event-status="<?php echo $status; ?>"><?php echo $this->statuses[ $status ]; ?></strong></span>
<a href="#" class="sp-edit-event-status hide-if-no-js"><span aria-hidden="true"><?php _e( 'Edit', 'sportspress' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit status' ); ?></span></a>
<span class="sp-event-status"><?php esc_attr_e( 'Time:', 'sportspress' ); ?> <strong class="sp-event-status-display" data-sp-event-status="<?php echo esc_attr( $status ); ?>"><?php echo wp_kses_post( $this->statuses[ $status ] ); ?></strong></span>
<a href="#" class="sp-edit-event-status hide-if-no-js"><span aria-hidden="true"><?php esc_attr_e( 'Edit', 'sportspress' ); ?></span> <span class="screen-reader-text"><?php esc_attr_e( 'Edit status' ); ?></span></a>
<div class="sp-event-status-select hide-if-js">
<?php foreach ( $this->statuses as $value => $label ) { ?>
<label><input type="radio" name="sp_status" value="<?php echo $value; ?>" data-sp-event-status="<?php echo $label; ?>" <?php checked( $status, $value ); ?>> <?php echo $label; ?></label><br>
<label><input type="radio" name="sp_status" value="<?php echo esc_attr( $value ); ?>" data-sp-event-status="<?php echo esc_attr( $label ); ?>" <?php checked( $status, $value ); ?>> <?php echo wp_kses_post( $label ); ?></label><br>
<?php } ?>
<p>
<a href="#" class="sp-save-event-status hide-if-no-js button">OK</a>

View File

@@ -58,7 +58,7 @@ if ( ! class_exists( 'SportsPress_Event_Videos' ) ) :
*/
public function add_meta_box( $meta_boxes ) {
$meta_boxes['sp_event']['video'] = array(
'title' => __( 'Video', 'sportspress' ),
'title' => esc_attr__( 'Video', 'sportspress' ),
'output' => 'SP_Meta_Box_Event_Video::output',
'save' => 'SP_Meta_Box_Event_Video::save',
'context' => 'side',

View File

@@ -69,7 +69,7 @@ if ( ! class_exists( 'SportsPress_Gutenberg' ) ) :
array(
array(
'slug' => 'sportspress',
'title' => __( 'SportsPress', 'sportspress' ),
'title' => esc_attr__( 'SportsPress', 'sportspress' ),
),
)
);
@@ -84,11 +84,11 @@ if ( ! class_exists( 'SportsPress_Gutenberg' ) ) :
$strings = apply_filters(
'sportspress_localized_strings',
array(
'event_calendar' => __( 'Event Calendar', 'sportspress' ),
'properties' => __( 'Properties', 'sportspress' ),
'title' => __( 'Title', 'sportspress' ),
'select_calendar' => sprintf( __( 'Select %s:', 'sportspress' ), __( 'Calendar', 'sportspress' ) ),
'all' => __( 'All', 'sportspress' ),
'event_calendar' => esc_attr__( 'Event Calendar', 'sportspress' ),
'properties' => esc_attr__( 'Properties', 'sportspress' ),
'title' => esc_attr__( 'Title', 'sportspress' ),
'select_calendar' => sprintf( esc_attr__( 'Select %s:', 'sportspress' ), esc_attr__( 'Calendar', 'sportspress' ) ),
'all' => esc_attr__( 'All', 'sportspress' ),
)
);

View File

@@ -188,7 +188,7 @@ if ( ! class_exists( 'SportsPress_Icons' ) ) :
$icons .= '<label class="button"><input name="sp_icon" type="radio" value="' . $icon . '" ' . checked( $selected, $icon, false ) . '></input><i class="sp-icon-' . $icon . '"></i></label>';
}
$icons .= '<label class="button"><input name="sp_icon" type="radio" value="" ' . checked( $selected, null, false ) . '></input>' . __( 'Image', 'sportspress' ) . '</label>';
$icons .= '<label class="button"><input name="sp_icon" type="radio" value="" ' . checked( $selected, null, false ) . '></input>' . esc_attr__( 'Image', 'sportspress' ) . '</label>';
// Get color value
$value = get_post_meta( $id, 'sp_color', true );
@@ -198,9 +198,9 @@ if ( ! class_exists( 'SportsPress_Icons' ) ) :
$color = '<div class="sp-color-box-for-icon"><input name="sp_color" id="sp_color" type="text" value="' . esc_attr( $value ) . '" size="7" class="colorpick" /> <div id="colorPickerDiv" class="colorpickdiv"></div></div>';
$content = '<p><strong>' . __( 'Select Icon', 'sportspress' ) . '</strong></p>
$content = '<p><strong>' . esc_attr__( 'Select Icon', 'sportspress' ) . '</strong></p>
<p class="sp-icons">' . $icons . '</p>
<div class="sp-para sp-custom-colors' . ( null == $selected ? ' hidden' : '' ) . '"><label data-sp-colors="' . $value . '"><strong>' . __( 'Customize', 'sportspress' ) . '</strong><br></label>' . $color . '</div>
<div class="sp-para sp-custom-colors' . ( null == $selected ? ' hidden' : '' ) . '"><label data-sp-colors="' . $value . '"><strong>' . esc_attr__( 'Customize', 'sportspress' ) . '</strong><br></label>' . $color . '</div>
<div class="sp-custom-thumbnail' . ( null == $selected ? '' : ' hidden' ) . '">' . $content . '</div>';
return $content;
}

View File

@@ -210,11 +210,11 @@ if ( ! class_exists( 'SportsPress_Lazy_Loading' ) ) :
}
}
?>
<div id="<?php echo $slug; ?>-all" class="posttypediv tabs-panel wp-tab-panel sp-tab-panel sp-ajax-checklist sp-select-all-range" style="display: <?php echo $display; ?>;">
<input type="hidden" value="0" name="<?php echo $slug; ?>
<div id="<?php echo esc_attr( $slug ); ?>-all" class="posttypediv tabs-panel wp-tab-panel sp-tab-panel sp-ajax-checklist sp-select-all-range" style="display: <?php echo esc_attr( $display ); ?>;">
<input type="hidden" value="0" name="<?php echo esc_attr( $slug ); ?>
<?php
if ( isset( $index ) ) {
echo '[' . $index . ']';}
echo '[' . esc_attr( $index ) . ']';}
?>
[]" />
<ul class="categorychecklist form-no-clear">
@@ -222,16 +222,16 @@ if ( ! class_exists( 'SportsPress_Lazy_Loading' ) ) :
<li class="sp-select-all-container">
<label class="selectit">
<input type="checkbox" class="sp-select-all" <?php checked( empty( $diff ) ); ?>>
<strong><?php _e( 'Select All', 'sportspress' ); ?></strong>
<strong><?php esc_attr_e( 'Select All', 'sportspress' ); ?></strong>
</label>
</li>
<?php foreach ( $posts as $post ) { ?>
<li>
<label class="selectit">
<input type="checkbox" value="<?php echo $post->ID; ?>" name="<?php echo $slug; ?>
<input type="checkbox" value="<?php echo esc_attr( $post->ID ); ?>" name="<?php echo esc_attr( $slug ); ?>
<?php
if ( isset( $index ) ) {
echo '[' . $index . ']';}
echo '[' . esc_attr( $index ) . ']';}
?>
[]" <?php checked( array_key_exists( $post->ID, $selected ) ); ?>>
<?php
@@ -257,10 +257,10 @@ if ( ! class_exists( 'SportsPress_Lazy_Loading' ) ) :
?>
<li>
<label class="selectit">
<input type="checkbox" value="<?php echo $post_id; ?>" name="<?php echo $slug; ?>
<input type="checkbox" value="<?php echo esc_attr( $post_id ); ?>" name="<?php echo esc_attr( $slug ); ?>
<?php
if ( isset( $index ) ) {
echo '[' . $index . ']';}
echo '[' . esc_attr( $index ) . ']';}
?>
[]" <?php checked( true ); ?>>
<?php
@@ -278,10 +278,10 @@ if ( ! class_exists( 'SportsPress_Lazy_Loading' ) ) :
}
}
?>
<li class="sp-ajax-show-all-container"><a class="sp-ajax-show-all" href="#show-all-<?php echo $slug; ?>s"><?php _e( 'Show all', 'sportspress' ); ?></a></li>
<li class="sp-ajax-show-all-container"><a class="sp-ajax-show-all" href="#show-all-<?php echo esc_attr( $slug ); ?>s"><?php esc_attr_e( 'Show all', 'sportspress' ); ?></a></li>
<?php } else { ?>
<li class="sp-ajax-show-all-container"><?php _e( 'No results found.', 'sportspress' ); ?>
<a class="sp-ajax-show-all" href="#show-all-<?php echo $slug; ?>s"><?php _e( 'Show all', 'sportspress' ); ?></a></li>
<li class="sp-ajax-show-all-container"><?php esc_attr_e( 'No results found.', 'sportspress' ); ?>
<a class="sp-ajax-show-all" href="#show-all-<?php echo esc_attr( $slug ); ?>s"><?php esc_attr_e( 'Show all', 'sportspress' ); ?></a></li>
<?php } ?>
</ul>
</div>
@@ -295,10 +295,10 @@ if ( ! class_exists( 'SportsPress_Lazy_Loading' ) ) :
$strings = array_merge(
$strings,
array(
'no_results_found' => __( 'No results found.', 'sportspress' ),
'select_all' => __( 'Select All', 'sportspress' ),
'show_all' => __( 'Show all', 'sportspress' ),
'loading' => __( 'Loading&hellip;', 'sportspress' ),
'no_results_found' => esc_attr__( 'No results found.', 'sportspress' ),
'select_all' => esc_attr__( 'Select All', 'sportspress' ),
'show_all' => esc_attr__( 'Show all', 'sportspress' ),
'loading' => esc_attr__( 'Loading&hellip;', 'sportspress' ),
'option_filter_by_league' => get_option( 'sportspress_event_filter_teams_by_league', 'no' ),
'option_filter_by_season' => get_option( 'sportspress_event_filter_teams_by_season', 'no' ),
)

View File

@@ -72,15 +72,15 @@ if ( ! class_exists( 'SportsPress_League_Tables' ) ) :
'sportspress_register_post_type_table',
array(
'labels' => array(
'name' => __( 'League Tables', 'sportspress' ),
'singular_name' => __( 'League Table', 'sportspress' ),
'add_new_item' => __( 'Add New League Table', 'sportspress' ),
'edit_item' => __( 'Edit League Table', 'sportspress' ),
'new_item' => __( 'New', 'sportspress' ),
'view_item' => __( 'View League Table', 'sportspress' ),
'search_items' => __( 'Search', 'sportspress' ),
'not_found' => __( 'No results found.', 'sportspress' ),
'not_found_in_trash' => __( 'No results found.', 'sportspress' ),
'name' => esc_attr__( 'League Tables', 'sportspress' ),
'singular_name' => esc_attr__( 'League Table', 'sportspress' ),
'add_new_item' => esc_attr__( 'Add New League Table', 'sportspress' ),
'edit_item' => esc_attr__( 'Edit League Table', 'sportspress' ),
'new_item' => esc_attr__( 'New', 'sportspress' ),
'view_item' => esc_attr__( 'View League Table', 'sportspress' ),
'search_items' => esc_attr__( 'Search', 'sportspress' ),
'not_found' => esc_attr__( 'No results found.', 'sportspress' ),
'not_found_in_trash' => esc_attr__( 'No results found.', 'sportspress' ),
),
'public' => true,
'show_ui' => true,
@@ -147,7 +147,7 @@ if ( ! class_exists( 'SportsPress_League_Tables' ) ) :
'get_callback' => 'SP_REST_API::get_post_data',
'update_callback' => 'SP_REST_API::update_post_meta_arrays',
'schema' => array(
'description' => __( 'League Table', 'sportspress' ),
'description' => esc_attr__( 'League Table', 'sportspress' ),
'type' => 'array',
'context' => array( 'view', 'edit' ),
'arg_options' => array(
@@ -166,7 +166,7 @@ if ( ! class_exists( 'SportsPress_League_Tables' ) ) :
public function add_meta_boxes( $meta_boxes ) {
if ( 'yes' == get_option( 'sportspress_team_column_editing', 'no' ) ) {
$meta_boxes['sp_team']['columns'] = array(
'title' => __( 'Table Columns', 'sportspress' ),
'title' => esc_attr__( 'Table Columns', 'sportspress' ),
'output' => 'SP_Meta_Box_Team_Columns::output',
'save' => 'SP_Meta_Box_Team_Columns::save',
'context' => 'normal',
@@ -174,7 +174,7 @@ if ( ! class_exists( 'SportsPress_League_Tables' ) ) :
);
}
$meta_boxes['sp_team']['tables'] = array(
'title' => __( 'League Tables', 'sportspress' ),
'title' => esc_attr__( 'League Tables', 'sportspress' ),
'output' => 'SP_Meta_Box_Team_Tables::output',
'save' => 'SP_Meta_Box_Team_Tables::save',
'context' => 'normal',
@@ -182,34 +182,34 @@ if ( ! class_exists( 'SportsPress_League_Tables' ) ) :
);
$meta_boxes['sp_table'] = array(
'mode' => array(
'title' => __( 'Mode', 'sportspress' ),
'title' => esc_attr__( 'Mode', 'sportspress' ),
'save' => 'SP_Meta_Box_Table_Mode::save',
'output' => 'SP_Meta_Box_Table_Mode::output',
'context' => 'side',
'priority' => 'default',
),
'shortcode' => array(
'title' => __( 'Shortcode', 'sportspress' ),
'title' => esc_attr__( 'Shortcode', 'sportspress' ),
'output' => 'SP_Meta_Box_Table_Shortcode::output',
'context' => 'side',
'priority' => 'default',
),
'format' => array(
'title' => __( 'Layout', 'sportspress' ),
'title' => esc_attr__( 'Layout', 'sportspress' ),
'save' => 'SP_Meta_Box_Table_Format::save',
'output' => 'SP_Meta_Box_Table_Format::output',
'context' => 'side',
'priority' => 'default',
),
'details' => array(
'title' => __( 'Details', 'sportspress' ),
'title' => esc_attr__( 'Details', 'sportspress' ),
'save' => 'SP_Meta_Box_Table_Details::save',
'output' => 'SP_Meta_Box_Table_Details::output',
'context' => 'side',
'priority' => 'default',
),
'data' => array(
'title' => __( 'League Table', 'sportspress' ),
'title' => esc_attr__( 'League Table', 'sportspress' ),
'save' => 'SP_Meta_Box_Table_Data::save',
'output' => 'SP_Meta_Box_Table_Data::output',
'context' => 'normal',
@@ -240,7 +240,7 @@ if ( ! class_exists( 'SportsPress_League_Tables' ) ) :
$settings,
array(
array(
'title' => __( 'League Tables', 'sportspress' ),
'title' => esc_attr__( 'League Tables', 'sportspress' ),
'type' => 'title',
'id' => 'table_options',
),
@@ -249,35 +249,35 @@ if ( ! class_exists( 'SportsPress_League_Tables' ) ) :
'sportspress_table_options',
array(
array(
'title' => __( 'Title', 'sportspress' ),
'desc' => __( 'Display title', 'sportspress' ),
'title' => esc_attr__( 'Title', 'sportspress' ),
'desc' => esc_attr__( 'Display title', 'sportspress' ),
'id' => 'sportspress_table_show_title',
'default' => 'yes',
'type' => 'checkbox',
),
array(
'title' => __( 'Teams', 'sportspress' ),
'desc' => __( 'Display logos', 'sportspress' ),
'title' => esc_attr__( 'Teams', 'sportspress' ),
'desc' => esc_attr__( 'Display logos', 'sportspress' ),
'id' => 'sportspress_table_show_logos',
'default' => 'yes',
'type' => 'checkbox',
),
array(
'title' => __( 'Pagination', 'sportspress' ),
'desc' => __( 'Paginate', 'sportspress' ),
'title' => esc_attr__( 'Pagination', 'sportspress' ),
'desc' => esc_attr__( 'Paginate', 'sportspress' ),
'id' => 'sportspress_table_paginated',
'default' => 'yes',
'type' => 'checkbox',
),
array(
'title' => __( 'Limit', 'sportspress' ),
'title' => esc_attr__( 'Limit', 'sportspress' ),
'id' => 'sportspress_table_rows',
'class' => 'small-text',
'default' => '10',
'desc' => __( 'teams', 'sportspress' ),
'desc' => esc_attr__( 'teams', 'sportspress' ),
'type' => 'number',
'custom_attributes' => array(
'min' => 1,
@@ -286,11 +286,11 @@ if ( ! class_exists( 'SportsPress_League_Tables' ) ) :
),
array(
'title' => __( 'Form', 'sportspress' ),
'title' => esc_attr__( 'Form', 'sportspress' ),
'id' => 'sportspress_form_limit',
'class' => 'small-text',
'default' => '5',
'desc' => __( 'events', 'sportspress' ),
'desc' => esc_attr__( 'events', 'sportspress' ),
'type' => 'number',
'custom_attributes' => array(
'min' => 1,
@@ -299,21 +299,21 @@ if ( ! class_exists( 'SportsPress_League_Tables' ) ) :
),
array(
'title' => __( 'Pos', 'sportspress' ),
'desc' => __( 'Always increment', 'sportspress' ),
'title' => esc_attr__( 'Pos', 'sportspress' ),
'desc' => esc_attr__( 'Always increment', 'sportspress' ),
'id' => 'sportspress_table_increment',
'default' => 'no',
'type' => 'checkbox',
),
array(
'title' => __( 'Tiebreaker', 'sportspress' ),
'title' => esc_attr__( 'Tiebreaker', 'sportspress' ),
'id' => 'sportspress_table_tiebreaker',
'default' => 'none',
'type' => 'select',
'options' => array(
'none' => __( 'None', 'sportspress' ),
'h2h' => __( 'Head to head', 'sportspress' ),
'none' => esc_attr__( 'None', 'sportspress' ),
'h2h' => esc_attr__( 'Head to head', 'sportspress' ),
),
),
)
@@ -337,8 +337,8 @@ if ( ! class_exists( 'SportsPress_League_Tables' ) ) :
$templates,
array(
'tables' => array(
'title' => __( 'League Tables', 'sportspress' ),
'label' => __( 'League Table', 'sportspress' ),
'title' => esc_attr__( 'League Tables', 'sportspress' ),
'label' => esc_attr__( 'League Table', 'sportspress' ),
'option' => 'sportspress_team_show_tables',
'action' => 'sportspress_output_team_tables',
'default' => 'yes',

View File

@@ -67,7 +67,7 @@ if ( ! class_exists( 'SportsPress_Next_Team_Preset' ) ) :
* @return array
*/
public function add_options( $options ) {
$options['Presets']['$nextteam'] = __( 'Next Team', 'sportspress' );
$options['Presets']['$nextteam'] = esc_attr__( 'Next Team', 'sportspress' );
return $options;
}
@@ -168,8 +168,8 @@ if ( ! class_exists( 'SportsPress_Next_Team_Preset' ) ) :
*/
public function add_settings( $settings ) {
$settings[] = array(
'title' => __( 'Next Team', 'sportspress' ),
'desc' => __( 'Filter by League', 'sportspress' ),
'title' => esc_attr__( 'Next Team', 'sportspress' ),
'desc' => esc_attr__( 'Filter by League', 'sportspress' ),
'id' => 'sportspress_table_next_team_filter_league',
'default' => 'no',
'type' => 'checkbox',

View File

@@ -85,23 +85,23 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) :
*/
public static function register_taxonomy() {
$labels = array(
'name' => __( 'Duties', 'sportspress' ),
'singular_name' => __( 'Duty', 'sportspress' ),
'all_items' => __( 'All', 'sportspress' ),
'edit_item' => __( 'Edit Duty', 'sportspress' ),
'view_item' => __( 'View', 'sportspress' ),
'update_item' => __( 'Update', 'sportspress' ),
'add_new_item' => __( 'Add New', 'sportspress' ),
'new_item_name' => __( 'Name', 'sportspress' ),
'parent_item' => __( 'Parent', 'sportspress' ),
'parent_item_colon' => __( 'Parent:', 'sportspress' ),
'search_items' => __( 'Search', 'sportspress' ),
'not_found' => __( 'No results found.', 'sportspress' ),
'name' => esc_attr__( 'Duties', 'sportspress' ),
'singular_name' => esc_attr__( 'Duty', 'sportspress' ),
'all_items' => esc_attr__( 'All', 'sportspress' ),
'edit_item' => esc_attr__( 'Edit Duty', 'sportspress' ),
'view_item' => esc_attr__( 'View', 'sportspress' ),
'update_item' => esc_attr__( 'Update', 'sportspress' ),
'add_new_item' => esc_attr__( 'Add New', 'sportspress' ),
'new_item_name' => esc_attr__( 'Name', 'sportspress' ),
'parent_item' => esc_attr__( 'Parent', 'sportspress' ),
'parent_item_colon' => esc_attr__( 'Parent:', 'sportspress' ),
'search_items' => esc_attr__( 'Search', 'sportspress' ),
'not_found' => esc_attr__( 'No results found.', 'sportspress' ),
);
$args = apply_filters(
'sportspress_register_taxonomy_duty',
array(
'label' => __( 'Duties', 'sportspress' ),
'label' => esc_attr__( 'Duties', 'sportspress' ),
'labels' => $labels,
'public' => false,
'show_ui' => true,
@@ -138,19 +138,19 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) :
'sportspress_register_post_type_official',
array(
'labels' => array(
'name' => __( 'Officials', 'sportspress' ),
'singular_name' => __( 'Official', 'sportspress' ),
'add_new_item' => __( 'Add New Official', 'sportspress' ),
'edit_item' => __( 'Edit Official', 'sportspress' ),
'new_item' => __( 'New', 'sportspress' ),
'view_item' => __( 'View Official', 'sportspress' ),
'search_items' => __( 'Search', 'sportspress' ),
'not_found' => __( 'No results found.', 'sportspress' ),
'not_found_in_trash' => __( 'No results found.', 'sportspress' ),
'featured_image' => __( 'Photo', 'sportspress' ),
'set_featured_image' => __( 'Select Photo', 'sportspress' ),
'remove_featured_image' => __( 'Remove Photo', 'sportspress' ),
'use_featured_image' => __( 'Select Photo', 'sportspress' ),
'name' => esc_attr__( 'Officials', 'sportspress' ),
'singular_name' => esc_attr__( 'Official', 'sportspress' ),
'add_new_item' => esc_attr__( 'Add New Official', 'sportspress' ),
'edit_item' => esc_attr__( 'Edit Official', 'sportspress' ),
'new_item' => esc_attr__( 'New', 'sportspress' ),
'view_item' => esc_attr__( 'View Official', 'sportspress' ),
'search_items' => esc_attr__( 'Search', 'sportspress' ),
'not_found' => esc_attr__( 'No results found.', 'sportspress' ),
'not_found_in_trash' => esc_attr__( 'No results found.', 'sportspress' ),
'featured_image' => esc_attr__( 'Photo', 'sportspress' ),
'set_featured_image' => esc_attr__( 'Select Photo', 'sportspress' ),
'remove_featured_image' => esc_attr__( 'Remove Photo', 'sportspress' ),
'use_featured_image' => esc_attr__( 'Select Photo', 'sportspress' ),
),
'public' => true,
'show_ui' => true,
@@ -198,7 +198,7 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) :
'get_callback' => 'SP_REST_API::get_post_data',
'update_callback' => 'SP_REST_API::update_post_meta_arrays',
'schema' => array(
'description' => __( 'Official', 'sportspress' ),
'description' => esc_attr__( 'Official', 'sportspress' ),
'type' => 'array',
'context' => array( 'view', 'edit' ),
'arg_options' => array(
@@ -240,7 +240,7 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) :
foreach ( $duties as $duty ) {
?>
<th class="data-officials">
<?php echo $duty->name; ?>
<?php echo wp_kses_post( $duty->name ); ?>
</th>
<?php
}
@@ -259,7 +259,7 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) :
foreach ( $appointments as $officials ) {
?>
<td class="data-officials">
<?php echo implode( '<br>', $officials ); ?>
<?php echo wp_kses_post( implode( '<br>', $officials ) ); ?>
</td>
<?php
}
@@ -298,7 +298,7 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) :
?>
<th class="column-officials">
<label for="sp_columns_officials">
<?php echo $duty->name; ?>
<?php echo wp_kses_post( $duty->name ); ?>
</label>
</th>
<?php
@@ -318,7 +318,7 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) :
foreach ( $appointments as $officials ) {
?>
<td>
<?php echo implode( '<br>', $officials ); ?>
<?php echo wp_kses_post( implode( '<br>', $officials ) ); ?>
</td>
<?php
}
@@ -332,7 +332,7 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) :
*/
public function add_meta_boxes( $meta_boxes ) {
$meta_boxes['sp_event']['officials'] = array(
'title' => __( 'Officials', 'sportspress' ),
'title' => esc_attr__( 'Officials', 'sportspress' ),
'output' => 'SP_Meta_Box_Event_Officials::output',
'save' => 'SP_Meta_Box_Event_Officials::save',
'context' => 'side',
@@ -347,7 +347,7 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) :
* @return array
*/
public function calendar_columns( $columns = array() ) {
$columns['officials'] = __( 'Officials', 'sportspress' );
$columns['officials'] = esc_attr__( 'Officials', 'sportspress' );
return $columns;
}
@@ -361,7 +361,7 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) :
$templates,
array(
'officials' => array(
'title' => __( 'Officials', 'sportspress' ),
'title' => esc_attr__( 'Officials', 'sportspress' ),
'option' => 'sportspress_event_show_officials',
'action' => 'sportspress_output_event_officials',
'default' => 'yes',
@@ -377,13 +377,13 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) :
*/
public function add_event_options( $options ) {
$options[] = array(
'title' => __( 'Officials', 'sportspress' ),
'title' => esc_attr__( 'Officials', 'sportspress' ),
'id' => 'sportspress_event_officials_format',
'default' => 'table',
'type' => 'radio',
'options' => array(
'table' => __( 'Table', 'sportspress' ),
'list' => __( 'List', 'sportspress' ),
'table' => esc_attr__( 'Table', 'sportspress' ),
'list' => esc_attr__( 'List', 'sportspress' ),
),
);
return $options;
@@ -422,8 +422,8 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) :
*/
public function register_importer( $importers = array() ) {
$importers['sp_official_csv'] = array(
'name' => __( 'SportsPress Officials (CSV)', 'sportspress' ),
'description' => __( 'Import <strong>officials</strong> from a csv file.', 'sportspress' ),
'name' => esc_attr__( 'SportsPress Officials (CSV)', 'sportspress' ),
'description' => esc_attr__( 'Import <strong>officials</strong> from a csv file.', 'sportspress' ),
'callback' => array( $this, 'officials_importer' ),
);
return $importers;
@@ -480,7 +480,7 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) :
$new_columns = array();
if ( function_exists( 'get_term_meta' ) ) {
$new_columns['sp_order'] = __( 'Order', 'sportspress' );
$new_columns['sp_order'] = esc_attr__( 'Order', 'sportspress' );
}
if ( array_key_exists( 'posts', $columns ) ) {
@@ -504,7 +504,7 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) :
<?php if ( function_exists( 'get_term_meta' ) ) { ?>
<?php $order = get_term_meta( $t_id, 'sp_order', true ); ?>
<tr class="form-field">
<th scope="row" valign="top"><label for="sp_order"><?php _e( 'Order', 'sportspress' ); ?></label></th>
<th scope="row" valign="top"><label for="sp_order"><?php esc_attr_e( 'Order', 'sportspress' ); ?></label></th>
<td><input name="sp_order" class="sp-number-input" type="text" step="1" size="4" id="sp_order" value="<?php echo (int) $order; ?>"></td>
</tr>
<?php } ?>
@@ -548,8 +548,8 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) :
$options = apply_filters(
'sportspress_performance_sections',
array(
0 => __( 'Offense', 'sportspress' ),
1 => __(
0 => esc_attr__( 'Offense', 'sportspress' ),
1 => esc_attr__(
'Defense',
'sportspress'
),
@@ -583,7 +583,7 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) :
* Add menu item
*/
public function duties_menu() {
add_submenu_page( 'edit.php?post_type=sp_official', __( 'Duties', 'sportspress' ), __( 'Duties', 'sportspress' ), 'manage_sp_event_terms', 'edit-tags.php?taxonomy=sp_duty' );
add_submenu_page( 'edit.php?post_type=sp_official', esc_attr__( 'Duties', 'sportspress' ), esc_attr__( 'Duties', 'sportspress' ), 'manage_sp_event_terms', 'edit-tags.php?taxonomy=sp_duty' );
}
/**

View File

@@ -128,13 +128,13 @@ if ( ! class_exists( 'SportsPress_OpenStreetMap' ) ) :
$lon_sec = floor( $lon_sec - ( $lon_min * 60 ) );
$lon_dir = $longitude > 0 ? 'E' : 'W';
?>
<a href="https://www.google.com/maps/place/<?php echo urlencode( "{$lat_deg}°{$lat_min}'{$lat_sec}\"{$lat_dir}" ) . '+' . urlencode( "{$lon_deg}°{$lon_min}'{$lon_sec}\"{$lon_dir}" ); ?>/@<?php echo $latitude; ?>,<?php echo $longitude; ?>,<?php echo $zoom; ?>z" target="_blank"><div id="sp_openstreetmaps_container" style="width: 100%; height: 320px"></div></a>
<a href="https://www.google.com/maps/place/<?php echo esc_url( urlencode( "{$lat_deg}°{$lat_min}'{$lat_sec}\"{$lat_dir}" ) ) . '+' . esc_url( urlencode( "{$lon_deg}°{$lon_min}'{$lon_sec}\"{$lon_dir}" ) ); ?>/@<?php echo esc_url($latitude); ?>,<?php echo esc_url($longitude); ?>,<?php echo esc_url($zoom); ?>z" target="_blank"><div id="sp_openstreetmaps_container" style="width: 100%; height: 320px"></div></a>
<script>
// position we will use later
var lat = <?php echo $latitude; ?>;
var lon = <?php echo $longitude; ?>;
var lat = <?php echo esc_attr( $latitude ); ?>;
var lon = <?php echo esc_attr( $longitude ); ?>;
// initialize map
map = L.map('sp_openstreetmaps_container', { zoomControl:false }).setView([lat, lon], <?php echo $zoom; ?>);
map = L.map('sp_openstreetmaps_container', { zoomControl:false }).setView([lat, lon], <?php echo esc_attr( $zoom ); ?>);
// set map tiles source
<?php if ( 'satellite' === $maptype ) { ?>
L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {

View File

@@ -54,7 +54,7 @@ if ( ! class_exists( 'SportsPress_Overview' ) ) :
* Add menu item
*/
public function admin_menu() {
add_submenu_page( 'sportspress', __( 'Overview', 'sportspress' ), __( 'Overview', 'sportspress' ), 'manage_sportspress', 'sportspress-overview', array( $this, 'overview_page' ) );
add_submenu_page( 'sportspress', esc_attr__( 'Overview', 'sportspress' ), esc_attr__( 'Overview', 'sportspress' ), 'manage_sportspress', 'sportspress-overview', array( $this, 'overview_page' ) );
}
/**
@@ -64,7 +64,7 @@ if ( ! class_exists( 'SportsPress_Overview' ) ) :
?>
<div class="wrap sportspress sportspress-overview-wrap">
<h2>
<?php _e( 'Overview', 'sportspress' ); ?>
<?php esc_attr_e( 'Overview', 'sportspress' ); ?>
</h2>
<div class="sp-sitemap">
@@ -95,7 +95,7 @@ if ( ! class_exists( 'SportsPress_Overview' ) ) :
)
);
?>
"><?php echo $object->labels->name; ?></a></li>
"><?php echo esc_attr( $object->labels->name ); ?></a></li>
<?php
endif;
endforeach;
@@ -103,8 +103,8 @@ endforeach;
</ul>
<?php $taxonomies = sp_taxonomies(); ?>
<ul class="sp-primary col<?php echo sizeof( $taxonomies ); ?>">
<li class="sp-home"><a class="button disabled"><?php _e( 'SportsPress', 'sportspress' ); ?></a></li>
<ul class="sp-primary col<?php echo esc_attr( sizeof( $taxonomies ) ); ?>">
<li class="sp-home"><a class="button disabled"><?php esc_attr_e( 'SportsPress', 'sportspress' ); ?></a></li>
<?php
foreach ( $taxonomies as $taxonomy ) :
$object = get_taxonomy( $taxonomy );
@@ -124,7 +124,7 @@ endforeach;
)
);
?>
"><?php echo $object->labels->name; ?></a>
"><?php echo esc_attr( $object->labels->name ); ?></a>
<?php
$terms = get_terms(
$taxonomy,
@@ -168,7 +168,7 @@ endforeach;
)
);
?>
"><?php echo wp_strip_all_tags( $term->name ); ?><span class="dashicons dashicons-list-view wp-ui-text-notification"></span></a>
"><?php echo esc_html( wp_strip_all_tags( $term->name ) ); ?><span class="dashicons dashicons-list-view wp-ui-text-notification"></span></a>
<?php
endforeach;
endif;
@@ -189,7 +189,7 @@ endif;
)
);
?>
"><?php echo wp_strip_all_tags( $term->name ); ?></a>
"><?php echo esc_html( wp_strip_all_tags( $term->name ) ); ?></a>
<?php endif; ?>
<?php if ( $children ) : ?>
@@ -215,7 +215,7 @@ endif;
)
);
?>
"><?php echo wp_strip_all_tags( $child->name ); ?><span class="dashicons dashicons-list-view wp-ui-text-highlight"></span></a>
"><?php echo esc_html( wp_strip_all_tags( $child->name ) ); ?><span class="dashicons dashicons-list-view wp-ui-text-highlight"></span></a>
<?php
endforeach;
endif;
@@ -236,7 +236,7 @@ endif;
)
);
?>
"><?php echo wp_strip_all_tags( $child->name ); ?></a>
"><?php echo esc_html( wp_strip_all_tags( $child->name ) ); ?></a>
<?php endif; ?>
</li>
<?php endforeach; ?>
@@ -245,7 +245,7 @@ endif;
</li>
<?php endforeach; ?>
<?php else : ?>
<li><a class="button" href="<?php echo esc_url( admin_url( add_query_arg( array( 'taxonomy' => $taxonomy ), 'edit-tags.php' ) ) ); ?>"><?php echo $object->labels->add_new_item; ?></a></li>
<li><a class="button" href="<?php echo esc_url( admin_url( add_query_arg( array( 'taxonomy' => $taxonomy ), 'edit-tags.php' ) ) ); ?>"><?php echo esc_attr( $object->labels->add_new_item ); ?></a></li>
<?php endif; ?>
</ul>
</li>
@@ -266,7 +266,7 @@ endif;
?>
<ul class="sp-utility">
<li><a class="button button-primary" href="<?php echo esc_url( admin_url( add_query_arg( array( 'taxonomy' => $taxonomy ), 'edit-tags.php' ) ) ); ?>"><?php echo $taxonomy_object->labels->edit_item; ?></a></li>
<li><a class="button button-primary" href="<?php echo esc_url( admin_url( add_query_arg( array( 'taxonomy' => $taxonomy ), 'edit-tags.php' ) ) ); ?>"><?php echo esc_attr( $taxonomy_object->labels->edit_item ); ?></a></li>
</ul>
<?php
@@ -282,8 +282,8 @@ endif;
<?php if ( $terms ) : // Has children ?>
<ul class="sp-primary col<?php echo sizeof( $terms ) + 1; ?>">
<li class="sp-breadcrumb"><a class="button" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'sportspress-overview' ), 'admin.php' ) ) ); ?>"><?php _e( 'SportsPress', 'sportspress' ); ?></a></li>
<ul class="sp-primary col<?php echo esc_attr( sizeof( $terms ) + 1 ); ?>">
<li class="sp-breadcrumb"><a class="button" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'sportspress-overview' ), 'admin.php' ) ) ); ?>"><?php esc_attr_e( 'SportsPress', 'sportspress' ); ?></a></li>
<li class="sp-breadcrumb"><a class="button" href="
<?php
echo esc_url(
@@ -298,9 +298,9 @@ endif;
)
);
?>
"><?php echo $taxonomy_object->labels->name; ?></a></li>
<li class="sp-home"><a class="button disabled"><?php echo wp_strip_all_tags( $term->name ); ?></a></li>
<li><a class="button disabled"><?php _e( 'All', 'sportspress' ); ?></a>
"><?php echo esc_attr( $taxonomy_object->labels->name ); ?></a></li>
<li class="sp-home"><a class="button disabled"><?php echo esc_html( wp_strip_all_tags( $term->name ) ); ?></a></li>
<li><a class="button disabled"><?php esc_attr_e( 'All', 'sportspress' ); ?></a>
<ul>
<?php if ( sizeof( $post_types ) ) : ?>
<?php
@@ -322,7 +322,7 @@ endif;
)
);
?>
"><?php echo $post_object->labels->name; ?><span class="dashicons dashicons-list-view"></span></a></li>
"><?php echo esc_attr( $post_object->labels->name ); ?><span class="dashicons dashicons-list-view"></span></a></li>
<?php
endif;
endforeach;
@@ -346,7 +346,7 @@ endforeach;
)
);
?>
"><?php echo wp_strip_all_tags( $term->name ); ?></a>
"><?php echo esc_html( wp_strip_all_tags( $term->name ) ); ?></a>
<?php
$children = get_terms(
$taxonomy,
@@ -376,7 +376,7 @@ endforeach;
)
);
?>
"><?php echo wp_strip_all_tags( $child->name ); ?><span class="dashicons dashicons-list-view wp-ui-text-notification"></span></a>
"><?php echo esc_html( wp_strip_all_tags( $child->name ) ); ?><span class="dashicons dashicons-list-view wp-ui-text-notification"></span></a>
<?php if ( sizeof( $post_types ) ) : // Has associated post types ?>
<ul>
@@ -399,7 +399,7 @@ endforeach;
)
);
?>
"><?php echo $post_object->labels->name; ?><span class="dashicons dashicons-list-view wp-ui-text-highlight"></span></a></li>
"><?php echo esc_attr( $post_object->labels->name ); ?><span class="dashicons dashicons-list-view wp-ui-text-highlight"></span></a></li>
<?php
endif;
endforeach;
@@ -433,7 +433,7 @@ endforeach;
)
);
?>
"><?php echo $post_object->labels->name; ?><span class="dashicons dashicons-list-view wp-ui-text-notification"></span></a></li>
"><?php echo esc_attr( $post_object->labels->name ); ?><span class="dashicons dashicons-list-view wp-ui-text-notification"></span></a></li>
<?php
endif;
endforeach;
@@ -448,8 +448,8 @@ endforeach;
<?php else : // No children ?>
<ul class="sp-primary col<?php echo sizeof( $post_types ); ?>">
<li class="sp-breadcrumb"><a class="button" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'sportspress-overview' ), 'admin.php' ) ) ); ?>"><?php _e( 'SportsPress', 'sportspress' ); ?></a></li>
<ul class="sp-primary col<?php echo esc_attr( sizeof( $post_types ) ); ?>">
<li class="sp-breadcrumb"><a class="button" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'sportspress-overview' ), 'admin.php' ) ) ); ?>"><?php esc_attr_e( 'SportsPress', 'sportspress' ); ?></a></li>
<li class="sp-breadcrumb"><a class="button" href="
<?php
echo esc_url(
@@ -464,7 +464,7 @@ endforeach;
)
);
?>
"><?php echo $taxonomy_object->labels->name; ?></a></li>
"><?php echo esc_attr( $taxonomy_object->labels->name ); ?></a></li>
<?php
if ( $term->parent ) :
$parent = get_term( $term->parent, $taxonomy );
@@ -484,9 +484,9 @@ endforeach;
)
);
?>
"><?php echo $parent->name; ?></a></li>
"><?php echo esc_attr( $parent->name ); ?></a></li>
<?php endif; ?>
<li class="sp-home"><a class="button disabled"><?php echo wp_strip_all_tags( $term->name ); ?></a></li>
<li class="sp-home"><a class="button disabled"><?php echo esc_html( wp_strip_all_tags( $term->name ) ); ?></a></li>
<?php if ( sizeof( $taxonomy_object->object_type ) ) : ?>
<ul>
<?php
@@ -508,7 +508,7 @@ endforeach;
)
);
?>
"><?php echo $post_object->labels->name; ?><span class="dashicons dashicons-list-view"></span></a></li>
"><?php echo esc_attr( $post_object->labels->name ); ?><span class="dashicons dashicons-list-view"></span></a></li>
<?php
endif;
endforeach;
@@ -531,9 +531,9 @@ endforeach;
)
);
?>
<ul class="sp-primary col<?php echo sizeof( $terms ) + 1; ?>">
<li class="sp-breadcrumb"><a class="button" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'sportspress-overview' ), 'admin.php' ) ) ); ?>"><?php _e( 'SportsPress', 'sportspress' ); ?></a></li>
<li class="sp-home"><a class="button disabled"><?php echo $taxonomy_object->labels->name; ?></a></li>
<ul class="sp-primary col<?php echo esc_attr( sizeof( $terms ) + 1 ); ?>">
<li class="sp-breadcrumb"><a class="button" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'sportspress-overview' ), 'admin.php' ) ) ); ?>"><?php esc_attr_e( 'SportsPress', 'sportspress' ); ?></a></li>
<li class="sp-home"><a class="button disabled"><?php echo esc_attr( $taxonomy_object->labels->name ); ?></a></li>
<?php if ( $terms ) : ?>
<?php foreach ( $terms as $term ) : ?>
<li>
@@ -555,7 +555,7 @@ endforeach;
)
);
?>
"><?php echo wp_strip_all_tags( $term->name ); ?><span class="dashicons dashicons-list-view"></span></a>
"><?php echo esc_html( wp_strip_all_tags( $term->name ) ); ?><span class="dashicons dashicons-list-view"></span></a>
<?php else : ?>
<a class="button button-primary" href="
<?php
@@ -572,7 +572,7 @@ endforeach;
)
);
?>
"><?php echo wp_strip_all_tags( $term->name ); ?></a>
"><?php echo esc_html( wp_strip_all_tags( $term->name ) ); ?></a>
<?php endif; ?>
<?php
$children = get_terms(
@@ -611,7 +611,7 @@ endforeach;
)
);
?>
"><?php echo wp_strip_all_tags( $child->name ); ?><span class="dashicons dashicons-list-view wp-ui-text-notification"></span></a></li>
"><?php echo esc_html( wp_strip_all_tags( $child->name ) ); ?><span class="dashicons dashicons-list-view wp-ui-text-notification"></span></a></li>
<?php
endif;
endforeach;
@@ -641,7 +641,7 @@ endforeach;
)
);
?>
"><?php echo $post_object->labels->name; ?><span class="dashicons dashicons-list-view wp-ui-text-notification"></span></a></li>
"><?php echo esc_attr( $post_object->labels->name ); ?><span class="dashicons dashicons-list-view wp-ui-text-notification"></span></a></li>
<?php
endif;
endforeach;
@@ -666,7 +666,7 @@ endforeach;
)
);
?>
"><?php echo wp_strip_all_tags( $child->name ); ?></a>
"><?php echo esc_html( wp_strip_all_tags( $child->name ) ); ?></a>
<?php if ( sizeof( $post_types ) ) : ?>
<ul>
<?php
@@ -688,7 +688,7 @@ endforeach;
)
);
?>
"><?php echo $post_object->labels->name; ?><span class="dashicons dashicons-list-view wp-ui-text-highlight"></span></a></li>
"><?php echo esc_attr( $post_object->labels->name ); ?><span class="dashicons dashicons-list-view wp-ui-text-highlight"></span></a></li>
<?php
endif;
endforeach;
@@ -722,7 +722,7 @@ endforeach;
)
);
?>
"><?php echo $post_object->labels->name; ?><span class="dashicons dashicons-list-view wp-ui-text-notification"></span></a></li>
"><?php echo esc_attr( $post_object->labels->name ); ?><span class="dashicons dashicons-list-view wp-ui-text-notification"></span></a></li>
<?php
endif;
endforeach;
@@ -735,7 +735,7 @@ endforeach;
</li>
<?php endforeach; ?>
<?php endif; ?>
<li><a class="button button-primary action" href="<?php echo esc_url( admin_url( add_query_arg( array( 'taxonomy' => $taxonomy ), 'edit-tags.php' ) ) ); ?>"><?php echo $taxonomy_object->labels->add_new_item; ?><span class="dashicons dashicons-plus"></span></a></li>
<li><a class="button button-primary action" href="<?php echo esc_url( admin_url( add_query_arg( array( 'taxonomy' => $taxonomy ), 'edit-tags.php' ) ) ); ?>"><?php echo esc_attr( $taxonomy_object->labels->add_new_item ); ?><span class="dashicons dashicons-plus"></span></a></li>
</ul>
<?php endif; ?>
@@ -751,20 +751,20 @@ endforeach;
?>
<ul class="sp-utility">
<li><a class="button button-primary" href="<?php echo esc_url( admin_url( add_query_arg( array( 'post_type' => $post_type ), 'post-new.php' ) ) ); ?>"><?php echo $post_object->labels->add_new_item; ?></a></li>
<li><a class="button" href="<?php echo esc_url( admin_url( add_query_arg( array( 'post_type' => $post_type ), 'edit.php' ) ) ); ?>"><?php _e( 'View All', 'sportspress' ); ?></a></li>
<li><a class="button button-primary" href="<?php echo esc_url( admin_url( add_query_arg( array( 'post_type' => $post_type ), 'post-new.php' ) ) ); ?>"><?php echo esc_attr( $post_object->labels->add_new_item ); ?></a></li>
<li><a class="button" href="<?php echo esc_url( admin_url( add_query_arg( array( 'post_type' => $post_type ), 'edit.php' ) ) ); ?>"><?php esc_attr_e( 'View All', 'sportspress' ); ?></a></li>
</ul>
<?php if ( sizeof( $taxonomies ) || sizeof( sp_array_value( $hierarchy, $post_type ) ) ) : // Display taxonomies ?>
<ul class="sp-primary col<?php echo sizeof( $taxonomies ) + sizeof( sp_array_value( $hierarchy, $post_type ) ); ?>">
<li class="sp-breadcrumb"><a class="button" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'sportspress-overview' ), 'admin.php' ) ) ); ?>"><?php _e( 'SportsPress', 'sportspress' ); ?></a></li>
<li class="sp-home"><a class="button disabled"><?php echo $post_object->labels->name; ?></a></li>
<ul class="sp-primary col<?php echo esc_attr( sizeof( $taxonomies ) + sizeof( sp_array_value( $hierarchy, $post_type ) ) ); ?>">
<li class="sp-breadcrumb"><a class="button" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'sportspress-overview' ), 'admin.php' ) ) ); ?>"><?php esc_attr_e( 'SportsPress', 'sportspress' ); ?></a></li>
<li class="sp-home"><a class="button disabled"><?php echo esc_attr( $post_object->labels->name ); ?></a></li>
<?php
foreach ( sp_array_value( $hierarchy, $post_type ) as $secondary_post_type ) :
if ( post_type_exists( $secondary_post_type ) ) :
$secondary_post_object = get_post_type_object( $secondary_post_type );
?>
<li><a class="button button-primary action" href="<?php echo esc_url( admin_url( add_query_arg( array( 'post_type' => $secondary_post_type ), 'edit.php' ) ) ); ?>"><?php echo $secondary_post_object->labels->name; ?><span class="dashicons dashicons-list-view"></span></a>
<li><a class="button button-primary action" href="<?php echo esc_url( admin_url( add_query_arg( array( 'post_type' => $secondary_post_type ), 'edit.php' ) ) ); ?>"><?php echo esc_attr( $secondary_post_object->labels->name ); ?><span class="dashicons dashicons-list-view"></span></a>
<?php
$posts = get_posts(
array(
@@ -776,7 +776,7 @@ endforeach;
<?php if ( $posts ) : ?>
<ul>
<?php foreach ( $posts as $post ) : ?>
<li><a class="button action" href="<?php echo esc_url( get_edit_post_link( $post->ID ) ); ?>"><?php echo wp_strip_all_tags( $post->post_title ); ?><span class="dashicons dashicons-edit wp-ui-text-notification"></span></a></li>
<li><a class="button action" href="<?php echo esc_url( get_edit_post_link( $post->ID ) ); ?>"><?php echo esc_html( wp_strip_all_tags( $post->post_title ) ); ?><span class="dashicons dashicons-edit wp-ui-text-notification"></span></a></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
@@ -804,7 +804,7 @@ endforeach;
)
);
?>
"><?php echo $taxonomy_object->labels->name; ?></a>
"><?php echo esc_attr( $taxonomy_object->labels->name ); ?></a>
<?php
$terms = get_terms(
$taxonomy,
@@ -832,7 +832,7 @@ endforeach;
)
);
?>
"><?php echo wp_strip_all_tags( $term->name ); ?><span class="dashicons dashicons-list-view wp-ui-text-notification"></span></a>
"><?php echo esc_html( wp_strip_all_tags( $term->name ) ); ?><span class="dashicons dashicons-list-view wp-ui-text-notification"></span></a>
<?php
$children = get_terms(
$taxonomy,
@@ -862,7 +862,7 @@ endforeach;
)
);
?>
"><?php echo wp_strip_all_tags( $child->name ); ?><span class="dashicons dashicons-list-view wp-ui-text-highlight"></span></a></li>
"><?php echo esc_html( wp_strip_all_tags( $child->name ) ); ?><span class="dashicons dashicons-list-view wp-ui-text-highlight"></span></a></li>
<?php endforeach; ?>
</ul>
@@ -886,15 +886,15 @@ endforeach;
)
);
?>
<ul class="sp-primary col<?php echo sizeof( $posts ); ?>">
<li class="sp-breadcrumb"><a class="button" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'sportspress-overview' ), 'admin.php' ) ) ); ?>"><?php _e( 'SportsPress', 'sportspress' ); ?></a></li>
<li class="sp-home"><a class="button disabled"><?php echo $post_object->labels->name; ?></a></li>
<ul class="sp-primary col<?php echo esc_attr( sizeof( $posts ) ); ?>">
<li class="sp-breadcrumb"><a class="button" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'sportspress-overview' ), 'admin.php' ) ) ); ?>"><?php esc_attr_e( 'SportsPress', 'sportspress' ); ?></a></li>
<li class="sp-home"><a class="button disabled"><?php echo esc_attr( $post_object->labels->name ); ?></a></li>
<?php if ( $posts ) : ?>
<?php foreach ( $posts as $post ) : ?>
<li><a class="button button-primary action" href="<?php echo esc_url( get_edit_post_link( $post->ID ) ); ?>"><?php echo wp_strip_all_tags( $post->post_title ); ?><span class="dashicons dashicons-edit"></span></a></li>
<li><a class="button button-primary action" href="<?php echo esc_url( get_edit_post_link( $post->ID ) ); ?>"><?php echo esc_html( wp_strip_all_tags( $post->post_title ) ); ?><span class="dashicons dashicons-edit"></span></a></li>
<?php endforeach; ?>
<?php else : ?>
<li><a class="button disabled"><?php _e( 'No results found.', 'sportspress' ); ?></a></li>
<li><a class="button disabled"><?php esc_attr_e( 'No results found.', 'sportspress' ); ?></a></li>
<?php endif; ?>
</ul>
@@ -924,8 +924,8 @@ endforeach;
);
?>
<ul class="sp-primary col<?php echo sizeof( $terms ) + 1; ?>">
<li class="sp-breadcrumb"><a class="button" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'sportspress-overview' ), 'admin.php' ) ) ); ?>"><?php _e( 'SportsPress', 'sportspress' ); ?></a></li>
<ul class="sp-primary col<?php echo esc_attr( sizeof( $terms ) + 1 ); ?>">
<li class="sp-breadcrumb"><a class="button" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'sportspress-overview' ), 'admin.php' ) ) ); ?>"><?php esc_attr_e( 'SportsPress', 'sportspress' ); ?></a></li>
<li class="sp-breadcrumb"><a class="button" href="
<?php
echo esc_url(
@@ -940,8 +940,8 @@ endforeach;
)
);
?>
"><?php echo $post_object->labels->name; ?></a></li>
<li class="sp-home"><a class="button disabled"><?php echo $taxonomy_object->labels->name; ?></a></li>
"><?php echo esc_attr( $post_object->labels->name ); ?></a></li>
<li class="sp-home"><a class="button disabled"><?php echo esc_attr( $taxonomy_object->labels->name ); ?></a></li>
<?php
if ( $terms ) :
@@ -961,7 +961,7 @@ endforeach;
)
);
?>
"><?php echo wp_strip_all_tags( $term->name ); ?><span class="dashicons dashicons-list-view"></span></a>
"><?php echo esc_html( wp_strip_all_tags( $term->name ) ); ?><span class="dashicons dashicons-list-view"></span></a>
<?php
$children = get_terms(
$taxonomy,
@@ -991,7 +991,7 @@ endforeach;
)
);
?>
"><?php echo wp_strip_all_tags( $child->name ); ?><span class="dashicons dashicons-list-view wp-ui-text-notification"></span></a>
"><?php echo esc_html( wp_strip_all_tags( $child->name ) ); ?><span class="dashicons dashicons-list-view wp-ui-text-notification"></span></a>
<?php
$grandchildren = get_terms(
$taxonomy,
@@ -1020,7 +1020,7 @@ endforeach;
)
);
?>
"><?php echo $grandchild->name; ?><span class="dashicons dashicons-list-view wp-ui-text-highlight"></span></a></li>
"><?php echo esc_attr( $grandchild->name ); ?><span class="dashicons dashicons-list-view wp-ui-text-highlight"></span></a></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
@@ -1036,7 +1036,7 @@ endforeach;
endforeach;
endif;
?>
<li><a class="button button-primary" href="<?php echo esc_url( admin_url( add_query_arg( array( 'taxonomy' => $taxonomy ), 'edit-tags.php' ) ) ); ?>"><?php echo $taxonomy_object->labels->add_new_item; ?></a></li>
<li><a class="button button-primary" href="<?php echo esc_url( admin_url( add_query_arg( array( 'taxonomy' => $taxonomy ), 'edit-tags.php' ) ) ); ?>"><?php echo esc_attr( $taxonomy_object->labels->add_new_item ); ?></a></li>
</ul>
<?php endif; ?>

View File

@@ -72,15 +72,15 @@ if ( ! class_exists( 'SportsPress_Player_Lists' ) ) :
'sportspress_register_post_type_list',
array(
'labels' => array(
'name' => __( 'Player Lists', 'sportspress' ),
'singular_name' => __( 'Player List', 'sportspress' ),
'add_new_item' => __( 'Add New Player List', 'sportspress' ),
'edit_item' => __( 'Edit Player List', 'sportspress' ),
'new_item' => __( 'New', 'sportspress' ),
'view_item' => __( 'View Player List', 'sportspress' ),
'search_items' => __( 'Search', 'sportspress' ),
'not_found' => __( 'No results found.', 'sportspress' ),
'not_found_in_trash' => __( 'No results found.', 'sportspress' ),
'name' => esc_attr__( 'Player Lists', 'sportspress' ),
'singular_name' => esc_attr__( 'Player List', 'sportspress' ),
'add_new_item' => esc_attr__( 'Add New Player List', 'sportspress' ),
'edit_item' => esc_attr__( 'Edit Player List', 'sportspress' ),
'new_item' => esc_attr__( 'New', 'sportspress' ),
'view_item' => esc_attr__( 'View Player List', 'sportspress' ),
'search_items' => esc_attr__( 'Search', 'sportspress' ),
'not_found' => esc_attr__( 'No results found.', 'sportspress' ),
'not_found_in_trash' => esc_attr__( 'No results found.', 'sportspress' ),
),
'public' => true,
'show_ui' => true,
@@ -148,7 +148,7 @@ if ( ! class_exists( 'SportsPress_Player_Lists' ) ) :
'get_callback' => 'SP_REST_API::get_post_meta',
'update_callback' => 'SP_REST_API::update_post_meta',
'schema' => array(
'description' => __( 'Layout', 'sportspress' ),
'description' => esc_attr__( 'Layout', 'sportspress' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
'arg_options' => array(
@@ -165,7 +165,7 @@ if ( ! class_exists( 'SportsPress_Player_Lists' ) ) :
'get_callback' => 'SP_REST_API::get_post_data',
'update_callback' => 'SP_REST_API::update_post_meta_arrays',
'schema' => array(
'description' => __( 'Player List', 'sportspress' ),
'description' => esc_attr__( 'Player List', 'sportspress' ),
'type' => 'array',
'context' => array( 'view', 'edit' ),
'arg_options' => array(
@@ -183,7 +183,7 @@ if ( ! class_exists( 'SportsPress_Player_Lists' ) ) :
*/
public function add_meta_boxes( $meta_boxes ) {
$meta_boxes['sp_team']['lists'] = array(
'title' => __( 'Player Lists', 'sportspress' ),
'title' => esc_attr__( 'Player Lists', 'sportspress' ),
'output' => 'SP_Meta_Box_Team_Lists::output',
'save' => 'SP_Meta_Box_Team_Lists::save',
'context' => 'normal',
@@ -191,34 +191,34 @@ if ( ! class_exists( 'SportsPress_Player_Lists' ) ) :
);
$meta_boxes['sp_list'] = array(
'shortcode' => array(
'title' => __( 'Shortcode', 'sportspress' ),
'title' => esc_attr__( 'Shortcode', 'sportspress' ),
'output' => 'SP_Meta_Box_List_Shortcode::output',
'context' => 'side',
'priority' => 'default',
),
'format' => array(
'title' => __( 'Layout', 'sportspress' ),
'title' => esc_attr__( 'Layout', 'sportspress' ),
'save' => 'SP_Meta_Box_List_Format::save',
'output' => 'SP_Meta_Box_List_Format::output',
'context' => 'side',
'priority' => 'default',
),
'columns' => array(
'title' => __( 'Columns', 'sportspress' ),
'title' => esc_attr__( 'Columns', 'sportspress' ),
'save' => 'SP_Meta_Box_List_Columns::save',
'output' => 'SP_Meta_Box_List_Columns::output',
'context' => 'side',
'priority' => 'default',
),
'details' => array(
'title' => __( 'Details', 'sportspress' ),
'title' => esc_attr__( 'Details', 'sportspress' ),
'save' => 'SP_Meta_Box_List_Details::save',
'output' => 'SP_Meta_Box_List_Details::output',
'context' => 'side',
'priority' => 'default',
),
'data' => array(
'title' => __( 'Player List', 'sportspress' ),
'title' => esc_attr__( 'Player List', 'sportspress' ),
'save' => 'SP_Meta_Box_List_Data::save',
'output' => 'SP_Meta_Box_List_Data::output',
'context' => 'normal',
@@ -250,7 +250,7 @@ if ( ! class_exists( 'SportsPress_Player_Lists' ) ) :
array_merge(
array(
array(
'title' => __( 'Player Lists', 'sportspress' ),
'title' => esc_attr__( 'Player Lists', 'sportspress' ),
'type' => 'title',
'id' => 'list_options',
),
@@ -259,16 +259,16 @@ if ( ! class_exists( 'SportsPress_Player_Lists' ) ) :
'sportspress_player_list_options',
array(
array(
'title' => __( 'Title', 'sportspress' ),
'desc' => __( 'Display title', 'sportspress' ),
'title' => esc_attr__( 'Title', 'sportspress' ),
'desc' => esc_attr__( 'Display title', 'sportspress' ),
'id' => 'sportspress_list_show_title',
'default' => 'yes',
'type' => 'checkbox',
),
array(
'title' => __( 'Players', 'sportspress' ),
'desc' => __( 'Display photos', 'sportspress' ),
'title' => esc_attr__( 'Players', 'sportspress' ),
'desc' => esc_attr__( 'Display photos', 'sportspress' ),
'id' => 'sportspress_list_show_photos',
'default' => 'no',
'type' => 'checkbox',
@@ -276,7 +276,7 @@ if ( ! class_exists( 'SportsPress_Player_Lists' ) ) :
),
array(
'desc' => __( 'Display national flags', 'sportspress' ),
'desc' => esc_attr__( 'Display national flags', 'sportspress' ),
'id' => 'sportspress_list_show_flags',
'default' => 'no',
'type' => 'checkbox',
@@ -284,38 +284,38 @@ if ( ! class_exists( 'SportsPress_Player_Lists' ) ) :
),
array(
'title' => __( 'Teams', 'sportspress' ),
'desc' => __( 'Display logos', 'sportspress' ),
'title' => esc_attr__( 'Teams', 'sportspress' ),
'desc' => esc_attr__( 'Display logos', 'sportspress' ),
'id' => 'sportspress_list_show_logos',
'default' => 'no',
'type' => 'checkbox',
),
array(
'title' => __( 'Teams', 'sportspress' ),
'title' => esc_attr__( 'Teams', 'sportspress' ),
'id' => 'sportspress_list_team_format',
'default' => 'name',
'type' => 'radio',
'options' => array(
'name' => __( 'Name', 'sportspress' ),
'logo' => __( 'Logo', 'sportspress' ),
'name' => esc_attr__( 'Name', 'sportspress' ),
'logo' => esc_attr__( 'Logo', 'sportspress' ),
),
),
array(
'title' => __( 'Pagination', 'sportspress' ),
'desc' => __( 'Paginate', 'sportspress' ),
'title' => esc_attr__( 'Pagination', 'sportspress' ),
'desc' => esc_attr__( 'Paginate', 'sportspress' ),
'id' => 'sportspress_list_paginated',
'default' => 'yes',
'type' => 'checkbox',
),
array(
'title' => __( 'Limit', 'sportspress' ),
'title' => esc_attr__( 'Limit', 'sportspress' ),
'id' => 'sportspress_list_rows',
'class' => 'small-text',
'default' => '10',
'desc' => __( 'players', 'sportspress' ),
'desc' => esc_attr__( 'players', 'sportspress' ),
'type' => 'number',
'custom_attributes' => array(
'min' => 1,
@@ -344,8 +344,8 @@ if ( ! class_exists( 'SportsPress_Player_Lists' ) ) :
$templates,
array(
'lists' => array(
'title' => __( 'Player Lists', 'sportspress' ),
'label' => __( 'Players', 'sportspress' ),
'title' => esc_attr__( 'Player Lists', 'sportspress' ),
'label' => esc_attr__( 'Players', 'sportspress' ),
'option' => 'sportspress_team_show_lists',
'action' => 'sportspress_output_team_lists',
'default' => 'yes',

View File

@@ -68,8 +68,8 @@ if ( ! class_exists( 'SportsPress_Styles' ) ) :
array_unshift(
$options,
array(
'title' => __( 'Frontend Styles', 'sportspress' ),
'desc' => __( 'Enable', 'sportspress' ),
'title' => esc_attr__( 'Frontend Styles', 'sportspress' ),
'desc' => esc_attr__( 'Enable', 'sportspress' ),
'id' => 'sportspress_styles',
'default' => 'yes',
'type' => 'checkbox',
@@ -165,26 +165,26 @@ if ( ! class_exists( 'SportsPress_Styles' ) ) :
$colors['text_muted'] = 'rgba(' . implode( ',', $rgb ) . ',0.5)';
// Primary
echo '.sp-data-table th,.sp-template-countdown .sp-event-venue,.sp-template-countdown .sp-event-league,.sp-template-gallery .gallery-caption{background:' . $colors['primary'] . ' !important}';
echo '.sp-data-table th,.sp-template-countdown .sp-event-venue,.sp-template-countdown .sp-event-league,.sp-template-gallery .gallery-caption{border-color:' . $colors['primary_border'] . ' !important}';
echo '.sp-data-table th,.sp-template-countdown .sp-event-venue,.sp-template-countdown .sp-event-league,.sp-template-gallery .gallery-caption{background:' . esc_attr( $colors['primary'] ) . ' !important}';
echo '.sp-data-table th,.sp-template-countdown .sp-event-venue,.sp-template-countdown .sp-event-league,.sp-template-gallery .gallery-caption{border-color:' . esc_attr( $colors['primary_border'] ) . ' !important}';
// Background
echo '.sp-table-caption,.sp-data-table,.sp-data-table tfoot,.sp-template .sp-view-all-link,.sp-template-gallery .sp-gallery-group-name,.sp-template-gallery .sp-gallery-wrapper,.sp-template-countdown .sp-event-name,.sp-countdown time,.sp-template-details dl,.sp-event-statistics .sp-statistic-bar,.sp-tournament-bracket .sp-team-name,.sp-profile-selector{background:' . $colors['background'] . ' !important}';
echo '.sp-table-caption,.sp-data-table,.sp-data-table td,.sp-template .sp-view-all-link,.sp-template-gallery .sp-gallery-group-name,.sp-template-gallery .sp-gallery-wrapper,.sp-template-countdown .sp-event-name,.sp-countdown time,.sp-countdown span,.sp-template-details dl,.sp-event-statistics .sp-statistic-bar,.sp-tournament-bracket thead th,.sp-tournament-bracket .sp-team-name,.sp-tournament-bracket .sp-event,.sp-profile-selector{border-color:' . $colors['background_border'] . ' !important}';
echo '.sp-tournament-bracket .sp-team .sp-team-name:before{border-left-color:' . $colors['background_border'] . ' !important;border-right-color:' . $colors['background_border'] . ' !important}';
echo '.sp-data-table .sp-highlight,.sp-data-table .highlighted td,.sp-template-scoreboard td:hover{background:' . $colors['background_highlight'] . ' !important}';
echo '.sp-table-caption,.sp-data-table,.sp-data-table tfoot,.sp-template .sp-view-all-link,.sp-template-gallery .sp-gallery-group-name,.sp-template-gallery .sp-gallery-wrapper,.sp-template-countdown .sp-event-name,.sp-countdown time,.sp-template-details dl,.sp-event-statistics .sp-statistic-bar,.sp-tournament-bracket .sp-team-name,.sp-profile-selector{background:' . esc_attr( $colors['background'] ) . ' !important}';
echo '.sp-table-caption,.sp-data-table,.sp-data-table td,.sp-template .sp-view-all-link,.sp-template-gallery .sp-gallery-group-name,.sp-template-gallery .sp-gallery-wrapper,.sp-template-countdown .sp-event-name,.sp-countdown time,.sp-countdown span,.sp-template-details dl,.sp-event-statistics .sp-statistic-bar,.sp-tournament-bracket thead th,.sp-tournament-bracket .sp-team-name,.sp-tournament-bracket .sp-event,.sp-profile-selector{border-color:' . esc_attr( $colors['background_border'] ) . ' !important}';
echo '.sp-tournament-bracket .sp-team .sp-team-name:before{border-left-color:' . esc_attr( $colors['background_border'] ) . ' !important;border-right-color:' . esc_attr( $colors['background_border'] ) . ' !important}';
echo '.sp-data-table .sp-highlight,.sp-data-table .highlighted td,.sp-template-scoreboard td:hover{background:' . esc_attr( $colors['background_highlight'] ) . ' !important}';
// Text
echo '.sp-template *,.sp-data-table *,.sp-table-caption,.sp-data-table tfoot a:hover,.sp-template .sp-view-all-link a:hover,.sp-template-gallery .sp-gallery-group-name,.sp-template-details dd,.sp-template-event-logos .sp-team-result,.sp-template-event-blocks .sp-event-results,.sp-template-scoreboard a,.sp-template-scoreboard a:hover,.sp-tournament-bracket,.sp-tournament-bracket .sp-event .sp-event-title:hover,.sp-tournament-bracket .sp-event .sp-event-title:hover *{color:' . $colors['text'] . ' !important}';
echo '.sp-template .sp-view-all-link a,.sp-countdown span small,.sp-template-event-calendar tfoot a,.sp-template-event-blocks .sp-event-date,.sp-template-details dt,.sp-template-scoreboard .sp-scoreboard-date,.sp-tournament-bracket th,.sp-tournament-bracket .sp-event .sp-event-title,.sp-template-scoreboard .sp-scoreboard-date,.sp-tournament-bracket .sp-event .sp-event-title *{color:' . $colors['text_muted'] . ' !important}';
echo '.sp-template *,.sp-data-table *,.sp-table-caption,.sp-data-table tfoot a:hover,.sp-template .sp-view-all-link a:hover,.sp-template-gallery .sp-gallery-group-name,.sp-template-details dd,.sp-template-event-logos .sp-team-result,.sp-template-event-blocks .sp-event-results,.sp-template-scoreboard a,.sp-template-scoreboard a:hover,.sp-tournament-bracket,.sp-tournament-bracket .sp-event .sp-event-title:hover,.sp-tournament-bracket .sp-event .sp-event-title:hover *{color:' . esc_attr( $colors['text'] ) . ' !important}';
echo '.sp-template .sp-view-all-link a,.sp-countdown span small,.sp-template-event-calendar tfoot a,.sp-template-event-blocks .sp-event-date,.sp-template-details dt,.sp-template-scoreboard .sp-scoreboard-date,.sp-tournament-bracket th,.sp-tournament-bracket .sp-event .sp-event-title,.sp-template-scoreboard .sp-scoreboard-date,.sp-tournament-bracket .sp-event .sp-event-title *{color:' . esc_attr( $colors['text_muted'] ) . ' !important}';
// Heading
echo '.sp-data-table th,.sp-template-countdown .sp-event-venue,.sp-template-countdown .sp-event-league,.sp-template-gallery .gallery-item a,.sp-template-gallery .gallery-caption,.sp-template-scoreboard .sp-scoreboard-nav,.sp-tournament-bracket .sp-team-name:hover,.sp-tournament-bracket thead th,.sp-tournament-bracket .sp-heading{color:' . $colors['heading'] . ' !important}';
echo '.sp-data-table th,.sp-template-countdown .sp-event-venue,.sp-template-countdown .sp-event-league,.sp-template-gallery .gallery-item a,.sp-template-gallery .gallery-caption,.sp-template-scoreboard .sp-scoreboard-nav,.sp-tournament-bracket .sp-team-name:hover,.sp-tournament-bracket thead th,.sp-tournament-bracket .sp-heading{color:' . esc_attr( $colors['heading'] ) . ' !important}';
// Link
echo '.sp-template a,.sp-data-table a,.sp-tab-menu-item-active a, .sp-tab-menu-item-active a:hover,.sp-template .sp-message{color:' . $colors['link'] . ' !important}';
echo '.sp-template-gallery .gallery-caption strong,.sp-tournament-bracket .sp-team-name:hover,.sp-template-scoreboard .sp-scoreboard-nav,.sp-tournament-bracket .sp-heading{background:' . $colors['link'] . ' !important}';
echo '.sp-tournament-bracket .sp-team-name:hover,.sp-tournament-bracket .sp-heading,.sp-tab-menu-item-active a, .sp-tab-menu-item-active a:hover,.sp-template .sp-message{border-color:' . $colors['link'] . ' !important}';
echo '.sp-template a,.sp-data-table a,.sp-tab-menu-item-active a, .sp-tab-menu-item-active a:hover,.sp-template .sp-message{color:' . esc_attr( $colors['link'] ) . ' !important}';
echo '.sp-template-gallery .gallery-caption strong,.sp-tournament-bracket .sp-team-name:hover,.sp-template-scoreboard .sp-scoreboard-nav,.sp-tournament-bracket .sp-heading{background:' . esc_attr( $colors['link'] ) . ' !important}';
echo '.sp-tournament-bracket .sp-team-name:hover,.sp-tournament-bracket .sp-heading,.sp-tab-menu-item-active a, .sp-tab-menu-item-active a:hover,.sp-template .sp-message{border-color:' . esc_attr( $colors['link'] ) . ' !important}';
}
}

View File

@@ -131,12 +131,12 @@ if ( ! class_exists( 'SportsPress_Template_Selector' ) ) :
asort( $templates );
// Add default option
$templates = array_merge( array( 'default' => __( 'Default Template', 'sportspress' ) ), $templates );
$templates = array_merge( array( 'default' => esc_attr__( 'Default Template', 'sportspress' ) ), $templates );
$options = array_merge(
array(
array(
'title' => __( 'Template', 'sportspress' ),
'title' => esc_attr__( 'Template', 'sportspress' ),
'id' => 'sportspress_' . $post_type . '_page_template',
'default' => 'default',
'type' => 'select',
@@ -180,7 +180,7 @@ if ( ! class_exists( 'SportsPress_Template_Selector' ) ) :
$settings,
array(
array(
'title' => __( 'Calendars', 'sportspress' ),
'title' => esc_attr__( 'Calendars', 'sportspress' ),
'type' => 'title',
'id' => 'calendar_options',
),

View File

@@ -82,9 +82,9 @@ if ( ! class_exists( 'SportsPress_Tutorials' ) ) :
'sportspress_get_started_tutorial_videos',
array(
__( 'Installation', 'sportspress' ) => '//www.youtube-nocookie.com/embed/nE8-RlbotmU?rel=0&amp;showinfo=0',
__( 'Leagues', 'sportspress' ) . ' &amp; ' . __( 'Seasons', 'sportspress' ) => '//www.youtube-nocookie.com/embed/XAf2EsDrf8M?rel=0&amp;showinfo=0',
__( 'Leagues', 'sportspress' ) . ' &amp; ' . esc_attr__( 'Seasons', 'sportspress' ) => '//www.youtube-nocookie.com/embed/XAf2EsDrf8M?rel=0&amp;showinfo=0',
__( 'Venues', 'sportspress' ) => '//www.youtube-nocookie.com/embed/iTZnC_7VvYk?rel=0&amp;showinfo=0',
__( 'Positions', 'sportspress' ) . ' &amp; ' . __( 'Jobs', 'sportspress' ) => '//www.youtube-nocookie.com/embed/g6QKbDH05n0?rel=0&amp;showinfo=0',
__( 'Positions', 'sportspress' ) . ' &amp; ' . esc_attr__( 'Jobs', 'sportspress' ) => '//www.youtube-nocookie.com/embed/g6QKbDH05n0?rel=0&amp;showinfo=0',
)
),
__( 'Teams', 'sportspress' ) => apply_filters(
@@ -94,7 +94,7 @@ if ( ! class_exists( 'SportsPress_Tutorials' ) ) :
__( 'League Tables', 'sportspress' ) => '//www.youtube-nocookie.com/embed/8AXh399Vstc?rel=0&amp;showinfo=0',
)
),
__( 'Players', 'sportspress' ) . ' &amp; ' . __( 'Staff', 'sportspress' ) => array_merge(
__( 'Players', 'sportspress' ) . ' &amp; ' . esc_attr__( 'Staff', 'sportspress' ) => array_merge(
apply_filters(
'sportspress_player_tutorial_videos',
array(
@@ -131,7 +131,7 @@ if ( ! class_exists( 'SportsPress_Tutorials' ) ) :
__( 'Events', 'sportspress' ) => apply_filters(
'sportspress_event_advanced_videos',
array(
__( 'Event Outcomes', 'sportspress' ) . ' ' . __( '(Auto)', 'sportspress' ) => '//www.youtube-nocookie.com/embed/pCVfPv2O5yY?rel=0&amp;showinfo=0',
__( 'Event Outcomes', 'sportspress' ) . ' ' . esc_attr__( '(Auto)', 'sportspress' ) => '//www.youtube-nocookie.com/embed/pCVfPv2O5yY?rel=0&amp;showinfo=0',
__( 'Box Score', 'sportspress' ) => '//www.youtube-nocookie.com/embed/rERU6X7vjTc?rel=0&amp;showinfo=0',
)
),
@@ -177,9 +177,9 @@ if ( ! class_exists( 'SportsPress_Tutorials' ) ) :
*/
public function admin_menu() {
if ( current_user_can( 'manage_sportspress' ) ) {
add_submenu_page( 'sportspress', __( 'Tutorials', 'sportspress' ), __( 'Tutorials', 'sportspress' ), 'manage_sportspress', 'sportspress-tutorials', array( $this, 'tutorials_page' ) );
add_submenu_page( 'sportspress', esc_attr__( 'Tutorials', 'sportspress' ), esc_attr__( 'Tutorials', 'sportspress' ), 'manage_sportspress', 'sportspress-tutorials', array( $this, 'tutorials_page' ) );
} else {
add_menu_page( __( 'Tutorials', 'sportspress' ), __( 'Tutorials', 'sportspress' ), 'edit_sp_players', 'sportspress-tutorials', array( $this, 'tutorials_page' ), 'dashicons-video-alt3' );
add_menu_page( esc_attr__( 'Tutorials', 'sportspress' ), esc_attr__( 'Tutorials', 'sportspress' ), 'edit_sp_players', 'sportspress-tutorials', array( $this, 'tutorials_page' ), 'dashicons-video-alt3' );
}
}
@@ -190,8 +190,8 @@ if ( ! class_exists( 'SportsPress_Tutorials' ) ) :
$tabs = apply_filters(
'sportspress_tutorial_tabs',
array(
'tutorials' => __( 'Tutorials', 'sportspress' ),
'advanced' => __( 'Advanced', 'sportspress' ),
'tutorials' => esc_attr__( 'Tutorials', 'sportspress' ),
'advanced' => esc_attr__( 'Advanced', 'sportspress' ),
)
);
if ( isset( $_GET['tab'] ) && array_key_exists( $_GET['tab'], $tabs ) ) {
@@ -206,11 +206,11 @@ if ( ! class_exists( 'SportsPress_Tutorials' ) ) :
<?php
foreach ( $tabs as $name => $label ) :
?>
<a href="<?php echo admin_url( 'admin.php?page=sportspress-tutorials&tab=' . $name ); ?>" class="nav-tab <?php echo ( $current_tab == $name ? 'nav-tab-active' : '' ); ?>"><?php echo $label; ?></a><?php endforeach; ?>
<a href="<?php echo esc_url( admin_url( 'admin.php?page=sportspress-tutorials&tab=' . $name ) ); ?>" class="nav-tab <?php echo ( $current_tab == $name ? 'nav-tab-active' : '' ); ?>"><?php echo wp_kses_post( $label ); ?></a><?php endforeach; ?>
</h2>
<div class="sp-tutorials-main">
<?php foreach ( $this->ids[ $current_tab ] as $section => $urls ) { ?>
<h3><?php echo $section; ?></h3>
<h3><?php echo wp_kses_post( $section ); ?></h3>
<ul class="sp-tutorials-list">
<?php
foreach ( $urls as $label => $url ) {
@@ -220,16 +220,16 @@ if ( ! class_exists( 'SportsPress_Tutorials' ) ) :
<table class="widefat" cellspacing="0">
<thead>
<tr><th>
<strong><?php echo $i; ?></strong>
<?php echo $label; ?>
<a href="#" class="sp-popup sp-icon-popup" title="<?php _e( 'Pop-out', 'sportspress' ); ?>" onclick="window.open('<?php echo esc_url( add_query_arg( 'autoplay', 1, $url ) ); ?>', '_blank', 'width=640, height=360');return false;"></a>
<strong><?php echo wp_kses_post( $i ); ?></strong>
<?php echo wp_kses_post( $label ); ?>
<a href="#" class="sp-popup sp-icon-popup" title="<?php esc_attr_e( 'Pop-out', 'sportspress' ); ?>" onclick="window.open('<?php echo esc_url( add_query_arg( 'autoplay', 1, $url ) ); ?>', '_blank', 'width=640, height=360');return false;"></a>
</th></tr>
</thead>
<tbody>
<tr>
<td>
<div class="sp-fitvids">
<iframe width="320" height="180" src="<?php echo $url; ?>" frameborder="0" allowfullscreen></iframe>
<iframe width="320" height="180" src="<?php echo esc_url( $url ); ?>" frameborder="0" allowfullscreen></iframe>
</div>
</td>
</tr>
@@ -260,7 +260,7 @@ if ( ! class_exists( 'SportsPress_Tutorials' ) ) :
'tutorials' => array(
'link' => admin_url( add_query_arg( array( 'page' => 'sportspress-tutorials' ), 'admin.php' ) ),
'icon' => 'dashicons dashicons-video-alt3',
'label' => __( 'Watch Tutorials', 'sportspress' ),
'label' => esc_attr__( 'Watch Tutorials', 'sportspress' ),
),
) + $steps;
return $steps;

View File

@@ -63,8 +63,8 @@ if ( ! class_exists( 'SportsPress_User_Registration' ) ) :
$options,
array(
array(
'title' => __( 'User Registration', 'sportspress' ),
'desc' => __( 'Add name fields to signup form', 'sportspress' ),
'title' => esc_attr__( 'User Registration', 'sportspress' ),
'desc' => esc_attr__( 'Add name fields to signup form', 'sportspress' ),
'id' => 'sportspress_registration_name_inputs',
'default' => 'no',
'type' => 'checkbox',
@@ -72,7 +72,7 @@ if ( ! class_exists( 'SportsPress_User_Registration' ) ) :
),
array(
'desc' => __( 'Add a team name field to signup form', 'sportspress' ),
'desc' => esc_attr__( 'Add a team name field to signup form', 'sportspress' ),
'id' => 'sportspress_registration_team_input',
'default' => 'no',
'type' => 'checkbox',
@@ -80,7 +80,7 @@ if ( ! class_exists( 'SportsPress_User_Registration' ) ) :
),
array(
'desc' => __( 'Add a team selector to signup form', 'sportspress' ),
'desc' => esc_attr__( 'Add a team selector to signup form', 'sportspress' ),
'id' => 'sportspress_registration_team_select',
'default' => 'no',
'type' => 'checkbox',
@@ -88,7 +88,7 @@ if ( ! class_exists( 'SportsPress_User_Registration' ) ) :
),
array(
'desc' => __( 'Create player profiles for new users', 'sportspress' ),
'desc' => esc_attr__( 'Create player profiles for new users', 'sportspress' ),
'id' => 'sportspress_registration_add_player',
'default' => 'no',
'type' => 'checkbox',
@@ -109,12 +109,12 @@ if ( ! class_exists( 'SportsPress_User_Registration' ) ) :
$last_name = ( ! empty( $_POST['last_name'] ) ) ? trim( sanitize_text_field( $_POST['last_name'] ) ) : '';
?>
<p>
<label for="first_name"><?php _e( 'First Name', 'sportspress' ); ?><br />
<label for="first_name"><?php esc_attr_e( 'First Name', 'sportspress' ); ?><br />
<input type="text" name="first_name" id="first_name" class="input" value="<?php echo esc_attr( wp_unslash( $first_name ) ); ?>" size="25" /></label>
</p>
<p>
<label for="last_name"><?php _e( 'Last Name', 'sportspress' ); ?><br />
<label for="last_name"><?php esc_attr_e( 'Last Name', 'sportspress' ); ?><br />
<input type="text" name="last_name" id="last_name" class="input" value="<?php echo esc_attr( wp_unslash( $last_name ) ); ?>" size="25" /></label>
</p>
<?php
@@ -123,13 +123,13 @@ if ( ! class_exists( 'SportsPress_User_Registration' ) ) :
if ( 'yes' === get_option( 'sportspress_registration_team_select', 'no' ) ) {
?>
<p>
<label for="sp_team"><?php _e( 'Team', 'sportspress' ); ?><br />
<label for="sp_team"><?php esc_attr_e( 'Team', 'sportspress' ); ?><br />
<?php
$args = array(
'post_type' => 'sp_team',
'name' => 'sp_team',
'values' => 'ID',
'show_option_none' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Team', 'sportspress' ) ),
'show_option_none' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Team', 'sportspress' ) ),
'property' => 'style="width:100%;height:36px;margin-bottom:16px"',
);
sp_dropdown_pages( $args );

View File

@@ -71,9 +71,9 @@ if ( ! class_exists( 'SportsPress_Widget_Alignment' ) ) :
*/
public function init() {
$this->options = array(
'none' => __( 'None', 'sportspress' ),
'left' => __( 'Left', 'sportspress' ),
'right' => __( 'Right', 'sportspress' ),
'none' => esc_attr__( 'None', 'sportspress' ),
'left' => esc_attr__( 'Left', 'sportspress' ),
'right' => esc_attr__( 'Right', 'sportspress' ),
);
}
@@ -109,12 +109,12 @@ if ( ! class_exists( 'SportsPress_Widget_Alignment' ) ) :
*/
function before_widget_form( $object, $instance ) {
?>
<p><label for="<?php echo $object->get_field_id( 'align' ); ?>"><?php printf( __( 'Alignment: %s', 'sportspress' ), '' ); ?></label>
<select name="<?php echo $object->get_field_name( 'align' ); ?>" id="<?php echo $object->get_field_id( 'align' ); ?>">
<p><label for="<?php echo esc_attr( $object->get_field_id( 'align' ) ); ?>"><?php printf( esc_attr__( 'Alignment: %s', 'sportspress' ), '' ); ?></label>
<select name="<?php echo esc_attr( $object->get_field_name( 'align' ) ); ?>" id="<?php echo esc_attr( $object->get_field_id( 'align' ) ); ?>">
<?php
$align = strip_tags( sp_array_value( $instance, 'align', 'none' ) );
foreach ( $this->options as $value => $label ) {
printf( '<option value="%s" %s>%s</option>', $value, ( $align == $value ? 'selected' : '' ), $label );
printf( '<option value="%s" %s>%s</option>', esc_attr( $value ), ( $align == $value ? 'selected' : '' ), esc_attr( $label ) );
}
?>
</select>
@@ -126,7 +126,7 @@ if ( ! class_exists( 'SportsPress_Widget_Alignment' ) ) :
* Before widget
*/
function before_widget( $args, $instance ) {
echo '<div class="sp-widget-align-' . sp_array_value( $instance, 'align', 'none' ) . '">';
echo wp_kses_post( '<div class="sp-widget-align-' . sp_array_value( $instance, 'align', 'none' ) . '">' );
}
/**
@@ -143,11 +143,11 @@ if ( ! class_exists( 'SportsPress_Widget_Alignment' ) ) :
?>
<p>
<label>
<?php printf( __( 'Alignment: %s', 'sportspress' ), '' ); ?>
<?php printf( esc_attr__( 'Alignment: %s', 'sportspress' ), '' ); ?>
<select id="align" name="align">
<?php
foreach ( $this->options as $value => $label ) {
printf( '<option value="%s">%s</option>', $value, $label );
printf( wp_kses_post( '<option value="%s">%s</option>', $value, $label ) );
}
?>
</select>

View File

@@ -88,7 +88,7 @@ if ( ! class_exists( 'SportsPress_WordPay' ) ) :
$plans = get_posts( $args );
if ( empty( $plans ) ) {
return '<p>' . __( 'There are no plans associated with the Team Manager role.', 'sportspress' ) . '<p>';
return '<p>' . esc_attr__( 'There are no plans associated with the Team Manager role.', 'sportspress' ) . '<p>';
}
return self::register_form( $atts, 'team', $plans );
@@ -114,7 +114,7 @@ if ( ! class_exists( 'SportsPress_WordPay' ) ) :
$plans = get_posts( $args );
if ( empty( $plans ) ) {
return '<p>' . __( 'There are no plans associated with the Player role.', 'sportspress' ) . '<p>';
return '<p>' . esc_attr__( 'There are no plans associated with the Player role.', 'sportspress' ) . '<p>';
}
return self::register_form( $atts, 'player', $plans );
@@ -155,7 +155,7 @@ if ( ! class_exists( 'SportsPress_WordPay' ) ) :
if ( 'team' == $atts['context'] ) {
?>
<li class="wpay-field">
<label for="wpay_team_name"><?php _e( 'Team Name', 'sportspress' ); ?></label>
<label for="wpay_team_name"><?php esc_attr_e( 'Team Name', 'sportspress' ); ?></label>
<input id="wpay_team_name" name="team_name" type="text" value="">
</li>
<?php
@@ -163,13 +163,13 @@ if ( ! class_exists( 'SportsPress_WordPay' ) ) :
} elseif ( 'player' == $atts['context'] ) {
?>
<li class="wpay-field">
<label for="sp_team"><?php _e( 'Team', 'sportspress' ); ?></label>
<label for="sp_team"><?php esc_attr_e( 'Team', 'sportspress' ); ?></label>
<?php
$args = array(
'post_type' => 'sp_team',
'name' => 'sp_team',
'values' => 'ID',
'show_option_none' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Team', 'sportspress' ) ),
'show_option_none' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Team', 'sportspress' ) ),
'class' => 'widefat',
);
sp_dropdown_pages( $args );
@@ -193,8 +193,8 @@ if ( ! class_exists( 'SportsPress_WordPay' ) ) :
* Add strings to editor.
*/
public static function editor_strings( $strings = array() ) {
$strings['register_team'] = __( 'Register Team', 'sportspress' );
$strings['register_player'] = __( 'Register Player', 'sportspress' );
$strings['register_team'] = esc_attr__( 'Register Team', 'sportspress' );
$strings['register_player'] = esc_attr__( 'Register Player', 'sportspress' );
return $strings;
}
@@ -203,16 +203,16 @@ if ( ! class_exists( 'SportsPress_WordPay' ) ) :
*/
public static function widget_form( $widget, $instance = array() ) {
$contexts = array(
'' => __( 'Members', 'sportspress' ),
'team' => __( 'Teams', 'sportspress' ),
'player' => __( 'Players', 'sportspress' ),
'' => esc_attr__( 'Members', 'sportspress' ),
'team' => esc_attr__( 'Teams', 'sportspress' ),
'player' => esc_attr__( 'Players', 'sportspress' ),
);
?>
<p>
<label for="<?php echo $widget->get_field_id( 'context' ); ?>"><?php _e( 'For:', 'sportspress' ); ?></label>
<select id="<?php echo $widget->get_field_id( 'context' ); ?>" name="<?php echo $widget->get_field_name( 'context' ); ?>">
<label for="<?php echo esc_attr( $widget->get_field_id( 'context' ) ); ?>"><?php esc_attr_e( 'For:', 'sportspress' ); ?></label>
<select id="<?php echo esc_attr( $widget->get_field_id( 'context' ) ); ?>" name="<?php echo esc_attr( $widget->get_field_name( 'context' ) ); ?>">
<?php foreach ( $contexts as $value => $label ) { ?>
<option value="<?php echo $value; ?>" <?php selected( $value, sp_array_value( $instance, 'context' ) ); ?>><?php echo $label; ?></option>
<option value="<?php echo esc_attr( $value ); ?>" <?php selected( $value, sp_array_value( $instance, 'context' ) ); ?>><?php echo wp_kses_post( $label ); ?></option>
<?php } ?>
</select>
</p>