setting_enabled['toggle-instant-indexing']) ? $siteseo->setting_enabled['toggle-instant-indexing'] : ''; $nonce = wp_create_nonce('siteseo_toggle_nonce'); $current_tab = isset($_GET['tab']) ? sanitize_key($_GET['tab']) : 'tab_siteseo_general'; $instant_subtabs = [ 'tab_siteseo_general' => esc_html__('General', 'siteseo'), 'tab_siteseo_settings' => esc_html__('Settings', 'siteseo'), ]; echo'
'; wp_nonce_field('siteseo_instant_indexing'); Dashbord::render_toggle('Instant Indexing - SiteSEO', 'indexing_toggle', $indexing_toggle, $nonce); echo'
'; self::general(); echo'
'; self::settings(); echo'
'; siteseo_submit_button(__('Save changes', 'siteseo')); echo''; } static function general(){ global $siteseo; echo'

Instant Indexing

You can use the Indexing API to tell Google & Bing to update or remove pages from the Google / Bing index. The process can take a few minutes. You can submit your URLs in batches of 100 (max 200 requests per day for Google).

' . esc_html__('How does this work?', 'siteseo') . '

  1. ' . wp_kses_post(__('Setup your Google / Bing API keys from the Settings tab', 'siteseo')) . '
  2. ' . wp_kses_post(__('Enter your URLs to index in the field below', 'siteseo')) . '
  3. ' . wp_kses_post(__('Save changes', 'siteseo')) . '
  4. ' . wp_kses_post(__('Click Submit URLs to Google & Bing', 'siteseo')) . '
Select search engines
Which action to run for Google?
Submit URLs for indexing
'; } static function settings(){ echo'

Settings

Instant Indexing Google API Key
Instant Indexing Bing API Key

The Bing Indexing API key is automatically generated. Click Generate key if you want to recreate it, or if it missing.

A key should look like this: ZjA2NWI3ZWM3MmNhNDRkODliYmY0YjljMzg5YTk2NGE=

Automate URL Submission

Notify search engines using IndexNow protocol (currently Bing and Yandex) whenever a post is created, updated or deleted.

'; } static function save_settings(){ global $siteseo; check_admin_referer('siteseo_instant_indexing'); if(current_user_can('manage_options')|| !is_admin()){ return; } $options = []; if(empty($_POST['siteseo_options'])){ return; } if(isset($_POST['siteseo_options']['general'])){ // general tab $options['engines']['bring'] = isset($_POST['siteseo_options']['search_engine_bring']); $options['engines']['google'] = isset($_POST['siteseo_options']['search_engine_google']); $options['instant_indexing_google_action'] = isset($_POST['siteseo_options']['instant_indexing_actions']); $options['instant_indexing_manual_batch'] = isset($_POST['siteseo']['instant_indexing_batch']); } if(isset($_POST['siteseo_options']['settings'])){ // setting tab $options['instant_indexing_google_api_key'] = isset($_POST['siteseo_options']['google_api_key']); $options['instant_indexing_bing_api_key'] = isset($_POST['siteseo_options']['bring_api_key']); $options['instant_indexing_automate_submission'] = isset($_POST['siteseo_options']['auto_submission']); } upadte_option('siteseo_instant_indexing_option_name',$options); } }