or the posts/pages that have a Focus Keyword set. Note: This process may take some time and the browser tab must be kept open while it is running.', 'seo-by-rank-math' ), 'button_text' => __( 'Recalculate Scores', 'seo-by-rank-math' ), ]; } if ( Helper::is_module_active( 'analytics' ) && Helper::has_cap( 'analytics' ) ) { Arr::insert( $tools, [ 'analytics_clear_caches' => [ 'title' => __( 'Purge Analytics Cache', 'seo-by-rank-math' ), 'description' => __( 'Clear analytics cache to re-calculate all the stats again.', 'seo-by-rank-math' ), 'button_text' => __( 'Clear Cache', 'seo-by-rank-math' ), ], ], 3 ); $description = __( 'Missing some posts/pages in the Analytics data? Clear the index and build a new one for more accurate stats.', 'seo-by-rank-math' ); $sitepress = Sitepress::get()->is_active() ? Sitepress::get()->get_var() : false; if ( Sitepress::get()->is_per_domain() && ! empty( $sitepress->get_setting( 'auto_adjust_ids', null ) ) ) { $description .= '

' . sprintf( /* translators: 1: settings URL, 2: settings text */ __( 'To properly rebuild Analytics posts in secondary languages, please disable the %1$s when using a different domain per language.', 'seo-by-rank-math' ), '' . __( 'Make themes work multilingual option in WPML settings', 'seo-by-rank-math' ) . '' ) . ''; } Arr::insert( $tools, [ 'analytics_reindex_posts' => [ 'title' => __( 'Rebuild Index for Analytics', 'seo-by-rank-math' ), 'description' => $description, 'button_text' => __( 'Rebuild Index', 'seo-by-rank-math' ), ], ], 3 ); } /** * Filters the list of tools available on the Database Tools page. * * @param array $tools The tools. */ $tools = apply_filters( 'rank_math/database/tools', $tools ); return $tools; } }