PluginProbe
Powered Cache – Caching and Optimization for WordPress – Easily Improve PageSpeed & Web Vitals Score / 2.0
Powered Cache – Caching and Optimization for WordPress – Easily Improve PageSpeed & Web Vitals Score v2.0
trunk 1.0 1.0.1 1.1 1.1.1 1.1.2 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 2.0 2.0.1 2.0.2 2.0.3 2.0.4 2.1 2.1.1 2.1.2 2.2 2.2.1 All 69 releases
← All changes | includes/classes/ObjectCache.php +3 -10 trunk2.0 View file →
@@ -89,31 +89,24 @@
89 89 *
90 90 * @since 1.0
91 91 */
92 92 public function purge_object_cache() {
93 - $nonce = isset( $_GET['_wpnonce'] ) ? sanitize_text_field( wp_unslash( $_GET['_wpnonce'] ) ) : '';
94 - if ( ! wp_verify_nonce( $nonce, 'powered_cache_purge_object_cache' ) ) {
93 + if ( ! wp_verify_nonce( $_GET['_wpnonce'], 'powered_cache_purge_object_cache' ) ) {
95 94 wp_nonce_ays( '' );
96 95 }
97 96
98 97 if ( is_multisite() && ! current_user_can( 'manage_network' ) ) {
99 98 $redirect_url = add_query_arg( 'pc_action', 'flush_object_cache_err_permission', wp_get_referer() );
100 - wp_safe_redirect( esc_url_raw( $redirect_url ) );
99 + wp_safe_redirect( $redirect_url );
101 100 exit;
102 101 }
103 102
104 - if ( ! current_user_can( 'manage_options' ) ) {
105 - $redirect_url = add_query_arg( 'pc_action', 'flush_object_cache_err_permission', wp_get_referer() );
106 - wp_safe_redirect( esc_url_raw( $redirect_url ) );
107 - exit;
108 - }
109 -
110 103 if ( function_exists( 'wp_cache_flush' ) ) {
111 104 wp_cache_flush();
112 105 }
113 106
114 107 $redirect_url = add_query_arg( 'pc_action', 'flush_object_cache', wp_get_referer() );
115 - wp_safe_redirect( esc_url_raw( $redirect_url ) );
108 + wp_safe_redirect( $redirect_url );
116 109 exit;
117 110 }
118 111
119 112