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,14 +23,14 @@ if ( class_exists( 'WP_Importer' ) ) {
*/
public function __construct() {
$this->import_page = 'sp_fixture_csv';
$this->import_label = __( 'Import Fixtures', 'sportspress' );
$this->import_label = esc_attr__( 'Import Fixtures', 'sportspress' );
$this->columns = array(
'post_date' => __( 'Date', 'sportspress' ),
'post_time' => __( 'Time', 'sportspress' ),
'sp_venue' => __( 'Venue', 'sportspress' ),
'sp_home' => __( 'Home', 'sportspress' ),
'sp_away' => __( 'Away', 'sportspress' ),
'sp_day' => __( 'Match Day', 'sportspress' ),
'post_date' => esc_attr__( 'Date', 'sportspress' ),
'post_time' => esc_attr__( 'Time', 'sportspress' ),
'sp_venue' => esc_attr__( 'Venue', 'sportspress' ),
'sp_home' => esc_attr__( 'Home', 'sportspress' ),
'sp_away' => esc_attr__( 'Away', 'sportspress' ),
'sp_day' => esc_attr__( 'Match Day', 'sportspress' ),
);
$this->optionals = array( 'sp_day' );
}
@@ -122,7 +122,7 @@ if ( class_exists( 'WP_Importer' ) ) {
'post_type' => 'sp_event',
'post_status' => 'publish',
'post_date' => $date,
'post_title' => __( 'Event', 'sportspress' ),
'post_title' => esc_attr__( 'Event', 'sportspress' ),
);
// Insert event
@@ -226,7 +226,7 @@ if ( class_exists( 'WP_Importer' ) ) {
$title = get_the_title( $id );
// Initialize event name
if ( __( 'Event', 'sportspress' ) === $title ) {
if ( esc_attr__( 'Event', 'sportspress' ) === $title ) {
$title = '';
} else {
$title .= ' ' . get_option( 'sportspress_event_teams_delimiter', 'vs' ) . ' ';
@@ -284,8 +284,8 @@ if ( class_exists( 'WP_Importer' ) ) {
function greet() {
echo '<div class="narrow">';
echo '<p>' . esc_html__( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '</p>';
echo '<p>' . sprintf( wp_kses_post( __( 'Fixtures need to be defined with columns in a specific order (4+ columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/fixtures-sample.csv' ) . '</p>';
echo '<p>' . sprintf( wp_kses_post( __( 'Supports CSV files generated by <a href="%s">LeagueLobster</a>.', 'sportspress' ) ), 'http://tboy.co/leaguelobster' ) . '</p>';
echo '<p>' . sprintf( wp_kses_post( esc_attr__( 'Fixtures need to be defined with columns in a specific order (4+ columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/fixtures-sample.csv' ) . '</p>';
echo '<p>' . sprintf( wp_kses_post( esc_attr__( 'Supports CSV files generated by <a href="%s">LeagueLobster</a>.', 'sportspress' ) ), 'http://tboy.co/leaguelobster' ) . '</p>';
wp_import_upload_form( 'admin.php?import=sp_fixture_csv&step=1' );
echo '</div>';
}
@@ -319,11 +319,11 @@ if ( class_exists( 'WP_Importer' ) ) {
'taxonomy' => 'sp_league',
'name' => 'sp_league',
'values' => 'slug',
'show_option_none' => __( '&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_league', 'sp_team', __( 'Add New', 'sportspress' ) );
sp_taxonomy_adder( 'sp_league', 'sp_team', esc_attr__( 'Add New', 'sportspress' ) );
endif;
?>
</td>
@@ -336,11 +336,11 @@ if ( class_exists( 'WP_Importer' ) ) {
'taxonomy' => 'sp_season',
'name' => 'sp_season',
'values' => 'slug',
'show_option_none' => __( '&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>