Yoast\WP\SEO\Bulk_Editor\User_Interface
Posts_Route::is_valid_content_type
Checks whether the given content type is one the bulk editor can edit.
Метод класса: Posts_Route{}
Хуков нет.
Возвращает
true|false. Whether the content type is editable.
Использование
// private - только в коде основоного (родительского) класса $result = $this->is_valid_content_type( $content_type ): bool;
- $content_type(строка) (обязательный)
- The content type to check.
Код Posts_Route::is_valid_content_type() Posts Route::is valid content type Yoast 28.3
private function is_valid_content_type( string $content_type ): bool {
foreach ( $this->content_types_repository->get_content_types() as $editable ) {
if ( $editable['name'] === $content_type ) {
return true;
}
}
return false;
}