acf_trash_internal_post_type()
Trashes an internal post type.
Хуков нет.
Возвращает
true|false. True if post was trashed.
Использование
acf_trash_internal_post_type( $id, $post_type_name );
- $id(int|строка)
- The internal post type ID, key, or name.
- $post_type_name(строка)
- The post type being trashed.
По умолчанию:''
Список изменений
| С версии 6.1 | Введена. |
Код acf_trash_internal_post_type() acf trash internal post type ACF 6.4.2
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;
}