Fix escaping valid HTML

This commit is contained in:
Brian Miyaji
2021-11-18 00:45:50 +09:00
parent 3ffd38bd1e
commit 01e2ae2069
20 changed files with 3814 additions and 3838 deletions

View File

@@ -82,7 +82,7 @@ if ( ! class_exists( 'SP_Admin_Dashboard' ) ) :
?>
<li class="countdown" data-countdown="<?php echo esc_attr( str_replace( '-', '/', get_gmt_from_date( $next_event->post_date ) ) ); ?>">
<a href="<?php echo esc_url( get_edit_post_link( $next_event->ID ) ); ?>">
<?php printf( esc_html__( '<strong>%s</strong> until next event', 'sportspress' ), esc_html( $interval->days ) . ' ' . esc_html__( 'days', 'sportspress' ) . ' ' . sprintf( '%02s:%02s:%02s', esc_html( $interval->h ), esc_html( $interval->i ), esc_html( $interval->s ) ) ); ?>
<?php printf( wp_kses_post( __( '<strong>%s</strong> until next event', 'sportspress' ) ), esc_html( $interval->days ) . ' ' . esc_html__( 'days', 'sportspress' ) . ' ' . sprintf( '%02s:%02s:%02s', esc_html( $interval->h ), esc_html( $interval->i ), esc_html( $interval->s ) ) ); ?>
(<?php echo esc_html( $next_event->post_title ); ?>)
</a>
</li>

View File

@@ -36,27 +36,27 @@ if ( ! class_exists( 'SP_Admin_Importers' ) ) :
array(
'sp_event_csv' => array(
'name' => esc_attr__( 'SportsPress Events (CSV)', 'sportspress' ),
'description' => esc_attr__( 'Import <strong>events</strong> from a csv file.', 'sportspress' ),
'description' => wp_kses_post( __( 'Import <strong>events</strong> from a csv file.', 'sportspress' ) ),
'callback' => array( $this, 'events_importer' ),
),
'sp_fixture_csv' => array(
'name' => esc_attr__( 'SportsPress Fixtures (CSV)', 'sportspress' ),
'description' => esc_attr__( 'Import <strong>upcoming events</strong> from a csv file.', 'sportspress' ),
'description' => wp_kses_post( __( 'Import <strong>upcoming events</strong> from a csv file.', 'sportspress' ) ),
'callback' => array( $this, 'fixtures_importer' ),
),
'sp_team_csv' => array(
'name' => esc_attr__( 'SportsPress Teams (CSV)', 'sportspress' ),
'description' => esc_attr__( 'Import <strong>teams</strong> from a csv file.', 'sportspress' ),
'description' => wp_kses_post( __( 'Import <strong>teams</strong> from a csv file.', 'sportspress' ) ),
'callback' => array( $this, 'teams_importer' ),
),
'sp_player_csv' => array(
'name' => esc_attr__( 'SportsPress Players (CSV)', 'sportspress' ),
'description' => esc_attr__( 'Import <strong>players</strong> from a csv file.', 'sportspress' ),
'description' => wp_kses_post( __( 'Import <strong>players</strong> from a csv file.', 'sportspress' ) ),
'callback' => array( $this, 'players_importer' ),
),
'sp_staff_csv' => array(
'name' => esc_attr__( 'SportsPress Staff (CSV)', 'sportspress' ),
'description' => esc_attr__( 'Import <strong>staff</strong> from a csv file.', 'sportspress' ),
'description' => wp_kses_post( __( 'Import <strong>staff</strong> from a csv file.', 'sportspress' ) ),
'callback' => array( $this, 'staff_importer' ),
),
)

View File

