acf_duplicate_post_type()
Duplicates an ACF post type.
No Hooks.
Returns
Array|true|false. The new ACF post type, or false on failure.
Usage
acf_duplicate_post_type( $id, $new_post_id );
- $id(int|string)
- The ACF post type ID, key or name.
- $new_post_id(int)
- Optional ID to override.
Changelog
| Since 6.1 | Introduced. |
acf_duplicate_post_type() acf duplicate post type code ACF 6.8.8
function acf_duplicate_post_type( $id = 0, $new_post_id = 0 ) {
return acf_duplicate_internal_post_type( $id, $new_post_id, 'acf-post-type' );
}