• I have a plugin set up that hooks into all of the post publishing actions to send an email whenever a post is published on my sites; however, whenever a post is added to a child site with ThreeWP Broadcast none of the post publishing actions are triggered. I have tried hooking into ‘wp_insert_post’ to correct this, but that did not resolve the issue.

    The hooks I’m currently using are:

      draft_to_private
      future_to_private
      pending_to_private
      publish_to_private
      draft_to_publish
      future_to_publish
      pending_to_publish
      private_to_publish
      publish_to_publish

    Can you tell me which function I should be hooking into to trigger actions when ThreeWP broadcast adds a post to a child site?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author edward_plainview

    (@edward_plainview)

    Broadcast uses only WordPress’ own functions to broadcast posts between blogs.

    On lines 352 and 370 of src/traits/broadcasting you should see calls to wp_update_post and wp_insert_post.

    I believe those two functions call save_post, which should be useful for you.

    Plugin Author edward_plainview

    (@edward_plainview)

    No answer. Marking as not support question.

    Thread Starter mbigler

    (@mbigler)

    Thanks Edward, for some reason I didn’t get notified when you responded. I was able to make the modifications necessary to solve my problem, I ended up testing to make sure it broadcast correctly and then transitioning the post to “draft” status and then calling wp_publish_post() immediately before switching back to the original blog in the broadcasting.php file.

    I did find an error on line 292, of the original code of that file, where the closing “)” was placed in the wrong spot.

    • This reply was modified 9 years, 3 months ago by mbigler.
    • This reply was modified 9 years, 3 months ago by mbigler.
    Plugin Author edward_plainview

    (@edward_plainview)

    Feel free to e-mail me your changes so I can see what you did.

    [email protected]

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Using ThreeWP Broadcast with Notification Plugin’ is closed to new replies.