Escapes based on phpcs #9

This commit is contained in:
Savvas Hadjigeorgiou
2021-11-12 07:41:10 +02:00
parent fa4a51461c
commit f5aae77471
4 changed files with 35 additions and 35 deletions

View File

@@ -470,7 +470,7 @@ if ( class_exists( 'WP_Importer' ) ) {
// Show Result
echo '<div class="updated settings-error below-h2"><p>
' . sprintf( __( 'Import complete - imported <strong>%1$s</strong> events and skipped <strong>%2$s</strong>.', 'sportspress' ), $this->imported, $this->skipped ) . '
' . sprintf( esc_html__( 'Import complete - imported <strong>%1$s</strong> events and skipped <strong>%2$s</strong>.', 'sportspress' ), esc_html( $this->imported ), esc_html( $this->skipped ) ) . '
</p></div>';
$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 '<p>' . __( 'All done!', 'sportspress' ) . ' <a href="' . admin_url( 'edit.php?post_type=sp_event' ) . '">' . __( 'View Events', 'sportspress' ) . '</a>' . '</p>';
echo '<p>' . esc_html__( 'All done!', 'sportspress' ) . ' <a href="' . esc_url( admin_url( 'edit.php?post_type=sp_event' ) ) . '">' . esc_html__( 'View Events', 'sportspress' ) . '</a>' . '</p>';
do_action( 'import_end' );
}
@@ -493,9 +493,9 @@ if ( class_exists( 'WP_Importer' ) ) {
*/
function greet() {
echo '<div class="narrow">';
echo '<p>' . __( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '</p>';
echo '<p>' . sprintf( __( 'Events need to be defined with columns in a specific order (3+ columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ), plugin_dir_url( SP_PLUGIN_FILE ) . 'dummy-data/events-sample.csv' ) . '</p>';
echo '<p>' . sprintf( __( 'Supports CSV files generated by <a href="%s">LeagueLobster</a>.', 'sportspress' ), 'http://tboy.co/leaguelobster' ) . '</p>';
echo '<p>' . esc_html__( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '</p>';
echo '<p>' . sprintf( esc_html__( '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( esc_html__( '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>';
}
@@ -511,7 +511,7 @@ if ( class_exists( 'WP_Importer' ) ) {
<table class="form-table">
<tbody>
<tr>
<th scope="row"><label><?php _e( 'Format', 'sportspress' ); ?></label><br/></th>
<th scope="row"><label><?php esc_html_e( 'Format', 'sportspress' ); ?></label><br/></th>
<td class="forminp forminp-radio" id="sp_formatdiv">
<fieldset id="post-formats-select">
<ul>
@@ -527,24 +527,24 @@ if ( class_exists( 'WP_Importer' ) ) {
</td>
</tr>
<tr>
<th scope="row"><label><?php _e( 'League', 'sportspress' ); ?></label><br/></th>
<th scope="row"><label><?php esc_html_e( 'League', 'sportspress' ); ?></label><br/></th>
<td>
<?php
$args = array(
'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>' . __( 'None', 'sportspress' ) . '</p>';
echo '<p>' . esc_html__( 'None', 'sportspress' ) . '</p>';
sp_taxonomy_adder( 'sp_league', 'sp_team', __( 'Add New', 'sportspress' ) );
endif;
?>
</td>
</tr>
<tr>
<th scope="row"><label><?php _e( 'Season', 'sportspress' ); ?></label><br/></th>
<th scope="row"><label><?php esc_html_e( 'Season', 'sportspress' ); ?></label><br/></th>
<td>
<?php
$args = array(
@@ -554,7 +554,7 @@ if ( class_exists( 'WP_Importer' ) ) {
'show_option_none' => __( '&mdash; Not set &mdash;', 'sportspress' ),
);
if ( ! sp_dropdown_taxonomies( $args ) ) :
echo '<p>' . __( 'None', 'sportspress' ) . '</p>';
echo '<p>' . esc_html__( 'None', 'sportspress' ) . '</p>';
sp_taxonomy_adder( 'sp_season', 'sp_team', __( 'Add New', 'sportspress' ) );
endif;
?>
@@ -562,7 +562,7 @@ if ( class_exists( 'WP_Importer' ) ) {
</tr>
<tr>
<th scope="row" class="titledesc">
<?php _e( 'Date Format', 'sportspress' ); ?>
<?php esc_html_e( 'Date Format', 'sportspress' ); ?>
</th>
<td class="forminp forminp-radio">
<fieldset>