WPSEO_Post_Type_Sitemap_Provider::save_post()publicYoast 1.0

Check for relevant post type before invalidation.

Метод класса: WPSEO_Post_Type_Sitemap_Provider{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$WPSEO_Post_Type_Sitemap_Provider = new WPSEO_Post_Type_Sitemap_Provider();
$WPSEO_Post_Type_Sitemap_Provider->save_post( $post_id );
$post_id(int) (обязательный)
Post ID to possibly invalidate for.

Код WPSEO_Post_Type_Sitemap_Provider::save_post() Yoast 22.4

public function save_post( $post_id ) {

	if ( $this->is_valid_post_type( get_post_type( $post_id ) ) ) {
		WPSEO_Sitemaps_Cache::invalidate_post( $post_id );
	}
}