acf_validate_internal_post_type()
Validates an ACF internal post type.
Хуков нет.
Возвращает
Массив|true|false.
Использование
acf_validate_internal_post_type( $internal_post_type, $post_type_name );
- $internal_post_type(массив) (обязательный)
- The internal post type array.
- $post_type_name(строка) (обязательный)
- The post type name.
Список изменений
| С версии 6.1 | Введена. |
Код acf_validate_internal_post_type() acf validate internal post type ACF 6.4.2
function acf_validate_internal_post_type( $internal_post_type, $post_type_name ) {
$instance = acf_get_internal_post_type_instance( $post_type_name );
if ( ! $instance ) {
return false; // TODO: Should this return an empty array instead?
}
return $instance->validate_post( $internal_post_type );
}