duplicate-post icon indicating copy to clipboard operation
duplicate-post copied to clipboard

Filter to change Rewrite & Republish Options

Open grappler opened this issue 4 years ago • 4 comments

For Duplicate Post to be compatible with Polylang the taxonomy post_translations needs to be excluded from the rewrite and republish feature. Polylang has already done this for the duplicate post feature.

The filter duplicate_post_taxonomies_excludelist_filter does not work on the rewrite & republish feature due to use_filters being set to false. https://github.com/Yoast/duplicate-post/blob/110537f13f9937da0c2adcfe012f9dd1d5b271f7/src/post-duplicator.php#L160

Due to there not being a filter available I have created a patch for myself: https://github.com/wearerequired/duplicate-post/commit/0869c1d1b825f78e6466fed4cad2cf1883e6d064

grappler avatar Oct 14 '21 08:10 grappler

@enricobattocchi Is this something that be included in the next version? Happy to contribute a PR.

grappler avatar Nov 18 '21 12:11 grappler

Hello @grappler we also needed this. We've made a PR. Let me know if you think we should use a different name or if you have any other suggestions 🙂

xipasduarte avatar Oct 18 '22 12:10 xipasduarte

+1 https://wordpress.org/support/topic/duplicate_post_excludelist_filter-doesnt-work-when-using-rewrite-and-republish/

shabnam611 avatar May 09 '24 07:05 shabnam611