acf_is_internal_post_type()
Returns true if the given params match an ACF post.
No Hooks.
Returns
true|false.
Usage
acf_is_internal_post_type( $post, $post_type );
- $post(array) (required)
- The ACF post array.
- $post_type(string) (required)
- The ACF post type.
Changelog
| Since 6.1 | Introduced. |
acf_is_internal_post_type() acf is internal post type code ACF 6.8.8
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;
}