oes not delete ANY data added using Rank Math.', 'seo-by-rank-math' ), 'button_text' => __( 'Remove transients', 'seo-by-rank-math' ), ]; if ( Helper::is_module_active( '404-monitor' ) ) { $tools['delete_log'] = [ 'title' => __( 'Clear 404 Log', 'seo-by-rank-math' ), 'description' => __( 'Is the 404 error log getting out of hand? Use this option to clear ALL 404 logs generated by your website in the Rank Math 404 Monitor.', 'seo-by-rank-math' ), 'confirm_text' => __( 'Are you sure you want to delete the 404 log? This action is irreversible.', 'seo-by-rank-math' ), 'button_text' => __( 'Clear 404 Log', 'seo-by-rank-math' ), ]; } $tools['recreate_tables'] = [ 'title' => __( 'Re-create Missing Database Tables', 'seo-by-rank-math' ), 'description' => __( 'Check if required tables exist and create them if not.', 'seo-by-rank-math' ), 'button_text' => __( 'Re-create Tables', 'seo-by-rank-math' ), ]; if ( Helper::is_module_active( 'analytics' ) ) { $tools['analytics_fix_collations'] = [ 'title' => __( 'Fix Analytics table collations', 'seo-by-rank-math' ), 'description' => __( 'In some cases, the Analytics database tables or columns don\'t match with each other, which can cause database errors. This tool can fix that issue.', 'seo-by-rank-math' ), 'button_text' => __( 'Fix Collations', 'seo-by-rank-math' ), ]; } $block_posts = Yoast_Blocks::get()->find_posts(); if ( is_array( $block_posts ) && ! empty( $block_posts['count'] ) ) { $tools['yoast_blocks'] = [ 'title' => __( 'Yoast Block Converter', 'seo-by-rank-math' ), 'description' => __( 'Convert FAQ, HowTo, & Table of Contents Blocks created using Yoast. Use this option to easily move your previous blocks into Rank Math.', 'seo-by-rank-math' ), 'confirm_text' => __( 'Are you sure you want to convert Yoast blocks into Rank Math blocks? This action is irreversible.', 'seo-by-rank-math' ), 'button_text' => __( 'Convert Blocks', 'seo-by-rank-math' ), ]; } $aio_block_posts = AIOSEO_Blocks::get()->find_posts(); if ( is_array( $aio_block_posts ) && ! empty( $aio_block_posts['count'] ) ) { $tools['aioseo_blocks'] = [ 'title' => __( 'AIOSEO Block Converter', 'seo-by-rank-math' ), 'description' => __( 'Convert TOC block created using AIOSEO. Use this option to easily move your previous blocks into Rank Math.', 'seo-by-rank-math' ), 'confirm_text' => __( 'Are you sure you want to convert AIOSEO blocks into Rank Math blocks? This action is irreversible.', 'seo-by-rank-math' ), 'button_text' => __( 'Convert Blocks', 'seo-by-rank-math' ), ]; } if ( Helper::is_module_active( 'link-counter' ) ) { $tools['delete_links'] = [ 'title' => __( 'Delete Internal Links Data', 'seo-by-rank-math' ), 'description' => __( 'In some instances, the internal links data might show an inflated number or no number at all. Deleting the internal links data might fix the issue.', 'seo-by-rank-math' ), 'confirm_text' => __( 'Are you sure you want to delete Internal Links Data? This action is irreversible.', 'seo-by-rank-math' ), 'button_text' => __( 'Delete Internal Links', 'seo-by-rank-math' ), ]; } if ( Helper::is_module_active( 'redirections' ) ) { $tools['delete_redirections'] = [ 'title' => __( 'Delete Redirections Rules', 'seo-by-rank-math' ), 'description' => __( 'Getting a redirection loop or need a fresh start? Delete all the redirections using this tool. Note: This process is irreversible and will delete ALL your redirection rules.', 'seo-by-rank-math' ), 'confirm_text' => __( 'Are you sure you want to delete all the Redirection Rules? This action is irreversible.', 'seo-by-rank-math' ), 'button_text' => __( 'Delete Redirections', 'seo-by-rank-math' ), ]; } if ( ! empty( Update_Score::get()->find() ) ) { $tools['update_seo_score'] = [ 'title' => __( 'Update SEO Scores', 'seo-by-rank-math' ), 'description' => __( 'This tool will calculate the SEO score for 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; } }