Yoast\WP\SEO\Exceptions\Indexable

Post_Not_Built_Exception::because_post_type_excluded()public staticYoast 1.0

Throws an exception if the post type is excluded from indexing.

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

Хуков нет.

Возвращает

null. Ничего.

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

$result = Post_Not_Built_Exception::because_post_type_excluded( $post_id );
$post_id(int) (обязательный)
ID of the post.

Код Post_Not_Built_Exception::because_post_type_excluded() Yoast 20.0

public static function because_post_type_excluded( $post_id ) {
	/* translators: %s: expands to the post id */
	return new Post_Not_Built_Exception( \sprintf( \__( 'The post %s could not be indexed because it\'s post type is excluded from indexing.', 'wordpress-seo' ), $post_id ) );
}