| @@ -286,12 +286,8 @@ | ||
| 286 | 286 | if (empty($whitelabel_settings['hide_indexation_control'])) { |
| 287 | 287 | $menu_items['seo_controls'] = ['title' => 'Indexation Control', 'slug_suffix' => '-seo-controls']; |
| 288 | 288 | } |
| 289 | 289 | |
| 290 | - if ($general_options['enable_googleinstantindex'] ?? false) { | |
| 291 | - $menu_items['instant_index'] = ['title' => 'Instant Indexing', 'slug_suffix' => '-instant-index']; | |
| 292 | - } | |
| 293 | - | |
| 294 | 290 | if ($general_options['enable_google_console'] ?? false) { |
| 295 | 291 | $menu_items['google_console'] = ['title' => 'Google Console', 'slug_suffix' => '-google-console']; |
| 296 | 292 | } |
| 297 | 293 | |
| @@ -506,20 +502,8 @@ | ||
| 506 | 502 | 'group' => 'seo' |
| 507 | 503 | ]; |
| 508 | 504 | } |
| 509 | 505 | |
| 510 | - // Instant Indexing - setting now stored in seo_controls (moved from Settings to Indexation Control) | |
| 511 | - $seo_controls = Metasync::get_option('seo_controls'); | |
| 512 | - if ($seo_controls['enable_googleinstantindex'] ?? false) { | |
| 513 | - $menu_items['instant_index'] = [ | |
| 514 | - 'title' => 'Instant Indexing', | |
| 515 | - 'slug_suffix' => '-instant-index', | |
| 516 | - 'callback' => 'create_admin_google_instant_index_page', | |
| 517 | - 'internal_nav' => 'Instant Indexing', | |
| 518 | - 'group' => 'seo' | |
| 519 | - ]; | |
| 520 | - } | |
| 521 | - | |
| 522 | 506 | if ($general_options['enable_google_console'] ?? false) { |
| 523 | 507 | $menu_items['google_console'] = [ |
| 524 | 508 | 'title' => 'Google Console', |
| 525 | 509 | 'slug_suffix' => '-google-console', |
| @@ -833,13 +817,8 @@ | ||
| 833 | 817 | |
| 834 | 818 | // Site Verification (in-page sidebar only in short mode) |
| 835 | 819 | $register_submenu('site_verification', 'Site Verification', 'Site Verification', $menu_capability, $menu_slug . '-search-engine-verify', array($admin, 'create_admin_search_engine_verification_page')); |
| 836 | 820 | |
| 837 | - // Instant Indexing (conditional) | |
| 838 | - if ($seo_controls['enable_googleinstantindex'] ?? false) { | |
| 839 | - $register_submenu('instant_index', 'Instant Indexing', 'Instant Indexing', $menu_capability, $menu_slug . '-instant-index', array($admin, 'create_admin_google_instant_index_page')); | |
| 840 | - } | |
| 841 | - | |
| 842 | 821 | // Google Console (conditional) |
| 843 | 822 | if ($general_options['enable_google_console'] ?? false) { |
| 844 | 823 | $register_submenu('google_console', 'Google Console', 'Google Console', $menu_capability, $menu_slug . '-google-console', array($admin, 'create_admin_google_console_page')); |
| 845 | 824 | } |
| @@ -920,10 +899,10 @@ | ||
| 920 | 899 | // WordPress cannot resolve titles for pages registered under an empty |
| 921 | 900 | // parent, even though those pages remain reachable by URL. Restore the |
| 922 | 901 | // standard admin title format for our registered pages only. |
| 923 | 902 | add_filter('admin_title', function($admin_title, $title) use (&$admin_page_titles) { |
| 924 | - $current_page = isset($_GET['page']) && is_string($_GET['page']) | |
| 925 | - ? sanitize_text_field(wp_unslash($_GET['page'])) | |
| 903 | + $current_page = isset($_GET['page']) && is_string($_GET['page']) // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- read-only page slug for the admin title | |
| 904 | + ? sanitize_text_field(wp_unslash($_GET['page'])) // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- read-only page slug for the admin title | |
| 926 | 905 | : ''; |
| 927 | 906 | |
| 928 | 907 | if (empty($title) && isset($admin_page_titles[$current_page])) { |
| 929 | 908 | $site_title = is_network_admin() || is_user_admin() |
| @@ -931,9 +910,9 @@ | ||
| 931 | 910 | : get_bloginfo('name'); |
| 932 | 911 | |
| 933 | 912 | $admin_title = sprintf( |
| 934 | 913 | /* translators: 1: Admin page title, 2: Site or network title. */ |
| 935 | - __('%1$s ‹ %2$s — WordPress'), | |
| 914 | + __('%1$s ‹ %2$s — WordPress', 'metasync'), | |
| 936 | 915 | $admin_page_titles[$current_page], |
| 937 | 916 | $site_title |
| 938 | 917 | ); |
| 939 | 918 | } |
| @@ -1478,10 +1457,10 @@ | ||
| 1478 | 1457 | |
| 1479 | 1458 | <?php |
| 1480 | 1459 | $page_slug = Metasync_Admin::$page_slug; |
| 1481 | 1460 | $is_plugin_page = ( |
| 1482 | - (isset($_GET['page']) && strpos($_GET['page'], $page_slug) !== false) || | |
| 1483 | - (isset($_GET['page']) && strpos($_GET['page'], 'searchatlas') !== false) | |
| 1461 | + (isset($_GET['page']) && strpos($_GET['page'], $page_slug) !== false) || // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- read-only page check for an inline config script | |
| 1462 | + (isset($_GET['page']) && strpos($_GET['page'], 'searchatlas') !== false) // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- read-only page check for an inline config script | |
| 1484 | 1463 | ); |
| 1485 | 1464 | if ($is_plugin_page): |
| 1486 | 1465 | ?> |
| 1487 | 1466 | <script type="text/javascript"> |