post_type, 'timeinfo' ); // #17455. $options = WPSEO_Options::get_options( array( 'wpseo_xml', 'wpseo_titles' ) ); if ( ( isset( $options[ 'post_types-' . $post->post_type . '-not_in_sitemap' ] ) && $options[ 'post_types-' . $post->post_type . '-not_in_sitemap' ] === true ) || ( $post->post_type === 'nav_menu_item' ) ) { return; } if ( WP_CACHE ) { wp_schedule_single_event( ( time() + 300 ), 'wpseo_hit_sitemap_index' ); } /** * Filter: 'wpseo_allow_xml_sitemap_ping' - Check if pinging is not allowed (allowed by default) * * @api boolean $allow_ping The boolean that is set to true by default. */ if ( apply_filters( 'wpseo_allow_xml_sitemap_ping', true ) === false ) { return; } // Allow the pinging to happen slightly after the hit sitemap index so the sitemap is fully regenerated when the ping happens. $excluded_posts = explode( ',', $options['excluded-posts'] ); if ( ! in_array( $post->ID, $excluded_posts ) ) { if ( defined( 'YOAST_SEO_PING_IMMEDIATELY' ) && YOAST_SEO_PING_IMMEDIATELY ) { wpseo_ping_search_engines(); } else { wp_schedule_single_event( ( time() + 300 ), 'wpseo_ping_search_engines' ); } } } } /* End of class */