diff --git a/includes/admin/importers/class-sp-event-importer.php b/includes/admin/importers/class-sp-event-importer.php index 24fc46ce..75cdd974 100644 --- a/includes/admin/importers/class-sp-event-importer.php +++ b/includes/admin/importers/class-sp-event-importer.php @@ -470,7 +470,7 @@ if ( class_exists( 'WP_Importer' ) ) { // Show Result echo '

- ' . sprintf( __( 'Import complete - imported %1$s events and skipped %2$s.', 'sportspress' ), $this->imported, $this->skipped ) . ' + ' . sprintf( esc_html__( 'Import complete - imported %1$s events and skipped %2$s.', 'sportspress' ), esc_html( $this->imported ), esc_html( $this->skipped ) ) . '

'; $this->import_end(); @@ -480,7 +480,7 @@ if ( class_exists( 'WP_Importer' ) ) { * Performs post-import cleanup of files and the cache */ function import_end() { - echo '

' . __( 'All done!', 'sportspress' ) . ' ' . __( 'View Events', 'sportspress' ) . '' . '

'; + echo '

' . esc_html__( 'All done!', 'sportspress' ) . ' ' . esc_html__( 'View Events', 'sportspress' ) . '' . '

'; do_action( 'import_end' ); } @@ -493,9 +493,9 @@ if ( class_exists( 'WP_Importer' ) ) { */ function greet() { echo '
'; - echo '

' . __( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '

'; - echo '

' . sprintf( __( 'Events need to be defined with columns in a specific order (3+ columns). Click here to download a sample.', 'sportspress' ), plugin_dir_url( SP_PLUGIN_FILE ) . 'dummy-data/events-sample.csv' ) . '

'; - echo '

' . sprintf( __( 'Supports CSV files generated by LeagueLobster.', 'sportspress' ), 'http://tboy.co/leaguelobster' ) . '

'; + echo '

' . esc_html__( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '

'; + echo '

' . sprintf( esc_html__( 'Events need to be defined with columns in a specific order (3+ columns). Click here to download a sample.', 'sportspress' ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/events-sample.csv' ) . '

'; + echo '

' . sprintf( esc_html__( 'Supports CSV files generated by LeagueLobster.', 'sportspress' ), 'http://tboy.co/leaguelobster' ) . '

'; wp_import_upload_form( 'admin.php?import=sp_event_csv&step=1' ); echo '
'; } @@ -511,7 +511,7 @@ if ( class_exists( 'WP_Importer' ) ) { - + - + - + @@ -167,15 +167,15 @@ if ( class_exists( 'WP_Importer' ) ) { optionals ) ) { ?> - placeholder=""> + placeholder="">


    @@ -527,24 +527,24 @@ if ( class_exists( 'WP_Importer' ) ) {


'sp_league', 'name' => 'sp_league', 'values' => 'slug', - 'show_option_none' => __( '— Not set —', 'sportspress' ), + 'show_option_none' => esc_attr__( '— Not set —', 'sportspress' ), ); if ( ! sp_dropdown_taxonomies( $args ) ) : - echo '

' . __( 'None', 'sportspress' ) . '

'; + echo '

' . esc_html__( 'None', 'sportspress' ) . '

'; sp_taxonomy_adder( 'sp_league', 'sp_team', __( 'Add New', 'sportspress' ) ); endif; ?>


__( '— Not set —', 'sportspress' ), ); if ( ! sp_dropdown_taxonomies( $args ) ) : - echo '

' . __( 'None', 'sportspress' ) . '

'; + echo '

' . esc_html__( 'None', 'sportspress' ) . '

'; sp_taxonomy_adder( 'sp_season', 'sp_team', __( 'Add New', 'sportspress' ) ); endif; ?> @@ -562,7 +562,7 @@ if ( class_exists( 'WP_Importer' ) ) {
- +
diff --git a/includes/admin/importers/class-sp-importer.php b/includes/admin/importers/class-sp-importer.php index a7de9bcf..afdcc9dd 100644 --- a/includes/admin/importers/class-sp-importer.php +++ b/includes/admin/importers/class-sp-importer.php @@ -104,8 +104,8 @@ if ( class_exists( 'WP_Importer' ) ) { */ function dropdown( $selected ) { ?> - + columns as $key => $label ) : ?> @@ -150,7 +150,7 @@ if ( class_exists( 'WP_Importer' ) ) {
- +
- - + +
- +

- imported + 1, $this->imported + 1 ); ?> + imported + 1 ), esc_html( $this->imported + 1 ) ); ?>

@@ -204,8 +204,8 @@ endwhile; ' . __( 'Sorry, there has been an error.', 'sportspress' ) . '
'; - _e( 'The CSV is invalid.', 'sportspress' ) . '

'; + echo '

' . esc_html__( 'Sorry, there has been an error.', 'sportspress' ) . '
'; + esc_html_e( 'The CSV is invalid.', 'sportspress' ) . '

'; $this->footer(); die(); @@ -240,7 +240,7 @@ endwhile; $file = wp_import_handle_upload(); if ( isset( $file['error'] ) ) { - echo '

