Yoast / duplicate-post

Yoast Duplicate Post plugin for WordPress
https://yoast.com
GNU General Public License v2.0
46 stars 36 forks source link

Rewrite & Republish Function #345

Open phil-sola opened 9 months ago

phil-sola commented 9 months ago

Hi,

I have been trying to find a way to create a draft post using the rewrite and republish feature programmatically but I am struggling to find one.

Looking at the developer docs on your site, there are certain functions available for developers, such as duplicate_post_create_duplicate() but I can’t see anything for duplicate_post_for_rewrite_and_republish(). Is this possible or can someone help me to get this working?

It is almost essential functionality that I would need for an upcoming build and can’t see any other way to do this.

Any help would be greatly appreciated, and thank you in advance.

Is your feature request related to a problem? Please describe.

Currently AFAIK there is no way to replicate the rewrite & republish functionality from within the admin dashboard using a function or code.

Describe the solution you'd like

A function available to replicate the rewrite and republish functionality in the admin dashboard.

Why do you think this feature is something we should consider for the Yoast SEO plugins?

Yoast is already very developer friendly offering hooks, filters, REST API docs and I think this feature is very much needed for working with posts programmatically.

altstack commented 5 months ago

I was just researching this question and came across phil-sola's post.

I think the duplicate-post plugin's Rewrite & Republish'' is a very useful and wonderful feature. I wanted to incorporate this into a template so that a specific logged-in user can performRewrite & Republish'' from a public page. If this were possible, I think it would be possible to easily implement a function that allows users to submit editing suggestions for updating information or correcting typographical errors in publicly available documents....