acf_trash_internal_post_type()
Trashes an internal post type.
No Hooks.
Returns
true|false. True if post was trashed.
Usage
acf_trash_internal_post_type( $id, $post_type_name );
- $id(int|string)
- The internal post type ID, key, or name.
- $post_type_name(string)
- The post type being trashed.
Default:''
Changelog
| Since 6.1 | Introduced. |
acf_trash_internal_post_type() acf trash internal post type code ACF 6.8.8
function acf_trash_internal_post_type( $id = 0, $post_type_name = '' ) {
$instance = acf_get_internal_post_type_instance( $post_type_name );
if ( $instance ) {
return $instance->trash_post( $id );
}
return false;
}