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

@@ -23,15 +23,15 @@ if ( class_exists( 'WP_Importer' ) ) {
*/
public function __construct() {
$this->import_page = 'sp_event_csv';
$this->import_label = __( 'Import Events', 'sportspress' );
$this->import_label = esc_attr__( 'Import Events', 'sportspress' );
$this->columns = array(
'post_date' => __( 'Date', 'sportspress' ),
'post_time' => __( 'Time', 'sportspress' ),
'sp_venue' => __( 'Venue', 'sportspress' ),
'sp_team' => __( 'Teams', 'sportspress' ),
'sp_results' => __( 'Results', 'sportspress' ),
'sp_outcome' => __( 'Outcome', 'sportspress' ),
'sp_player' => __( 'Players', 'sportspress' ),
'post_date' => esc_attr__( 'Date', 'sportspress' ),
'post_time' => esc_attr__( 'Time', 'sportspress' ),
'sp_venue' => esc_attr__( 'Venue', 'sportspress' ),
'sp_team' => esc_attr__( 'Teams', 'sportspress' ),
'sp_results' => esc_attr__( 'Results', 'sportspress' ),
'sp_outcome' => esc_attr__( 'Outcome', 'sportspress' ),
'sp_player' => esc_attr__( 'Players', 'sportspress' ),
);
$performance_labels = sp_get_var_labels( 'sp_performance' );
if ( $performance_labels && is_array( $performance_labels ) && sizeof( $performance_labels ) ) {
@@ -156,7 +156,7 @@ if ( class_exists( 'WP_Importer' ) ) {
'post_type' => 'sp_event',
'post_status' => 'publish',
'post_date' => $date,
'post_title' => __( 'Event', 'sportspress' ),
'post_title' => esc_attr__( 'Event', 'sportspress' ),
);
// Insert event
@@ -338,7 +338,7 @@ if ( class_exists( 'WP_Importer' ) ) {
$title = get_the_title( $id );
// Initialize event name
if ( __( 'Event', 'sportspress' ) === $title ) {
if ( esc_attr__( 'Event', 'sportspress' ) === $title ) {
$title = '';
} else {
$title .= ' ' . get_option( 'sportspress_event_teams_delimiter', 'vs' ) . ' ';
@@ -494,8 +494,8 @@ if ( class_exists( 'WP_Importer' ) ) {
function greet() {
echo '<div class="narrow">';
echo '<p>' . esc_html__( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '</p>';
echo '<p>' . sprintf( wp_kses_post( __( 'Events need to be defined with columns in a specific order (3+ columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/events-sample.csv' ) . '</p>';
echo '<p>' . sprintf( wp_kses_post( __( 'Supports CSV files generated by <a href="%s">LeagueLobster</a>.', 'sportspress' ) ), 'http://tboy.co/leaguelobster' ) . '</p>';
echo '<p>' . sprintf( wp_kses_post( esc_attr__( 'Events need to be defined with columns in a specific order (3+ columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/events-sample.csv' ) . '</p>';
echo '<p>' . sprintf( wp_kses_post( esc_attr__( 'Supports CSV files generated by <a href="%s">LeagueLobster</a>.', 'sportspress' ) ), 'http://tboy.co/leaguelobster' ) . '</p>';
wp_import_upload_form( 'admin.php?import=sp_event_csv&step=1' );
echo '</div>';
}
@@ -538,7 +538,7 @@ if ( class_exists( 'WP_Importer' ) ) {
);
if ( ! sp_dropdown_taxonomies( $args ) ) :
echo '<p>' . esc_html__( 'None', 'sportspress' ) . '</p>';
sp_taxonomy_adder( 'sp_league', 'sp_team', __( 'Add New', 'sportspress' ) );
sp_taxonomy_adder( 'sp_league', 'sp_team', esc_attr__( 'Add New', 'sportspress' ) );
endif;
?>
</td>
@@ -551,11 +551,11 @@ if ( class_exists( 'WP_Importer' ) ) {
'taxonomy' => 'sp_season',
'name' => 'sp_season',
'values' => 'slug',
'show_option_none' => __( '&mdash; Not set &mdash;', 'sportspress' ),
'show_option_none' => esc_attr__( '&mdash; Not set &mdash;', 'sportspress' ),
);
if ( ! sp_dropdown_taxonomies( $args ) ) :
echo '<p>' . esc_html__( 'None', 'sportspress' ) . '</p>';
sp_taxonomy_adder( 'sp_season', 'sp_team', __( 'Add New', 'sportspress' ) );
sp_taxonomy_adder( 'sp_season', 'sp_team', esc_attr__( 'Add New', 'sportspress' ) );
endif;
?>
</td>