philipbadilla
Forum Replies Created
-
Forum: Plugins
In reply to: [Broadcast] WP_Query Filter with BroadcastYup things to consider when going in this direction is to make sure we handle un-linking/re-linking and deleting of children and update the postmeta.
Forum: Plugins
In reply to: [Broadcast] List of Available HooksCurrently looking at
https://broadcast.plainviewplugins.com/doc/documentation/Forum: Plugins
In reply to: [Broadcast] WP_Query Filter with BroadcastWhat I did was hook unto the
threewp_broadcast_broadcasting_before_restore_current_blogand got the
$bcd = $action->broadcasting_data;
$origin_blog_id = $bcd->broadcast_data->blog_id;
$origin_post_id = $bcd->broadcast_data->post_id;And checked for child post like this
$broadcast_data = ThreeWP_Broadcast()->get_post_broadcast_data($origin_blog_id, $origin_post_id);
$children = $broadcast_data->get_linked_children();Then just foreach to all the children and created post_meta keys so I can filter them later using WP_Query
Forum: Plugins
In reply to: [Broadcast] WP_Query Filter with BroadcastThanks, i’ll try it. If you know any sample code it would be helpful. I appreciate your help!
Forum: Plugins
In reply to: [Broadcast] WP_Query Filter with BroadcastThank you for your reply. Is there a hook so I can create a tag every time a post is broadcated/un-broadcasted.
Or how about hooking or adding filter in WP query so I can join your table and also filter the results?