acf_is_internal_post_type()
Returns true if the given params match an ACF post.
Хуков нет.
Возвращает
true|false.
Использование
acf_is_internal_post_type( $post, $post_type );
- $post(массив) (обязательный)
- The ACF post array.
- $post_type(строка) (обязательный)
- The ACF post type.
Список изменений
| С версии 6.1 | Введена. |
Код acf_is_internal_post_type() acf is internal post type ACF 6.4.2
function acf_is_internal_post_type( $post, $post_type ) {
$instance = acf_get_internal_post_type_instance( $post_type );
if ( $instance ) {
return $instance->is_post( $post );
}
return false;
}