• Resolved Martin Stehle

    (@hinjiriyo)


    Hello Esteban,

    to let 3rd-party functions work after a post was inserted by your plugin: what about to add an action hook?

    I think a good place for the hook can be in wpematico_campaign_fetch::processItem() directly after the call of wpematico_campaign_fetch::postProcessItem().

    To let 3rd-party applications take effect on the recently inserted post at least the post ID, and if possible the post object (as returned by get_post( $post_id ), are given as parameters. It is aquivalent to the 'save_post' hook of wp_insert_post() and fired after all assignments of categories etc. are applied.

    The background is a recent request of an user of my plugin wishing to let it work with your plugin. Your response is appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author etruel

    (@etruel)

    Hi @hinjiriyo,

    Do you know the wpematico-custom-hooks plugin ?

    In it you will be able to find all the filters and actions that the WPeMatico has and you will also be able to generate the function to use it directly from the plugin or make a copy paste of the function to your file and adding the filter call.

    Anyway you have an action after inserting the post as follows
    do_action(‘wpematico_inserted_post’, $post_id, $this->campaign, $item )

    I hope it helps.
    etruel

    Plugin Author etruel

    (@etruel)

    BTW what is your plugin ? I can’t find any reference to it.

    Thread Starter Martin Stehle

    (@hinjiriyo)

    I didn’t know the hook plugin. I will take a look at it.

    My plugin is Quick Featured Image. It uses the hook 'save_post' to set automatic featured images based on the rules specified by the user.

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

The topic ‘Action hook after post insertion processing possible?’ is closed to new replies.