wpseek.com
WordPress开发者和主题制作者的搜索引擎
wp_sitemaps_get_server › WordPress Function
Since5.5.0
已弃用n/a
› wp_sitemaps_get_server ( 没有参数 )
返回: |
|
定义在: |
|
文档: |
Retrieves the current Sitemaps server instance.
Related Functions: wp_sitemaps_get_max_urls, rest_get_server, wp_get_referer, wp_scripts_get_suffix, wp_get_server_protocol
源码
function wp_sitemaps_get_server() { global $wp_sitemaps; // If there isn't a global instance, set and bootstrap the sitemaps system. if ( empty( $wp_sitemaps ) ) { $wp_sitemaps = new WP_Sitemaps(); $wp_sitemaps->init(); /** * Fires when initializing the Sitemaps object. * * Additional sitemaps should be registered on this hook. * * @since 5.5.0 * * @param WP_Sitemaps $wp_sitemaps Sitemaps object. */ do_action( 'wp_sitemaps_init', $wp_sitemaps ); } return $wp_sitemaps; }