I checked out that plugin and they are creating custom post types correctly through WordPress (some older plugins created their own way of doing it before custom post types were added to the core).
But, the reason that the Duplicate link is not showing up for this plugin’s custom post type is that they are setting up their own custom “row actions” that appear when hovering over a page title (you can tell this quickly while hovering because you also do not see the “Quick Edit” link that shows up on every other post type). My plugin use’s WordPress’s “page_row_actions” filter to add the Duplicate link, which would normally work on custom post types… But, since this plugin has setup its own row actions functionality it never uses the “page_row_actions” filter. There’s not really anything I can do about this situation if a plugin does something like this. There is no way for me to account for custom code that some plugins may implement to “mimic” the default WordPress behavior.
The only option I could add in for situations like these would be to add a Duplicate button into each post/page edit page, which I am planning on doing sometime in the near future.
Thank you so much for your reply which I transmitted to the authors of the plugin who would like to get in touch with you to find a solution together : would you be happy about this ? Which contact should I transmit to them for you ?
Thank you in advance !
Best regards
Jean
Ok. It’s fine with me if the other author wants to contact me. On my end, I think adding the duplicate button to the edit page of posts would solve your issue. In order to add the duplicate link on the list page, the author of the other plugin would need to implement the row_actions filter within their custom post type row actions.
Hi,
I am the author of WP Customer Area. I am not keen on implementing the default filter for these actions (we have a few reasons regarding why we created our own table and disabled the default links), however, we already have a filter in place to add these actions.
The idea would then either to include the change in Post Duplicator plugin (I could understand if you don’t want that), or Jean could add this line to her theme’s functions.php file:
add_filter('cuar/core/admin/content-list-table/row-actions', 'mtphr_post_duplicator_action_row', 10, 2 );
This should enable the post duplicator link on our tables too.
Thanks for the info, Vincent. I’ll look into adding your custom filter to my plugin since it’s not much of a change/modification to implement.
Cool. Do not hesitate to let me know when that’s done. I’ll tweet and post about it on the plugin’s website.
If you ever find that you could have an add-on to WP Customer Area (either some paid enhancement of Post Duplicator, or a completely different plugin), let us know too, our shop is open to 3rd party developers!
I finally got around to adding this filter into my plugin. WP Customer Area page duplication support has now been added.
Great, thanks for the post!
Hi
Sure. Drop me a mail on contact at wp-customerarea dot com