You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: use fileperms() instead of stat() and fix escaping (#1023)
* fix: use fileperms() instead of stat() and fix escaping
* fix: address PHPCS escaping and placeholder errors
* fix: put PHP tags on their own lines per PHPCS
---------
Co-authored-by: Saša Todorović <15647032+stodorovic@users.noreply.github.com>
<p><?phpprintf( __( 'You should change the permissions on %s and make it more restrictive. Use your ftp client, or the following command to fix things:', 'wp-super-cache' ), WP_CONTENT_DIR ); ?> <code>chmod 755 <?phpechoWP_CONTENT_DIR; ?>/</code></p>
@@ -669,13 +668,23 @@ function wp_cache_manager_error_checks() {
669
668
)
670
669
) {
671
670
?>
672
-
<div class="notice notice-warning"><h4><?php_e( 'Rewrite rules must be updated', 'wp-super-cache' ); ?></h4>
673
-
<p><?php_e( 'The rewrite rules required by this plugin have changed or are missing. ', 'wp-super-cache' ); ?>
674
-
<?php_e( 'Mobile support requires extra rules in your .htaccess file, or you can set the plugin to simple mode. Here are your options (in order of difficulty):', 'wp-super-cache' ); ?>
675
-
<ol><li> <?php_e( 'Set the plugin to simple mode and enable mobile support.', 'wp-super-cache' ); ?></li>
671
+
<div class="notice notice-warning"><h4><?phpesc_html_e( 'Rewrite rules must be updated', 'wp-super-cache' ); ?></h4>
672
+
<p><?phpesc_html_e( 'The rewrite rules required by this plugin have changed or are missing. ', 'wp-super-cache' ); ?>
673
+
<?phpesc_html_e( 'Mobile support requires extra rules in your .htaccess file, or you can set the plugin to simple mode. Here are your options (in order of difficulty):', 'wp-super-cache' ); ?></p>
674
+
<ol><li> <?phpesc_html_e( 'Set the plugin to simple mode and enable mobile support.', 'wp-super-cache' ); ?></li>
676
675
<li> <?php_e( 'Scroll down the Advanced Settings page and click the <strong>Update Mod_Rewrite Rules</strong> button.', 'wp-super-cache' ); ?></li>
677
-
<li> <?phpprintf( __( 'Delete the plugin mod_rewrite rules in %s.htaccess enclosed by <code># BEGIN WPSuperCache</code> and <code># END WPSuperCache</code> and let the plugin regenerate them by reloading this page.', 'wp-super-cache' ), $home_path ); ?></li>
678
-
<li> <?phpprintf( __( 'Add the rules yourself. Edit %s.htaccess and find the block of code enclosed by the lines <code># BEGIN WPSuperCache</code> and <code># END WPSuperCache</code>. There are two sections that look very similar. Just below the line <code>%%{HTTP:Cookie} !^.*(comment_author_|%s|wp-postpass_).*$</code> add these lines: (do it twice, once for each section)', 'wp-super-cache' ), $home_path, wpsc_get_logged_in_cookie() ); ?></p>
676
+
<li>
677
+
<?php
678
+
// translators: %s is the path to the .htaccess file.
679
+
printf( wp_kses( __( 'Delete the plugin mod_rewrite rules in %s.htaccess enclosed by <code># BEGIN WPSuperCache</code> and <code># END WPSuperCache</code> and let the plugin regenerate them by reloading this page.', 'wp-super-cache' ), array( 'code' => array() ) ), esc_html( $home_path ) );
680
+
?>
681
+
</li>
682
+
<li>
683
+
<?php
684
+
// translators: %1$s is the path to the .htaccess file, %2$s is the logged-in cookie name.
685
+
printf( wp_kses( __( 'Add the rules yourself. Edit %1$s.htaccess and find the block of code enclosed by the lines <code># BEGIN WPSuperCache</code> and <code># END WPSuperCache</code>. There are two sections that look very similar. Just below the line <code>%%{HTTP:Cookie} !^.*(comment_author_|%2$s|wp-postpass_).*$</code> add these lines: (do it twice, once for each section)', 'wp-super-cache' ), array( 'code' => array() ) ), esc_html( $home_path ), esc_html( wpsc_get_logged_in_cookie() ) );
0 commit comments