WordPress 7.1.3

This commit is contained in:
2026-10-06 18:59:45 -06:00
parent e2c26b7f21
commit 5c09d6fa68
51 changed files with 1111 additions and 825 deletions
@@ -89,7 +89,7 @@ class SEO_Analyzer {
$this->analyse_url = home_url();
$this->action( 'init', 'set_url' );
$this->maybe_clear_storage();
$this->action( 'admin_init', 'maybe_clear_storage' );
$this->ajax( 'analyze', 'analyze_me' );
$this->ajax( 'enable_auto_update', 'enable_auto_update' );
@@ -235,13 +235,22 @@ class SEO_Analyzer {
/**
* Clear stored results if needed.
*/
private function maybe_clear_storage() {
if ( '1' === Param::request( 'clear_results' ) ) {
delete_option( 'rank_math_seo_analysis_results' );
delete_option( 'rank_math_seo_analysis_date' );
Helper::redirect( Security::remove_query_arg_raw( 'clear_results' ) );
exit;
public function maybe_clear_storage() {
if ( '1' !== Param::request( 'clear_results' ) ) {
return;
}
if (
! Helper::has_cap( 'site_analysis' ) ||
! wp_verify_nonce( Param::request( 'security' ), 'rank-math-ajax-nonce' )
) {
return;
}
delete_option( 'rank_math_seo_analysis_results' );
delete_option( 'rank_math_seo_analysis_date' );
Helper::redirect( Security::remove_query_arg_raw( [ 'clear_results', 'security' ] ) );
exit;
}
/**