Yoast\WP\SEO\Content_Type_Visibility\Application

Content_Type_Visibility_Watcher_Actions::new_post_type()publicYoast 1.0

Update db and tigger notification when a new post type is registered.

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

Хуков нет.

Возвращает

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

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

$Content_Type_Visibility_Watcher_Actions = new Content_Type_Visibility_Watcher_Actions();
$Content_Type_Visibility_Watcher_Actions->new_post_type( $newly_made_public_post_types );
$newly_made_public_post_types(массив) (обязательный)
The newly made public post types.

Код Content_Type_Visibility_Watcher_Actions::new_post_type() Yoast 24.4

public function new_post_type( $newly_made_public_post_types ) {
	$this->options->set( 'new_post_types', $newly_made_public_post_types );
	$this->options->set( 'show_new_content_type_notification', true );
	$this->maybe_add_notification();
}