Clonify gives you a fast, modern way to duplicate any WordPress content — posts, pages, or custom post types — with a single click.
Actions:
do_action( ‘clonify_after_duplicate’, $new_post_id, $original_post_id );
do_action( ‘clonify_after_copy_taxonomies’, $new_post_id, $original_post_id );
do_action( ‘clonify_after_copy_meta’, $new_post_id, $original_post_id );
Filters:
clonify_before_duplicate — Modify original post before duplication.
clonify_duplicate_title — Override the duplicated post title.
clonify_insert_post_args — Modify full wp_insert_post() args.
clonify_excluded_meta_keys — Add/remove meta keys excluded from copying.
clonify_copy_meta_value — Filter individual meta values during copy.
clonify_redirect_url — Override the URL after duplication.
clonify_supported_post_types — Extend the supported post type list.
$new_id = Clonify_Duplicate::duplicate( $post_id );
This plugin is free software released under the GNU General Public License v2 or later.
https://www.gnu.org/licenses/gpl-2.0.html