' . __( 'Sorry, there has been an error.', 'sportspress' ) . '
'; + echo '

' . esc_html__( 'Sorry, there has been an error.', 'sportspress' ) . '
'; echo esc_html( $file['error'] ) . '

'; return false; } @@ -255,7 +255,7 @@ endwhile; } else { - echo '

' . __( 'Sorry, there has been an error.', 'sportspress' ) . '

'; + echo '

' . esc_html__( 'Sorry, there has been an error.', 'sportspress' ) . '

'; return false; } @@ -271,7 +271,7 @@ endwhile; * @return void */ function header() { - echo '

' . $this->import_label . '

'; + echo '

' . esc_html( $this->import_label ) . '

'; } /** diff --git a/includes/admin/importers/class-sp-official-importer.php b/includes/admin/importers/class-sp-official-importer.php index 2f3dcf59..c8002b93 100644 --- a/includes/admin/importers/class-sp-official-importer.php +++ b/includes/admin/importers/class-sp-official-importer.php @@ -83,7 +83,7 @@ if ( class_exists( 'WP_Importer' ) ) { // Show Result echo '

- ' . sprintf( __( 'Import complete - imported %1$s officials and skipped %2$s.', 'sportspress' ), $this->imported, $this->skipped ) . ' + ' . sprintf( esc_html__( 'Import complete - imported %1$s officials and skipped %2$s.', 'sportspress' ), esc_html( $this->imported ), esc_html( $this->skipped ) ) . '

'; $this->import_end(); @@ -93,7 +93,7 @@ if ( class_exists( 'WP_Importer' ) ) { * Performs post-import cleanup of files and the cache */ function import_end() { - echo '

' . __( 'All done!', 'sportspress' ) . ' ' . __( 'View Officials', 'sportspress' ) . '' . '

'; + echo '

' . esc_html__( 'All done!', 'sportspress' ) . ' ' . esc_html__( 'View Officials', 'sportspress' ) . '' . '

'; do_action( 'import_end' ); } @@ -105,7 +105,7 @@ if ( class_exists( 'WP_Importer' ) ) { * @return void */ function header() { - echo '

' . __( 'Import Officials', 'sportspress' ) . '

'; + echo '

' . esc_html__( 'Import Officials', 'sportspress' ) . '

'; } /** @@ -116,8 +116,8 @@ if ( class_exists( 'WP_Importer' ) ) { */ function greet() { echo '
'; - echo '

' . __( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '

'; - echo '

' . sprintf( __( 'Officials need to be defined with columns in a specific order. Click here to download a sample.', 'sportspress' ), plugin_dir_url( SP_PLUGIN_FILE ) . 'dummy-data/officials-sample.csv' ) . '

'; + echo '

' . esc_html__( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '

'; + echo '

' . sprintf( esc_html__( 'Officials need to be defined with columns in a specific order. Click here to download a sample.', 'sportspress' ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/officials-sample.csv' ) . '

'; wp_import_upload_form( 'admin.php?import=sp_official_csv&step=1' ); echo '
'; } diff --git a/includes/admin/importers/class-sp-team-importer.php b/includes/admin/importers/class-sp-team-importer.php index 3c82a2da..1afcbeb6 100644 --- a/includes/admin/importers/class-sp-team-importer.php +++ b/includes/admin/importers/class-sp-team-importer.php @@ -120,7 +120,7 @@ if ( class_exists( 'WP_Importer' ) ) { // Show Result echo '

- ' . sprintf( __( 'Import complete - imported %1$s teams and skipped %2$s.', 'sportspress' ), $this->imported, $this->skipped ) . ' + ' . sprintf( esc_html__( 'Import complete - imported %1$s teams and skipped %2$s.', 'sportspress' ), esc_html( $this->imported ), esc_html( $this->skipped ) ) . '

'; $this->import_end(); @@ -130,7 +130,7 @@ if ( class_exists( 'WP_Importer' ) ) { * Performs post-import cleanup of files and the cache */ function import_end() { - echo '

' . __( 'All done!', 'sportspress' ) . ' ' . __( 'View Teams', 'sportspress' ) . '' . '

'; + echo '

' . esc_html__( 'All done!', 'sportspress' ) . ' ' . esc_html__( 'View Teams', 'sportspress' ) . '' . '

'; do_action( 'import_end' ); } @@ -143,8 +143,8 @@ if ( class_exists( 'WP_Importer' ) ) { */ function greet() { echo '
'; - echo '

' . __( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '

'; - echo '

' . sprintf( __( 'Teams need to be defined with columns in a specific order (3 columns). Click here to download a sample.', 'sportspress' ), plugin_dir_url( SP_PLUGIN_FILE ) . 'dummy-data/teams-sample.csv' ) . '

'; + echo '

' . esc_html__( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '

'; + echo '

' . sprintf( esc_html__( 'Teams need to be defined with columns in a specific order (3 columns). Click here to download a sample.', 'sportspress' ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/teams-sample.csv' ) . '

'; wp_import_upload_form( 'admin.php?import=sp_team_csv&step=1' ); echo '
'; } @@ -164,7 +164,7 @@ if ( class_exists( 'WP_Importer' ) ) {