Closed sambulance closed 4 years ago
I like the idea of using metadata for the connection. I don't think that we're actually using the parent ID anywhere so this should effectively be a non-breaking change.
@pdewouters looks like for this one we'd just need to ensure that whatever meta value is used for this we'd need to ensure that it doesn't get cloned along with the other meta data. It should be added after the filter to remove specific meta keys I think.
@roborourke looks like this is already implemented, so we can just delete the code that sets the cloned post parent? https://github.com/humanmade/post-cloner/blob/master/inc/class-cloner.php#L171
Ok cool, yeah just change the default value for the parent ID to the original post’s parent ID I think.
Cloned posts are created as children of the original post. This is documented as being so the posts have a connection. However this causes issues when the post is non-hierarchical and not expected to have a parent. An example of where this would cause an issue is in breadcrumbs. Perhaps meta data can be used to keep the post connection to its original?