You can “pull” content by doing a switch_to_blog() to the parent blog and then broadcast_children().
Regarding your second point, it should already be so that whatever happens to the parents also happens to the linked children: updating, trashing, restoring and deleting. Is that not the case?
Thank you, Yes switch to blog should solve the problem.
The second point, if child post updated the post title does that make it unlinked from parent post automatically? If yes then is there a way to not unlink it after any change? If no it shouldn’t be unlinked automatically then its my fault as I did modified some of the plugin codes for testing.
I’m asking that because I want to make posts repository inside the network where every site could post and pull posts from that repository, then whoever pulled a post he can modify it as he want “basically translate it” but when the original post deleted, it should also delete all of the copied posts. In simple words the parent post should not have any control on children posts other than deleting them.
Thank you in advance.
-
This reply was modified 6 years, 3 months ago by
hadimneef.
-
This reply was modified 6 years, 3 months ago by
hadimneef.
The posts do not automatically unlink, but there’s an add-on for that: Unlink On Edit.
Then you mention that nothing should happen to the child posts other than deletions. Perhaps you can do this by just disabling all updates?
You can do this by hooking into broadcasting_after_switch_to_blog and setting ->broadcast_here to false all the time. You can query whether this is a new broadcast or an update using
$bcd->parent_broadcast_data->has_linked_child_on_this_blog()
I will try it, Thank you so much!