функция
since 3.0.0
is_post_type_hierarchical()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
is_post_type_hierarchical( string $post_type ): bool
Описание
Возвращаемое значение false также может означать, что тип записи не существует.
См. alsoget_post_type_object()
Оригинал (английский)
A false return value might also mean that the post type does not exist.
Параметры
$post_type
string
обязательный
Имя типа записи
Возвращаемое значение
bool
Исходный код
wp-includes/post.php:1561
function is_post_type_hierarchical( $post_type ) {
if ( ! post_type_exists( $post_type ) ) {
return false;
}
$post_type = get_post_type_object( $post_type );
return $post_type->hierarchical;
}
История изменений
| Версия | Описание |
|---|---|
| 3.0.0 | Introduced. |

