Escapes based on phpcs #6
This commit is contained in:
@@ -41,10 +41,10 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
*/
|
||||
public function output() {
|
||||
?>
|
||||
<h3><?php _e( 'System Status', 'sportspress' ); ?></h3>
|
||||
<h3><?php esc_html_e( 'System Status', 'sportspress' ); ?></h3>
|
||||
<div class="updated sportspress-message">
|
||||
<p><?php _e( 'Please include this information when requesting support:', 'sportspress' ); ?> </p>
|
||||
<p class="submit"><a href="#" class="button-primary debug-report"><?php _e( 'Get System Report', 'sportspress' ); ?></a></p>
|
||||
<p><?php esc_html_e( 'Please include this information when requesting support:', 'sportspress' ); ?> </p>
|
||||
<p class="submit"><a href="#" class="button-primary debug-report"><?php esc_html_e( 'Get System Report', 'sportspress' ); ?></a></p>
|
||||
<div id="debug-report"><textarea readonly="readonly"></textarea></div>
|
||||
</div>
|
||||
<br/>
|
||||
@@ -52,45 +52,45 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php _e( 'Environment', 'sportspress' ); ?></th>
|
||||
<th colspan="2"><?php esc_html_e( 'Environment', 'sportspress' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?php _e( 'Home URL', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo home_url(); ?></td>
|
||||
<td><?php esc_html_e( 'Home URL', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo esc_url( home_url() ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Site URL', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo site_url(); ?></td>
|
||||
<td><?php esc_html_e( 'Site URL', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo esc_url( site_url() ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'SP Version', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_html_e( 'SP Version', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo esc_html( SP()->version ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'WP Version', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_html_e( 'WP Version', 'sportspress' ); ?>:</td>
|
||||
<td><?php bloginfo( 'version' ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'WP Multisite Enabled', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_html_e( 'WP Multisite Enabled', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
if ( is_multisite() ) {
|
||||
_e( 'Yes', 'sportspress' );
|
||||
esc_html_e( 'Yes', 'sportspress' );
|
||||
} else {
|
||||
_e( 'No', 'sportspress' );
|
||||
esc_html_e( 'No', 'sportspress' );
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Web Server Info', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_html_e( 'Web Server Info', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo esc_html( $_SERVER['SERVER_SOFTWARE'] ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'PHP Version', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_html_e( 'PHP Version', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
if ( function_exists( 'phpversion' ) ) {
|
||||
@@ -99,74 +99,74 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'WP Memory Limit', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_html_e( 'WP Memory Limit', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$memory = sp_let_to_num( WP_MEMORY_LIMIT );
|
||||
|
||||
if ( $memory < 67108864 ) {
|
||||
echo '<mark class="error">' . sprintf( __( '%1$s - We recommend setting memory to at least 64MB. See: <a href="%2$s">Increasing memory allocated to PHP</a>', 'sportspress' ), size_format( $memory ), 'http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP' ) . '</mark>';
|
||||
echo '<mark class="error">' . sprintf( esc_html__( '%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">' . size_format( $memory ) . '</mark>';
|
||||
echo '<mark class="yes">' . esc_html( size_format( $memory ) ) . '</mark>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'WP Debug Mode', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_html_e( 'WP Debug Mode', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
|
||||
echo '<mark class="yes">' . __( 'Yes', 'sportspress' ) . '</mark>';
|
||||
echo '<mark class="yes">' . esc_html__( 'Yes', 'sportspress' ) . '</mark>';
|
||||
} else {
|
||||
echo '<mark class="no">' . __( 'No', 'sportspress' ) . '</mark>';
|
||||
echo '<mark class="no">' . esc_html__( 'No', 'sportspress' ) . '</mark>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'WP Language', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_html_e( 'WP Language', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
if ( defined( 'WPLANG' ) && WPLANG ) {
|
||||
echo WPLANG;
|
||||
echo esc_html( WPLANG );
|
||||
} else {
|
||||
_e( 'Default', 'sportspress' );
|
||||
esc_html_e( 'Default', 'sportspress' );
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'WP Max Upload Size', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo size_format( wp_max_upload_size() ); ?></td>
|
||||
<td><?php esc_html_e( 'WP Max Upload Size', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo esc_html( size_format( wp_max_upload_size() ) ); ?></td>
|
||||
</tr>
|
||||
<?php if ( function_exists( 'ini_get' ) ) : ?>
|
||||
<tr>
|
||||
<td><?php _e( 'PHP Post Max Size', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo size_format( sp_let_to_num( ini_get( 'post_max_size' ) ) ); ?></td>
|
||||
<td><?php esc_html_e( 'PHP Post Max Size', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo esc_html( size_format( sp_let_to_num( ini_get( 'post_max_size' ) ) ) ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'PHP Time Limit', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo ini_get( 'max_execution_time' ); ?></td>
|
||||
<td><?php esc_html_e( 'PHP Time Limit', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo esc_html( ini_get( 'max_execution_time' ) ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'PHP Max Input Vars', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo ini_get( 'max_input_vars' ); ?></td>
|
||||
<td><?php esc_html_e( 'PHP Max Input Vars', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo esc_html( ini_get( 'max_input_vars' ) ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'SUHOSIN Installed', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo extension_loaded( 'suhosin' ) ? __( 'Yes', 'sportspress' ) : __( 'No', 'sportspress' ); ?></td>
|
||||
<td><?php esc_html_e( 'SUHOSIN Installed', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo extension_loaded( 'suhosin' ) ? esc_html__( 'Yes', 'sportspress' ) : esc_html__( 'No', 'sportspress' ); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<tr>
|
||||
<td><?php _e( 'Default Timezone', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_html_e( 'Default Timezone', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$default_timezone = date_default_timezone_get();
|
||||
if ( 'UTC' !== $default_timezone ) {
|
||||
echo '<mark class="error">' . sprintf( __( 'Default timezone is %s - it should be UTC', 'sportspress' ), $default_timezone ) . '</mark>';
|
||||
echo '<mark class="error">' . sprintf( esc_html__( 'Default timezone is %s - it should be UTC', 'sportspress' ), $default_timezone ) . '</mark>';
|
||||
} else {
|
||||
echo '<mark class="yes">' . sprintf( __( 'Default timezone is %s', 'sportspress' ), $default_timezone ) . '</mark>';
|
||||
echo '<mark class="yes">' . sprintf( esc_html__( 'Default timezone is %s', 'sportspress' ), $default_timezone ) . '</mark>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
@@ -208,7 +208,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
<tr>
|
||||
<td><?php echo esc_html( $post['name'] ); ?>:</td>
|
||||
<td>
|
||||
<mark class="<?php echo $mark; ?>">
|
||||
<mark class="<?php echo esc_attr( $mark ); ?>">
|
||||
<?php echo wp_kses_data( $post['note'] ); ?>
|
||||
</mark>
|
||||
</td>
|
||||
@@ -220,13 +220,13 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php _e( 'Plugins', 'sportspress' ); ?></th>
|
||||
<th colspan="2"><?php esc_html_e( 'Plugins', 'sportspress' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?php _e( 'Installed Plugins', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_html_e( 'Installed Plugins', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$active_plugins = (array) get_option( 'active_plugins', array() );
|
||||
@@ -299,17 +299,17 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php _e( 'SP Configuration', 'sportspress' ); ?></th>
|
||||
<th colspan="2"><?php esc_html_e( 'SP Configuration', 'sportspress' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?php _e( 'Sport', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_html_e( 'Sport', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo get_option( 'sportspress_sport', __( 'None', 'sportspress' ) ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Event Outcomes', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_html_e( 'Event Outcomes', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_posts = array();
|
||||
@@ -330,7 +330,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Event Results', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_html_e( 'Event Results', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_posts = array();
|
||||
@@ -351,7 +351,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Player Performance', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_html_e( 'Player Performance', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_posts = array();
|
||||
@@ -372,7 +372,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Table Columns', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_html_e( 'Table Columns', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_posts = array();
|
||||
@@ -394,7 +394,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Player Metrics', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_html_e( 'Player Metrics', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_posts = array();
|
||||
@@ -415,7 +415,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Player Statistics', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_html_e( 'Player Statistics', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_posts = array();
|
||||
@@ -439,13 +439,13 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php _e( 'SP Taxonomies', 'sportspress' ); ?></th>
|
||||
<th colspan="2"><?php esc_html_e( 'SP Taxonomies', 'sportspress' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?php _e( 'Leagues', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_html_e( 'Leagues', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_terms = array();
|
||||
@@ -458,7 +458,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Seasons', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_html_e( 'Seasons', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_terms = array();
|
||||
@@ -471,7 +471,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Venues', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_html_e( 'Venues', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_terms = array();
|
||||
@@ -484,7 +484,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Positions', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_html_e( 'Positions', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_terms = array();
|
||||
@@ -500,7 +500,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php _e( 'SP Post Types', 'sportspress' ); ?></th>
|
||||
<th colspan="2"><?php esc_html_e( 'SP Post Types', 'sportspress' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -519,7 +519,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
</td>
|
||||
<td>
|
||||
<?php $count = wp_count_posts( $post_type ); ?>
|
||||
<?php echo $count->publish; ?> publish, <?php echo $count->future; ?> future, <?php echo $count->draft; ?> draft, <?php echo $count->private; ?> private, <?php echo $count->trash; ?> trash, <?php echo $count->{'auto-draft'}; ?> auto-draft, <?php echo $count->inherit; ?> inherit
|
||||
<?php echo esc_html( $count->publish ); ?> publish, <?php echo esc_html( $count->future ); ?> future, <?php echo esc_html( $count->draft ); ?> draft, <?php echo esc_html( $count->private ); ?> private, <?php echo esc_html( $count->trash ); ?> trash, <?php echo esc_html( $count->{'auto-draft'} ); ?> auto-draft, <?php echo esc_html( $count->inherit ); ?> inherit
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
@@ -527,7 +527,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php _e( 'Theme', 'sportspress' ); ?></th>
|
||||
<th colspan="2"><?php esc_html_e( 'Theme', 'sportspress' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -569,7 +569,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
?>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?php _e( 'Theme Name', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_html_e( 'Theme Name', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
echo esc_html( $active_theme->Name );
|
||||
@@ -577,19 +577,19 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Theme Version', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_html_e( 'Theme Version', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
echo esc_html( $active_theme->Version );
|
||||
|
||||
if ( ! empty( $theme_version_data['version'] ) && version_compare( $theme_version_data['version'], $active_theme->Version, '!=' ) ) {
|
||||
echo ' – <strong style="color:red;">' . $theme_version_data['version'] . ' ' . __( 'is available', 'sportspress' ) . '</strong>';
|
||||
echo ' – <strong style="color:red;">' . esc_html( $theme_version_data['version'] ) . ' ' . esc_html__( 'is available', 'sportspress' ) . '</strong>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Author URL', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_html_e( 'Author URL', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
echo esc_url( $active_theme->{'Author URI'} );
|
||||
@@ -600,7 +600,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php _e( 'Templates', 'sportspress' ); ?></th>
|
||||
<th colspan="2"><?php esc_html_e( 'Templates', 'sportspress' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -647,14 +647,14 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) :
|
||||
if ( $found_files ) {
|
||||
foreach ( $found_files as $plugin_name => $found_plugin_files ) {
|
||||
?>
|
||||
<td><?php _e( 'Template Overrides', 'sportspress' ); ?> (<?php echo wp_kses_post( $plugin_name ); ?>):</td>
|
||||
<td><?php esc_html_e( 'Template Overrides', 'sportspress' ); ?> (<?php echo wp_kses_post( $plugin_name ); ?>):</td>
|
||||
<td><?php echo implode( ', <br/>', array_map( 'wp_kses_post', $found_plugin_files ) ); ?></td>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
?>
|
||||
<td><?php _e( 'Template Overrides', 'sportspress' ); ?>:</td>
|
||||
<td><?php _e( 'No overrides present in theme.', 'sportspress' ); ?></td>
|
||||
<td><?php esc_html_e( 'Template Overrides', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_html_e( 'No overrides present in theme.', 'sportspress' ); ?></td>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user