Duplicate Post 2.5.1 has 11 actions and 16 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Duplicate Post fires an action
add_action( 'rb_duplicate_post_before_remove', function( $id, $keep, $arg3, $permanently ) {
// Your code runs here.
}, 10, 4 );
// Change a value Duplicate Post is about to use
add_filter( 'rb_duplicate_post_after_copy_transformers', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Extra steps after the copy is created (the PRO key adds shop and * page-builder copiers here). Each item must implement * PostAfterCopyTransformer. */ apply_filters( 'rb_duplicate_post_after_copy_transformers', array() ); -
/** * Filter args passed to AllInOneSeoCopier::copy(). */ apply_filters( 'rb_duplicate_post_aioseo_copy_args', $args, $context ); -
/** * A duplicate is about to go: its address still works here. */ do_action( 'rb_duplicate_post_before_remove', $id, $keep, ! empty( $context['redirect'] ), $permanently ); -
/** * The options one copy is made with. The REST route uses it for the one-off * choices of the copy dialog's "Advanced settings". */ apply_filters( 'rb_duplicate_post_copy_options', ProfileOptions::getOptionsArray($profile_id), $profile_id ); -
/** * Filters excluded term meta keys. */ apply_filters( 'rb_duplicate_post_excluded_term_meta_keys', $keys ); -
/** * The new post as it is about to be created (the PRO key changes its type * here). */ apply_filters( 'rb_duplicate_post_new_post_data', $modified_data, $transformer_context ); -
/** * A post is gone. What depends on that (a redirect) is done here, not before * it. */ do_action( 'rb_duplicate_post_removed', $id ); -
/** * After a rewrite was put into its original, before the rewrite is removed. */ do_action( 'rb_duplicate_post_republished', $original_id, $rewrite_id ); -
/** * Copies per request with AI steps. WP-CLI and Auto copy have no such limit. */ apply_filters( 'rb_duplicate_post_slow_copies_per_request', 5 ); -
/** * Filters the final list of Yoast SEO postmeta keys to copy for a post * duplication. Full keys, e.g. '_yoast_wpseo_title'. */ apply_filters( 'rb_duplicate_post_yoast_seo_fields', $whitelist, $context ); -
do_action( 'aioseo_post_updated', $post_id ); -
do_action( 'rank_math/post/update', $post_id ); -
do_action( 'rb_duplicate_post_after_aioseo_copy', $context, $result ); -
do_action( 'rb_duplicate_post_after_rank_math_copy', $context, $result ); -
do_action( 'rb_duplicate_post_after_yoast_seo_copy', $context, $result ); -
apply_filters( 'rb_duplicate_post_aioseo_plugin_file', self::DEFAULT_AIOSEO_PLUGIN_FILE ); -
apply_filters( 'rb_duplicate_post_allowed_meta_keys', $keys ); -
do_action( 'rb_duplicate_post_before_aioseo_copy', $context, $args ); -
do_action( 'rb_duplicate_post_before_rank_math_copy', $context, $args ); -
do_action( 'rb_duplicate_post_before_yoast_seo_copy', $context, $args ); -
apply_filters( 'rb_duplicate_post_excluded_meta_keys', $keys ); -
apply_filters( 'rb_duplicate_post_rank_math_copy_args', $args, $context ); -
apply_filters( 'rb_duplicate_post_rank_math_plugin_file', self::DEFAULT_RANK_MATH_PLUGIN_FILE ); -
apply_filters( 'rb_duplicate_post_scenario_regex', false ); -
apply_filters( 'rb_duplicate_post_scenario_steps', $types ); -
apply_filters( 'rb_duplicate_post_supported_types', $types, $blog_id ); -
apply_filters( 'rb_duplicate_post_yoast_seo_plugin_file', self::DEFAULT_YOAST_PLUGIN_FILE );
Generated from Duplicate Post's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: