Yoast\WP\SEO\Content_Type_Visibility\Application

Content_Type_Visibility_Watcher_Actions::clean_new_public_taxonomy()publicYoast 1.0

Update db when a post type is made removed.

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

Хуков нет.

Возвращает

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

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

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

Код Content_Type_Visibility_Watcher_Actions::clean_new_public_taxonomy() Yoast 24.9

public function clean_new_public_taxonomy( $newly_made_non_public_taxonomies ) {
	// See if post types that needs review were removed and update option.
	$needs_review     = $this->options->get( 'new_taxonomies', [] );
	$new_needs_review = \array_diff( $needs_review, $newly_made_non_public_taxonomies );
	if ( \count( $new_needs_review ) !== \count( $needs_review ) ) {
		$this->options->set( 'new_taxonomies', $new_needs_review );
		$this->content_type_dismiss_notifications->maybe_dismiss_notifications( [ 'new_taxonomies' => $new_needs_review ] );
	}
}