Re-copy instead of creating new copies

Hi,

I'd like to use this plugin to implement a workflow but I'm not sure if it can do what I want. My goal is that authors can push posts from a central site to affiliate sites, which the plugin supports well. But I also want them to be able to update the source post and have these updates propagate. Instead, if I copy the source post a second time it creates new copies of the post on the target site.

What I'd prefer is to create an ongoing association between source post and target post, so any attempts to copy from the source post in the future will go to the target post instead of a new one. I believe I could implement this if Multisite_Content_Copier_Post_Type_Copier's get_postarr method had a filter I could use to alter the post ID in the returned array.

Is there a way to do what I'm trying to do with this plugin?

Thanks.

  • Adam Czajczyk
    • Support Gorilla

    Hey Jim,

    I hope you're well today and thank you for your question!

    This is not possible "out of the box" as our Multisite Content Copier do not create a "connection" between source post and newly posted copy so it's not capable of knowing which copied post is a copy of which source :slight_smile:

    The modification you're suggesting is a right direction but it will not do this. The key here is to create this aforementioned association and it would require a serious custom development job which is way beyond the scope of this support forum.

    That being said, you may want to ask for a custom job at our "Jobs & Pros" job board (please note that no WPMU DEV staff is involved there) here:

    https://premium.wpmudev.org/wordpress-development/

    Kind regards,
    Adam

  • Jim
    • New Recruit

    Thank you for the rapid response, Adam.

    Can you elaborate a little when you say that my suggestion is the right direction but won't work? My suggestion was to use a hook that doesn't exist, so it was really more of a feature request (not for my immediate needs, but something for you folks to consider in your roadmap).

    I figured this would be custom work but I'm a competent developer and willing to do the implementation myself. It just looks to me like it's not possible without hacking the plugin (which I'm not willing to do) as there aren't any hooks that would allow me to change the post before wp_insert_post is called. If that's true, then I don't think the Jobs & Pros boards would help me either; I'll have to write my own plugin. I just wanted confirmation that I wasn't overlooking a solution before I went down that road.

  • Adam Czajczyk
    • Support Gorilla

    Hey Jim!

    Can you elaborate a little when you say that my suggestion is the right direction but won't work? My suggestion was to use a hook that doesn't exist, so it was really more of a feature request (not for my immediate needs, but something for you folks to consider in your roadmap).

    You're right about that the hook doesn't exist. I was referring to your statement that if "method had a filter I could use to alter the post ID in the returned array." That said, although adding such a filter to the plugin would be relatively easy, it wouldn't be enough.

    That's because it would be necessary to create another set of data that plugin could use to create/store/identify relationship information about copied/source posts. Getting it all together might be possible but would require a serious "plugin hacking", no doubt about it :slight_smile:

    I'll have to write my own plugin. I just wanted confirmation that I wasn't overlooking a solution before I went down that road.

    The bottom point is that I think you're right about that as well. Building a new plugin instead of modifying existing one in this case would most likely be more efficient and better way to achieve your goal.

    That said, if you'd need any assistance from my side, please ask. I'll be happy to help.

    Cheers,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.