/** * Notify search engines of the updated sitemap. * * @deprecated * @see WPSEO_Sitemaps::ping_search_engines() * * @param string|null $sitemapurl Optional URL to make the ping for. */ function wpseo_ping_search_engines($sitemapurl = null) { WPSEO_Sitemaps::ping_search_engines($sitemapurl); }
/** * After import finished, walk through imported post_types and update info. */ public function status_transition_bulk_finished() { if (!defined('WP_IMPORTING')) { return; } if (empty($this->importing_post_types)) { return; } $options = WPSEO_Options::get_option('wpseo_xml'); $ping_search_engines = false; foreach ($this->importing_post_types as $post_type) { wp_cache_delete('lastpostmodified:gmt:' . $post_type, 'timeinfo'); // #17455. // Just have the cache deleted for nav_menu_item. if ('nav_menu_item' === $post_type) { continue; } $option = sprintf('post_types-%s-not_in_sitemap', $post_type); if (!isset($options[$option]) || $options[$option] === false) { $ping_search_engines = true; } } // Nothing to do. if (false === $ping_search_engines) { return; } if (WP_CACHE) { do_action('wpseo_hit_sitemap_index'); } WPSEO_Sitemaps::ping_search_engines(); }