';
foreach($instant_subtabs as $tab_key => $tab_caption){
$active_class = ($current_tab === $tab_key) ? ' nav-tab-active' : '';
echo'
' . esc_html($tab_caption) . '';
}
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') . '
- ' . wp_kses_post(__('Setup your Google / Bing API keys from the Settings tab', 'siteseo')) . '
- ' . wp_kses_post(__('Enter your URLs to index in the field below', 'siteseo')) . '
- ' . wp_kses_post(__('Save changes', 'siteseo')) . '
- ' . wp_kses_post(__('Click Submit URLs to Google & Bing', 'siteseo')) . '
';
}
static function settings(){
echo'
Settings
';
}
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);
}
}