Adding action after duplication finished
-
Requested feature: Allow plugins or themes to customize events after a duplication. It might be useful to have the old and new ID available in the action.
I think this is a very useful addition for complex pages that would want to do some action after it is duplicated.
/**
* Elementor compatibility fixes
*/
if(is_plugin_active( 'elementor/elementor.php' )){
$css = Elementor\Core\Files\CSS\Post::create( $new_post_id );
$css->update();
}
// HERE added action
do_action( 'dt-duplicate-page-post-create', $new_post_id);
/*
* finally, redirecting to your choice
*/
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
You must be logged in to reply to this topic.