• I have broadcast the two blogs and un link / un check the blogs in parent post.

    How to find unlinked childrens by passing the parameters of parent post id and blog id?

    • This topic was modified 3 years, 10 months ago by codepaladin.
Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author edward_plainview

    (@edward_plainview)

    $api = ThreeWP_Broadcast()->api();

    Then look in the src / api / api.php file.

    Function: find_unlinked_children

    Thread Starter codepaladin

    (@codepaladin)

    I need unlinked children data on every update on the parent post.

    How can I use this function when updating the parent post to find?

    • This reply was modified 3 years, 10 months ago by codepaladin.
    Plugin Author edward_plainview

    (@edward_plainview)

    I don’t quite understand what you want.

    Inside that function you can find code that will find all posts that are the same as the specified post_d, and then links then up (again).

    Thread Starter codepaladin

    (@codepaladin)

    I am using premium pack of Three Wp Broadcast plugin, i didn’t find the “find_unlinked_children” function which you given path.

    While updating the parent post , is there any hook to find the unlinked blogs?

    Plugin Author edward_plainview

    (@edward_plainview)

    Look in the basic plugin, src / api directory.

    I’d hook into the threewp_broadcast_broadcasting_started action for that.

    Thread Starter codepaladin

    (@codepaladin)

    > threewp_broadcast_broadcasting_started action

    This action is for broadcast the blogs in parent post. But I need the unlinked / unchecked the blogs data while updating the parent post

    • This reply was modified 3 years, 10 months ago by codepaladin.
    Plugin Author edward_plainview

    (@edward_plainview)

    While updating? When, exactly?

    When you are in the editor before pressing “publish”?

    Thread Starter codepaladin

    (@codepaladin)

    > While updating? When, exactly?

    Yes, while updating the parent post on editor. Below are the steps..
    1. Uncheck the blogs in broadcast metabox
    2. Click the update/publish button on parent post editor.

    When click the update/ publish button on editor , How can I get the unchecked blogs data.

    • This reply was modified 3 years, 10 months ago by codepaladin.
    Plugin Author edward_plainview

    (@edward_plainview)

    The code you are looking for is the threewp_broadcast_prepare_broadcasting_data function in src / traits / broadcasting

    Should be line 889.

    The action name is the same as the function name, if you want to hook in to it.

    Plugin Author edward_plainview

    (@edward_plainview)

    Did this get you what you wanted?

    Thread Starter codepaladin

    (@codepaladin)

    Thank you so much for your support.

    threewp_broadcast_prepare_broadcasting_data this hook worked for me. I can able to get the unlinked childs.

    Thread Starter codepaladin

    (@codepaladin)

    One more requirement i need

    While updating parent post i can able to get the unlinked child by using threewp_broadcast_prepare_broadcasting_data the hook.

    After finding the unlinked child i need to display a popup of those childs.

    Is it possible to write javascript in this action function?

    • This reply was modified 3 years, 10 months ago by codepaladin.
    Plugin Author edward_plainview

    (@edward_plainview)

    Nope. The prepare action is already after the publish button has been pressed and WP has saved the new parent.

    What you probably want is to use JS to detect the publish button press and open the modal then already, not after the button is pressed.

    That’s a lot of work, though.

    Perhaps it would be better to do the same thing as the javascript I have for when unchecking blogs: show the “what do you want to do” select underneath.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘How to find unlinked children when uncheck/unlink the child post in parent’ is closed to new replies.