@@ -78,7 +78,7 @@ if ( ! class_exists( 'SP_Admin_Permalink_Settings' ) ) :
* Show the settings
*/
public function settings() {
echo wp_kses_post( wpautop( esc_attr__( 'These settings control the permalinks used for SportsPress. These settings only apply when <strong>not using "default" permalinks above</strong>.', 'sportspress' ) ) );
echo wp_kses_post( wpautop( __( 'These settings control the permalinks used for SportsPress. These settings only apply when <strong>not using "default" permalinks above</strong>.', 'sportspress' ) ) );
}
/**

View File

@@ -204,7 +204,7 @@ class SP_Admin_Setup_Wizard {
public function sp_setup_introduction() {
?>
<h1><?php esc_html_e( 'Welcome to SportsPress', 'sportspress' ); ?></h1>
<p><?php esc_html_e( 'Thank you for choosing SportsPress to power your sports website! This quick setup wizard will help you configure the basic settings. <strong>Its completely optional and shouldnt take longer than five minutes.</strong>', 'sportspress' ); ?></p>
<p><?php echo wp_kses_post( __( 'Thank you for choosing SportsPress to power your sports website! This quick setup wizard will help you configure the basic settings. <strong>Its completely optional and shouldnt take longer than five minutes.</strong>', 'sportspress' ) ); ?></p>
<p><?php esc_html_e( 'No time right now? If you dont want to go through the wizard, you can skip and return to the WordPress dashboard. Come back anytime if you change your mind!', 'sportspress' ); ?></p>
<p class="sp-setup-actions step">
<a href="<?php echo esc_url( $this->get_next_step_link() ); ?>" class="button-primary button button-large button-next"><?php esc_html_e( 'Let\'s Go!', 'sportspress' ); ?></a>

View File

@@ -329,7 +329,7 @@ class SP_Admin_Welcome {
<div class="wrap about-wrap about-sportspress-wrap">
<?php $this->intro(); ?>
<p class="about-description"><?php printf( wp_kses_post( esc_attr__( 'SportsPress is developed and maintained by a worldwide team of passionate individuals and backed by an awesome developer community. Want to see your name? <a href="%s">Contribute to SportsPress</a>.', 'sportspress' ) ), 'https://github.com/ThemeBoy/SportsPress/blob/master/CONTRIBUTING.md' ); ?></p>
<p class="about-description"><?php printf( wp_kses_post( __( 'SportsPress is developed and maintained by a worldwide team of passionate individuals and backed by an awesome developer community. Want to see your name? <a href="%s">Contribute to SportsPress</a>.', 'sportspress' ) ), 'https://github.com/ThemeBoy/SportsPress/blob/master/CONTRIBUTING.md' ); ?></p>
<div class="sp-feature feature-section col one-col">
<?php echo wp_kses_post( $this->contributors() ); ?>
@@ -347,7 +347,7 @@ class SP_Admin_Welcome {
<?php $this->intro(); ?>
<p class="about-description"><?php printf( wp_kses_post( esc_attr__( 'SportsPress has been kindly translated into several other languages thanks to our translation team. Want to see your name? <a href="%s">Translate SportsPress</a>.', 'sportspress' ) ), 'https://translate.wordpress.org/projects/wp-plugins/sportspress' ); ?></p>
<p class="about-description"><?php printf( wp_kses_post( __( 'SportsPress has been kindly translated into several other languages thanks to our translation team. Want to see your name? <a href="%s">Translate SportsPress</a>.', 'sportspress' ) ), 'https://translate.wordpress.org/projects/wp-plugins/sportspress' ); ?></p>
</div>
<?php
}

View File

@@ -470,7 +470,7 @@ if ( class_exists( 'WP_Importer' ) ) {
// Show Result
echo '<div class="updated settings-error below-h2"><p>
' . 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 ) ) . '
' . wp_kses_post( sprintf( __( '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();
@@ -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( 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>';
echo '<p>' . wp_kses_post( 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' ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/events-sample.csv' ) ) . '</p>';
echo '<p>' . wp_kses_post( sprintf( __( '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>';
}

View File

@@ -135,7 +135,7 @@ if ( class_exists( 'WP_Importer' ) ) {
// Show Result
echo '<div class="updated settings-error below-h2"><p>
' . sprintf( esc_html__( 'Import complete - imported <strong>%1$s</strong> rows and skipped <strong>%2$s</strong>.', 'sportspress' ), esc_html( $this->imported ), esc_html( $this->skipped ) ) . '
' . wp_kses_post( sprintf( __( 'Import complete - imported <strong>%1$s</strong> rows and skipped <strong>%2$s</strong>.', 'sportspress' ), esc_html( $this->imported ), esc_html( $this->skipped ) ) ) . '
</p></div>';
$this->import_end( $event );
@@ -178,7 +178,7 @@ if ( class_exists( 'WP_Importer' ) ) {
)
);
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( esc_attr__( 'Box scores need to be defined with columns in a specific order. <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/event-performance-sample.csv' ) . '</p>';
echo '<p>' . wp_kses_post( sprintf( __( 'Box scores need to be defined with columns in a specific order. <a href="%s">Click here to download a sample</a>.', 'sportspress' ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/event-performance-sample.csv' ) ) . '</p>';
wp_import_upload_form( add_query_arg( $args, 'admin.php' ) );
} else {
echo '<p><a href="' . esc_url( admin_url( add_query_arg( array( 'post_type' => 'sp_event' ), 'edit.php' ) ) ) . '">' . sprintf( esc_html__( 'Select %s', 'sportspress' ), esc_html__( 'Event', 'sportspress' ) ) . '</a></p>';

View File

@@ -260,7 +260,7 @@ if ( class_exists( 'WP_Importer' ) ) {
// Show Result
echo '<div class="updated settings-error below-h2"><p>
' . 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 ) ) . '
' . wp_kses_post( sprintf( __( '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();
@@ -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( 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>';
echo '<p>' . wp_kses_post( sprintf( __( '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>' . wp_kses_post( sprintf( __( '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>';
}

View File

@@ -83,7 +83,7 @@ if ( class_exists( 'WP_Importer' ) ) {
// Show Result
echo '<div class="updated settings-error below-h2"><p>
' . sprintf( esc_html__( 'Import complete - imported <strong>%1$s</strong> officials and skipped <strong>%2$s</strong>.', 'sportspress' ), esc_html( $this->imported ), esc_html( $this->skipped ) ) . '
' . wp_kses_post( sprintf( __( 'Import complete - imported <strong>%1$s</strong> officials and skipped <strong>%2$s</strong>.', 'sportspress' ), esc_html( $this->imported ), esc_html( $this->skipped ) ) ) . '
</p></div>';
$this->import_end();
@@ -117,7 +117,7 @@ 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( esc_attr__( 'Officials need to be defined with columns in a specific order. <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/officials-sample.csv' ) . '</p>';
echo '<p>' . wp_kses_post( sprintf( __( 'Officials need to be defined with columns in a specific order. <a href="%s">Click here to download a sample</a>.', 'sportspress' ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/officials-sample.csv' ) ) . '</p>';
wp_import_upload_form( 'admin.php?import=sp_official_csv&step=1' );
echo '</div>';
}

View File

@@ -216,7 +216,7 @@ if ( class_exists( 'WP_Importer' ) ) {
// Show Result
echo '<div class="updated settings-error below-h2"><p>
' . sprintf( esc_html__( 'Import complete - imported <strong>%1$s</strong> players and skipped <strong>%2$s</strong>.', 'sportspress' ), esc_html( $this->imported ), esc_html( $this->skipped ) ) . '
' . wp_kses_post( sprintf( __( 'Import complete - imported <strong>%1$s</strong> players and skipped <strong>%2$s</strong>.', 'sportspress' ), esc_html( $this->imported ), esc_html( $this->skipped ) ) ) . '
</p></div>';
$this->import_end();
@@ -250,7 +250,7 @@ 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( esc_attr__( 'Players need to be defined with columns in a specific order (8 columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/players-sample.csv' ) . '</p>';
echo '<p>' . wp_kses_post( sprintf( __( 'Players need to be defined with columns in a specific order (8 columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/players-sample.csv' ) ) . '</p>';
wp_import_upload_form( 'admin.php?import=sp_player_csv&step=1' );
echo '</div>';
}

View File

@@ -164,7 +164,7 @@ if ( class_exists( 'WP_Importer' ) ) {
// Show Result
echo '<div class="updated settings-error below-h2"><p>
' . sprintf( esc_html__( 'Import complete - imported <strong>%1$s</strong> staff and skipped <strong>%2$s</strong>.', 'sportspress' ), esc_html( $this->imported ), esc_html( $this->skipped ) ) . '
' . wp_kses_post( sprintf( __( 'Import complete - imported <strong>%1$s</strong> staff and skipped <strong>%2$s</strong>.', 'sportspress' ), esc_html( $this->imported ), esc_html( $this->skipped ) ) ) . '
</p></div>';
$this->import_end();
@@ -198,7 +198,7 @@ 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( esc_attr__( 'Staff need to be defined with columns in a specific order (6 columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/staff-sample.csv' ) . '</p>';
echo '<p>' . wp_kses_post( sprintf( __( 'Staff need to be defined with columns in a specific order (6 columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/staff-sample.csv' ) ) . '</p>';
wp_import_upload_form( 'admin.php?import=sp_staff_csv&step=1' );
echo '</div>';
}

View File

@@ -120,7 +120,7 @@ if ( class_exists( 'WP_Importer' ) ) {
// Show Result
echo '<div class="updated settings-error below-h2"><p>
' . sprintf( esc_html__( 'Import complete - imported <strong>%1$s</strong> teams and skipped <strong>%2$s</strong>.', 'sportspress' ), esc_html( $this->imported ), esc_html( $this->skipped ) ) . '
' . wp_kses_post( sprintf( __( 'Import complete - imported <strong>%1$s</strong> teams and skipped <strong>%2$s</strong>.', 'sportspress' ), esc_html( $this->imported ), esc_html( $this->skipped ) ) ) . '
</p></div>';
$this->import_end();
@@ -144,7 +144,7 @@ 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( esc_attr__( 'Teams 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/teams-sample.csv' ) . '</p>';
echo '<p>' . wp_kses_post( sprintf( __( 'Teams 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/teams-sample.csv' ) ) . '</p>';
wp_import_upload_form( 'admin.php?import=sp_team_csv&step=1' );
echo '</div>';
}

View File

@@ -359,7 +359,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) :
<td class="forminp">
<legend class="screen-reader-text"><span><?php esc_html_e( 'Timezone', 'sportspress' ); ?></span></legend>
<select id="timezone_string" name="timezone_string" class="<?php echo esc_attr( $class ); ?>">
<?php echo wp_kses( wp_timezone_choice( $tzstring ), array( 'option' => array( 'value' => array(), 'selected' => array() ) ) ); ?>
<?php echo esc_html( wp_timezone_choice( $tzstring ) ); ?>
</select>
</td>
</tr>

View File

@@ -105,7 +105,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
$memory = sp_let_to_num( WP_MEMORY_LIMIT );
if ( $memory < 67108864 ) {
echo '<mark class="error">' . wp_kses_post( sprintf( esc_attr__( '%1$s - We recommend setting memory to at least 64MB. See: <a href="%2$s">Increasing memory allocated to PHP</a>', 'sportspress' ), esc_html( size_format( $memory ) ), 'http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP' ) ) . '</mark>';
echo '<mark class="error">' . wp_kses_post( sprintf( __( '%1$s - We recommend setting memory to at least 64MB. See: <a href="%2$s">Increasing memory allocated to PHP</a>', 'sportspress' ), esc_html( size_format( $memory ) ), 'http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP' ) ) . '</mark>';
} else {
echo '<mark class="yes">' . esc_html( size_format( $memory ) ) . '</mark>';
}
@@ -196,7 +196,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
$posting['soap_client']['note'] = esc_attr__( 'Your server has the SOAP Client class enabled.', 'sportspress' );
$posting['soap_client']['success'] = true;
} else {
$posting['soap_client']['note'] = sprintf( esc_attr__( 'Your server does not have the <a href="%s">SOAP Client</a> class enabled - some gateway plugins which use SOAP may not work as expected.', 'sportspress' ), 'http://php.net/manual/en/class.soapclient.php' ) . '</mark>';
$posting['soap_client']['note'] = wp_kses_post( sprintf( __( 'Your server does not have the <a href="%s">SOAP Client</a> class enabled - some gateway plugins which use SOAP may not work as expected.', 'sportspress' ), 'http://php.net/manual/en/class.soapclient.php' ) ) . '</mark>';
$posting['soap_client']['success'] = false;
}
@@ -636,7 +636,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
$theme_version = $status->get_file_version( $theme_file );
if ( $core_version && ( empty( $theme_version ) || version_compare( $theme_version, $core_version, '<' ) ) ) {
$found_files[ $plugin_name ][] = sprintf( esc_attr__( '<code>%1$s</code> version <strong style="color:red">%2$s</strong> is out of date. The core version is %3$s', 'sportspress' ), basename( $theme_file ), $theme_version ? $theme_version : '-', $core_version );
$found_files[ $plugin_name ][] = wp_kses_post( sprintf( __( '<code>%1$s</code> version <strong style="color:red">%2$s</strong> is out of date. The core version is %3$s', 'sportspress' ), basename( $theme_file ), $theme_version ? $theme_version : '-', $core_version ) );
} else {
$found_files[ $plugin_name ][] = sprintf( '<code>%s</code>', basename( $theme_file ) );
}

View File

@@ -64,7 +64,7 @@
$memory = sp_let_to_num( WP_MEMORY_LIMIT );
if ( $memory < 67108864 ) {
echo '<mark class="error">' . wp_kses_post( sprintf( esc_attr__( '%1$s - We recommend setting memory to at least 64MB. See: <a href="%2$s">Increasing memory allocated to PHP</a>', 'sportspress' ), esc_html( size_format( $memory ) ), 'http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP' ) ) . '</mark>';
echo '<mark class="error">' . wp_kses_post( sprintf( __( '%1$s - We recommend setting memory to at least 64MB. See: <a href="%2$s">Increasing memory allocated to PHP</a>', 'sportspress' ), esc_html( size_format( $memory ) ), 'http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP' ) ) . '</mark>';
} else {
echo '<mark class="yes">' . esc_html( size_format( $memory ) ) . '</mark>';
}
@@ -592,7 +592,7 @@
$theme_version = $this->get_file_version( $theme_file );
if ( $core_version && ( empty( $theme_version ) || version_compare( $theme_version, $core_version, '<' ) ) ) {
$found_files[ $plugin_name ][] = sprintf( esc_attr__( '<code>%1$s</code> version <strong style="color:red">%2$s</strong> is out of date. The core version is %3$s', 'sportspress' ), basename( $theme_file ), $theme_version ? $theme_version : '-', $core_version );
$found_files[ $plugin_name ][] = wp_kses_post( sprintf( __( '<code>%1$s</code> version <strong style="color:red">%2$s</strong> is out of date. The core version is %3$s', 'sportspress' ), basename( $theme_file ), $theme_version ? $theme_version : '-', $core_version ) );
} else {
$found_files[ $plugin_name ][] = sprintf( '<code>%s</code>', basename( $theme_file ) );
}

View File

@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
}
?>
<div id="message" class="updated sportspress-message wc-connect">
<p><?php esc_attr_e( '<strong>Your theme has bundled outdated copies of SportsPress template files</strong> &#8211; if you encounter functionality issues on the frontend this could the reason. Ensure you update or remove them (in general we recommend only bundling the template files you actually need to customize). See the system report for full details.', 'sportspress' ); ?></p>
<p><?php echo wp_kses_post( __( '<strong>Your theme has bundled outdated copies of SportsPress template files</strong> &#8211; if you encounter functionality issues on the frontend this could the reason. Ensure you update or remove them (in general we recommend only bundling the template files you actually need to customize). See the system report for full details.', 'sportspress' ) ); ?></p>
<p class="submit"><a class="button-primary" href="
<?php
echo esc_url(

View File

@@ -331,13 +331,13 @@ if ( ! class_exists( 'TGM_Plugin_Activation' ) ) {
// Load class strings.
$this->strings = array(
'page_title' => esc_attr__( 'Install Required Plugins', 'tgmpa' ),
'menu_title' => esc_attr__( 'Install Plugins', 'tgmpa' ),
'page_title' => __( 'Install Required Plugins', 'tgmpa' ),
'menu_title' => __( 'Install Plugins', 'tgmpa' ),
/* translators: %s: plugin name. */
'installing' => esc_attr__( 'Installing Plugin: %s', 'tgmpa' ),
'installing' => __( 'Installing Plugin: %s', 'tgmpa' ),
/* translators: %s: plugin name. */
'updating' => esc_attr__( 'Updating Plugin: %s', 'tgmpa' ),
'oops' => esc_attr__( 'Something went wrong with the plugin API.', 'tgmpa' ),
'updating' => __( 'Updating Plugin: %s', 'tgmpa' ),
'oops' => __( 'Something went wrong with the plugin API.', 'tgmpa' ),
'notice_can_install_required' => _n_noop(
/* translators: 1: plugin name(s). */
'This theme requires the following plugin: %1$s.',
@@ -389,19 +389,19 @@ if ( ! class_exists( 'TGM_Plugin_Activation' ) ) {
'Begin activating plugins',
'tgmpa'
),
'return' => esc_attr__( 'Return to Required Plugins Installer', 'tgmpa' ),
'dashboard' => esc_attr__( 'Return to the Dashboard', 'tgmpa' ),
'plugin_activated' => esc_attr__( 'Plugin activated successfully.', 'tgmpa' ),
'activated_successfully' => esc_attr__( 'The following plugin was activated successfully:', 'tgmpa' ),
'return' => __( 'Return to Required Plugins Installer', 'tgmpa' ),
'dashboard' => __( 'Return to the Dashboard', 'tgmpa' ),
'plugin_activated' => __( 'Plugin activated successfully.', 'tgmpa' ),
'activated_successfully' => __( 'The following plugin was activated successfully:', 'tgmpa' ),
/* translators: 1: plugin name. */
'plugin_already_active' => esc_attr__( 'No action taken. Plugin %1$s was already active.', 'tgmpa' ),
'plugin_already_active' => __( 'No action taken. Plugin %1$s was already active.', 'tgmpa' ),
/* translators: 1: plugin name. */
'plugin_needs_higher_version' => esc_attr__( 'Plugin not activated. A higher version of %s is needed for this theme. Please update the plugin.', 'tgmpa' ),
'plugin_needs_higher_version' => __( 'Plugin not activated. A higher version of %s is needed for this theme. Please update the plugin.', 'tgmpa' ),
/* translators: 1: dashboard link. */
'complete' => esc_attr__( 'All plugins installed and activated successfully. %1$s', 'tgmpa' ),
'dismiss' => esc_attr__( 'Dismiss this notice', 'tgmpa' ),
'notice_cannot_install_activate' => esc_attr__( 'There are one or more required or recommended plugins to install, update or activate.', 'tgmpa' ),
'contact_admin' => esc_attr__( 'Please contact the administrator of this site for help.', 'tgmpa' ),
'complete' => __( 'All plugins installed and activated successfully. %1$s', 'tgmpa' ),
'dismiss' => __( 'Dismiss this notice', 'tgmpa' ),
'notice_cannot_install_activate' => __( 'There are one or more required or recommended plugins to install, update or activate.', 'tgmpa' ),
'contact_admin' => __( 'Please contact the administrator of this site for help.', 'tgmpa' ),
);
do_action( 'tgmpa_register' );
@@ -745,7 +745,7 @@ if ( ! class_exists( 'TGM_Plugin_Activation' ) ) {
*/
public function install_plugins_page() {
// Store new instance of plugin table in object.
$plugin_table = new TGMPA_List_Table();
$plugin_table = new TGMPA_List_Table;
// Return early if processing a plugin installation action.
if ( ( ( 'tgmpa-bulk-install' === $plugin_table->current_action() || 'tgmpa-bulk-update' === $plugin_table->current_action() ) && $plugin_table->process_bulk_actions() ) || $this->do_plugin_install() ) {
@@ -947,14 +947,14 @@ if ( ! class_exists( 'TGM_Plugin_Activation' ) ) {
$repo_updates = get_site_transient( 'update_plugins' );
if ( ! is_object( $repo_updates ) ) {
$repo_updates = new stdClass();
$repo_updates = new stdClass;
}
foreach ( $plugins as $slug => $plugin ) {
$file_path = $plugin['file_path'];
if ( empty( $repo_updates->response[ $file_path ] ) ) {
$repo_updates->response[ $file_path ] = new stdClass();
$repo_updates->response[ $file_path ] = new stdClass;
}
// We only really need to set package, but let's do all we can in case WP changes something.
@@ -1024,24 +1024,10 @@ if ( ! class_exists( 'TGM_Plugin_Activation' ) ) {
if ( true === $GLOBALS['wp_filesystem']->move( $from_path, $to_path ) ) {
return trailingslashit( $to_path );
} else {
return new WP_Error(
'rename_failed',
esc_html__( 'The remote plugin package does not contain a folder with the desired slug and renaming did not work.', 'tgmpa' ) . ' ' . esc_html__( 'Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines.', 'tgmpa' ),
array(
'found' => $subdir_name,
'expected' => $desired_slug,
)
);
return new WP_Error( 'rename_failed', esc_html__( 'The remote plugin package does not contain a folder with the desired slug and renaming did not work.', 'tgmpa' ) . ' ' . esc_html__( 'Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines.', 'tgmpa' ), array( 'found' => $subdir_name, 'expected' => $desired_slug ) );
}
} elseif ( empty( $subdir_name ) ) {
return new WP_Error(
'packaged_wrong',
esc_html__( 'The remote plugin package consists of more than one file, but the files are not packaged in a folder.', 'tgmpa' ) . ' ' . esc_html__( 'Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines.', 'tgmpa' ),
array(
'found' => $subdir_name,
'expected' => $desired_slug,
)
);
return new WP_Error( 'packaged_wrong', esc_html__( 'The remote plugin package consists of more than one file, but the files are not packaged in a folder.', 'tgmpa' ) . ' ' . esc_html__( 'Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines.', 'tgmpa' ), array( 'found' => $subdir_name, 'expected' => $desired_slug ) );
}
}
@@ -1662,13 +1648,7 @@ if ( ! class_exists( 'TGM_Plugin_Activation' ) ) {
require_once ABSPATH . 'wp-admin/includes/plugin-install.php';
}
$response = plugins_api(
'plugin_information',
array(
'slug' => $slug,
'fields' => array( 'sections' => false ),
)
);
$response = plugins_api( 'plugin_information', array( 'slug' => $slug, 'fields' => array( 'sections' => false ) ) );
$api[ $slug ] = false;
@@ -2383,10 +2363,10 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
*/
protected function get_plugin_advise_type_text( $required ) {
if ( true === $required ) {
return esc_attr__( 'Required', 'tgmpa' );
return __( 'Required', 'tgmpa' );
}
return esc_attr__( 'Recommended', 'tgmpa' );
return __( 'Recommended', 'tgmpa' );
}
/**
@@ -2402,13 +2382,13 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
switch ( $type ) {
case 'repo':
$string = esc_attr__( 'WordPress Repository', 'tgmpa' );
$string = __( 'WordPress Repository', 'tgmpa' );
break;
case 'external':
$string = esc_attr__( 'External Source', 'tgmpa' );
$string = __( 'External Source', 'tgmpa' );
break;
case 'bundled':
$string = esc_attr__( 'Pre-Packaged', 'tgmpa' );
$string = __( 'Pre-Packaged', 'tgmpa' );
break;
}
@@ -2425,25 +2405,25 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
*/
protected function get_plugin_status_text( $slug ) {
if ( ! $this->tgmpa->is_plugin_installed( $slug ) ) {
return esc_attr__( 'Not Installed', 'tgmpa' );
return __( 'Not Installed', 'tgmpa' );
}
if ( ! $this->tgmpa->is_plugin_active( $slug ) ) {
$install_status = esc_attr__( 'Installed But Not Activated', 'tgmpa' );
$install_status = __( 'Installed But Not Activated', 'tgmpa' );
} else {
$install_status = esc_attr__( 'Active', 'tgmpa' );
$install_status = __( 'Active', 'tgmpa' );
}
$update_status = '';
if ( $this->tgmpa->does_plugin_require_update( $slug ) && false === $this->tgmpa->does_plugin_have_update( $slug ) ) {
$update_status = esc_attr__( 'Required Update not Available', 'tgmpa' );
$update_status = __( 'Required Update not Available', 'tgmpa' );
} elseif ( $this->tgmpa->does_plugin_require_update( $slug ) ) {
$update_status = esc_attr__( 'Requires Update', 'tgmpa' );
$update_status = __( 'Requires Update', 'tgmpa' );
} elseif ( false !== $this->tgmpa->does_plugin_have_update( $slug ) ) {
$update_status = esc_attr__( 'Update recommended', 'tgmpa' );
$update_status = __( 'Update recommended', 'tgmpa' );
}
if ( '' === $update_status ) {
@@ -2600,7 +2580,7 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
}
$output[] = sprintf(
'<p><span style="min-width: 32px; text-align: right; float: right;%1$s">%2$s</span>' . esc_attr__( 'Installed version:', 'tgmpa' ) . '</p>',
'<p><span style="min-width: 32px; text-align: right; float: right;%1$s">%2$s</span>' . __( 'Installed version:', 'tgmpa' ) . '</p>',
$color,
$installed
);
@@ -2608,7 +2588,7 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
if ( ! empty( $item['minimum_version'] ) ) {
$output[] = sprintf(
'<p><span style="min-width: 32px; text-align: right; float: right;">%1$s</span>' . esc_attr__( 'Minimum required version:', 'tgmpa' ) . '</p>',
'<p><span style="min-width: 32px; text-align: right; float: right;">%1$s</span>' . __( 'Minimum required version:', 'tgmpa' ) . '</p>',
$item['minimum_version']
);
}
@@ -2620,7 +2600,7 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
}
$output[] = sprintf(
'<p><span style="min-width: 32px; text-align: right; float: right;%1$s">%2$s</span>' . esc_attr__( 'Available version:', 'tgmpa' ) . '</p>',
'<p><span style="min-width: 32px; text-align: right; float: right;%1$s">%2$s</span>' . __( 'Available version:', 'tgmpa' ) . '</p>',
$color,
$item['available_version']
);
@@ -2657,14 +2637,14 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
public function get_columns() {
$columns = array(
'cb' => '<input type="checkbox" />',
'plugin' => esc_attr__( 'Plugin', 'tgmpa' ),
'source' => esc_attr__( 'Source', 'tgmpa' ),
'type' => esc_attr__( 'Type', 'tgmpa' ),
'plugin' => __( 'Plugin', 'tgmpa' ),
'source' => __( 'Source', 'tgmpa' ),
'type' => __( 'Type', 'tgmpa' ),
);
if ( 'all' === $this->view_context || 'update' === $this->view_context ) {
$columns['version'] = esc_attr__( 'Version', 'tgmpa' );
$columns['status'] = esc_attr__( 'Status', 'tgmpa' );
$columns['version'] = __( 'Version', 'tgmpa' );
$columns['status'] = __( 'Status', 'tgmpa' );
}
return apply_filters( 'tgmpa_table_columns', $columns );
@@ -2713,18 +2693,18 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
// Display the 'Install' action link if the plugin is not yet available.
if ( ! $this->tgmpa->is_plugin_installed( $item['slug'] ) ) {
/* translators: %2$s: plugin name in screen reader markup */
$actions['install'] = esc_attr__( 'Install %2$s', 'tgmpa' );
$actions['install'] = __( 'Install %2$s', 'tgmpa' );
} else {
// Display the 'Update' action link if an update is available and WP complies with plugin minimum.
if ( false !== $this->tgmpa->does_plugin_have_update( $item['slug'] ) && $this->tgmpa->can_plugin_update( $item['slug'] ) ) {
/* translators: %2$s: plugin name in screen reader markup */
$actions['update'] = esc_attr__( 'Update %2$s', 'tgmpa' );
$actions['update'] = __( 'Update %2$s', 'tgmpa' );
}
// Display the 'Activate' action link, but only if the plugin meets the minimum version.
if ( $this->tgmpa->can_plugin_activate( $item['slug'] ) ) {
/* translators: %2$s: plugin name in screen reader markup */
$actions['activate'] = esc_attr__( 'Activate %2$s', 'tgmpa' );
$actions['activate'] = __( 'Activate %2$s', 'tgmpa' );
}
}
@@ -2827,16 +2807,16 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
if ( 'update' !== $this->view_context && 'activate' !== $this->view_context ) {
if ( current_user_can( 'install_plugins' ) ) {
$actions['tgmpa-bulk-install'] = esc_attr__( 'Install', 'tgmpa' );
$actions['tgmpa-bulk-install'] = __( 'Install', 'tgmpa' );
}
}
if ( 'install' !== $this->view_context ) {
if ( current_user_can( 'update_plugins' ) ) {
$actions['tgmpa-bulk-update'] = esc_attr__( 'Update', 'tgmpa' );
$actions['tgmpa-bulk-update'] = __( 'Update', 'tgmpa' );
}
if ( current_user_can( 'activate_plugins' ) ) {
$actions['tgmpa-bulk-activate'] = esc_attr__( 'Activate', 'tgmpa' );
$actions['tgmpa-bulk-activate'] = __( 'Activate', 'tgmpa' );
}
}
@@ -2867,9 +2847,9 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
// Did user actually select any plugins to install/update ?
if ( empty( $_POST['plugin'] ) ) {
if ( 'install' === $install_type ) {
$message = esc_attr__( 'No plugins were selected to be installed. No action taken.', 'tgmpa' );
$message = __( 'No plugins were selected to be installed. No action taken.', 'tgmpa' );
} else {
$message = esc_attr__( 'No plugins were selected to be updated. No action taken.', 'tgmpa' );
$message = __( 'No plugins were selected to be updated. No action taken.', 'tgmpa' );
}
echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
@@ -2910,9 +2890,9 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
// No need to proceed further if we have no plugins to handle.
if ( empty( $plugins_to_install ) ) {
if ( 'install' === $install_type ) {
$message = esc_attr__( 'No plugins are available to be installed at this time.', 'tgmpa' );
$message = __( 'No plugins are available to be installed at this time.', 'tgmpa' );
} else {
$message = esc_attr__( 'No plugins are available to be updated at this time.', 'tgmpa' );
$message = __( 'No plugins are available to be updated at this time.', 'tgmpa' );
}
echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
@@ -3268,8 +3248,8 @@ if ( ! function_exists( 'tgmpa_load_bulk_installer' ) ) {
* @since 2.2.0
*/
public function activate_strings() {
$this->strings['activation_failed'] = esc_attr__( 'Plugin activation failed.', 'tgmpa' );
$this->strings['activation_success'] = esc_attr__( 'Plugin activated successfully.', 'tgmpa' );
$this->strings['activation_failed'] = __( 'Plugin activation failed.', 'tgmpa' );
$this->strings['activation_success'] = __( 'Plugin activated successfully.', 'tgmpa' );
}
/**
@@ -3427,16 +3407,12 @@ if ( ! function_exists( 'tgmpa_load_bulk_installer' ) ) {
* @type array $packages Array of plugin, theme, or core packages to update.
* }
*/
do_action(
'upgrader_process_complete',
$this,
array(
do_action( 'upgrader_process_complete', $this, array(
'action' => 'install', // [TGMPA + ] adjusted.
'type' => 'plugin',
'bulk' => true,
'plugins' => $plugins,
)
);
) );
$this->skin->bulk_footer();
@@ -3612,29 +3588,29 @@ if ( ! function_exists( 'tgmpa_load_bulk_installer' ) ) {
if ( 'update' === $this->options['install_type'] ) {
parent::add_strings();
/* translators: 1: plugin name, 2: action number 3: total number of actions. */
$this->upgrader->strings['skin_before_update_header'] = esc_attr__( 'Updating Plugin %1$s (%2$d/%3$d)', 'tgmpa' );
$this->upgrader->strings['skin_before_update_header'] = __( 'Updating Plugin %1$s (%2$d/%3$d)', 'tgmpa' );
} else {
/* translators: 1: plugin name, 2: error message. */
$this->upgrader->strings['skin_update_failed_error'] = esc_attr__( 'An error occurred while installing %1$s: <strong>%2$s</strong>.', 'tgmpa' );
$this->upgrader->strings['skin_update_failed_error'] = __( 'An error occurred while installing %1$s: <strong>%2$s</strong>.', 'tgmpa' );
/* translators: 1: plugin name. */
$this->upgrader->strings['skin_update_failed'] = esc_attr__( 'The installation of %1$s failed.', 'tgmpa' );
$this->upgrader->strings['skin_update_failed'] = __( 'The installation of %1$s failed.', 'tgmpa' );
if ( $this->tgmpa->is_automatic ) {
// Automatic activation strings.
$this->upgrader->strings['skin_upgrade_start'] = esc_attr__( 'The installation and activation process is starting. This process may take a while on some hosts, so please be patient.', 'tgmpa' );
$this->upgrader->strings['skin_upgrade_start'] = __( 'The installation and activation process is starting. This process may take a while on some hosts, so please be patient.', 'tgmpa' );
/* translators: 1: plugin name. */
$this->upgrader->strings['skin_update_successful'] = esc_attr__( '%1$s installed and activated successfully.', 'tgmpa' ) . ' <a href="#" class="hide-if-no-js" onclick="%2$s"><span>' . esc_html__( 'Show Details', 'tgmpa' ) . '</span><span class="hidden">' . esc_html__( 'Hide Details', 'tgmpa' ) . '</span>.</a>';
$this->upgrader->strings['skin_upgrade_end'] = esc_attr__( 'All installations and activations have been completed.', 'tgmpa' );
$this->upgrader->strings['skin_update_successful'] = __( '%1$s installed and activated successfully.', 'tgmpa' ) . ' <a href="#" class="hide-if-no-js" onclick="%2$s"><span>' . esc_html__( 'Show Details', 'tgmpa' ) . '</span><span class="hidden">' . esc_html__( 'Hide Details', 'tgmpa' ) . '</span>.</a>';
$this->upgrader->strings['skin_upgrade_end'] = __( 'All installations and activations have been completed.', 'tgmpa' );
/* translators: 1: plugin name, 2: action number 3: total number of actions. */
$this->upgrader->strings['skin_before_update_header'] = esc_attr__( 'Installing and Activating Plugin %1$s (%2$d/%3$d)', 'tgmpa' );
$this->upgrader->strings['skin_before_update_header'] = __( 'Installing and Activating Plugin %1$s (%2$d/%3$d)', 'tgmpa' );
} else {
// Default installation strings.
$this->upgrader->strings['skin_upgrade_start'] = esc_attr__( 'The installation process is starting. This process may take a while on some hosts, so please be patient.', 'tgmpa' );
$this->upgrader->strings['skin_upgrade_start'] = __( 'The installation process is starting. This process may take a while on some hosts, so please be patient.', 'tgmpa' );
/* translators: 1: plugin name. */
$this->upgrader->strings['skin_update_successful'] = esc_html__( '%1$s installed successfully.', 'tgmpa' ) . ' <a href="#" class="hide-if-no-js" onclick="%2$s"><span>' . esc_html__( 'Show Details', 'tgmpa' ) . '</span><span class="hidden">' . esc_html__( 'Hide Details', 'tgmpa' ) . '</span>.</a>';
$this->upgrader->strings['skin_upgrade_end'] = esc_attr__( 'All installations have been completed.', 'tgmpa' );
$this->upgrader->strings['skin_upgrade_end'] = __( 'All installations have been completed.', 'tgmpa' );
/* translators: 1: plugin name, 2: action number 3: total number of actions. */
$this->upgrader->strings['skin_before_update_header'] = esc_attr__( 'Installing Plugin %1$s (%2$d/%3$d)', 'tgmpa' );
$this->upgrader->strings['skin_before_update_header'] = __( 'Installing Plugin %1$s (%2$d/%3$d)', 'tgmpa' );
}
}
}

View File

@@ -74,7 +74,7 @@ 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 esc_attr__( 'Birthday: <b>%1$s</b>', 'sportspress' );
return wp_kses_post( __( 'Birthday: <b>%1$s</b>', 'sportspress' ) );
case 'Publish <b>immediately</b>':
return esc_attr__( 'Birthday', 'sportspress' );
case 'M j, Y @ G:i':

View File

@@ -88,16 +88,16 @@ 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', 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 ) );
wp_die( wp_kses_post( __( '<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', 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 ) );
wp_die( wp_kses_post( __( '<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', 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 ) );
wp_die( wp_kses_post( __( '<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;
@@ -125,7 +125,7 @@ if ( ! class_exists( 'SportsPress_Comments_Scheduled_Events' ) ) :
if ( ! $comment_id ) {
// 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 ) );
wp_die( wp_kses_post( __( '<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

@@ -423,7 +423,7 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) :
public function register_importer( $importers = array() ) {
$importers['sp_official_csv'] = array(
'name' => esc_attr__( 'SportsPress Officials (CSV)', 'sportspress' ),
'description' => esc_attr__( 'Import <strong>officials</strong> from a csv file.', 'sportspress' ),
'description' => wp_kses_post( __( 'Import <strong>officials</strong> from a csv file.', 'sportspress' ) ),
'callback' => array( $this, 'officials_importer' ),
);
return $importers;