`duplicate_post_excludelist_filter` not working as expected
-
(I posted this in a previous thread, but it was already marked as resolved)
Hello!
I am trying to follow your instructions from this previous thread,. To my custom plugin I have added the following
/** * Filters out custom fields from being duplicated in addition to the defaults. * * @param array $meta_excludelist The default exclusion list, based on the “Do not copy these fields” setting, plus some other field names. * * @return array The custom fields to exclude. */function my_custom_fields_filter( $meta_excludelist ) { // Merges the defaults array with our own array of custom fields. return array_merge( $meta_excludelist, [ 'ig_es_is_post_notified', 'bluesky_shared' ] );}add_filter( 'duplicate_post_excludelist_filter', 'my_custom_fields_filter' );However when I click “Rewrite & Republish” and the post opens for republishing in the custom fields section I still see this:

My understanding of your instructions was that these fields should not be duplicated because of the function you recommended.
I am confident that my custom plugin is active.
Can you tell me what I am doing wrong?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘`duplicate_post_excludelist_filter` not working as expected’ is closed to new replies.