• Resolved edward_plainview

    (@edward_plainview)


    Author of Broadcast here.

    One of my users is using Broadcast to automatically share properties between sites on his network.

    After submitting a property, in includes / forms / submit-property.php you call

    > do_action(‘ere_property_submitted’, $this->property_id);

    That’s great for picking up new properties, but can you also add an action that fires after properties are edited?

    > do_action(‘ere_property_edited’, $this->property_id);

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author g5theme

    (@g5theme)

    Thanks for your interest my plugin.
    Before answer, i need to know reason. if i feel that is properly and ok. I will do.
    Thanks

    Thread Starter edward_plainview

    (@edward_plainview)

    After the initial broadcast, the properties exist on several sites in the network.

    The user wants to edit the parent property and have the changes sent to all of the existing copies on the network.

    You have a submitted action, an edited action is just an extra line.

    Plugin Author g5theme

    (@g5theme)

    We added action for you above on latest version 3.2.4
    But:
    for all properties affect => you should use ‘wp_insert_post’ action, with post type ‘Property”.
    View more function below: /**
    * Fires once a post has been saved.
    *
    * @since 2.0.0
    *
    * @param int $post_ID Post ID.
    * @param WP_Post $post Post object.
    * @param bool $update Whether this is an existing post being updated.
    */
    do_action( ‘wp_insert_post’, $post_ID, $post, $update );
    Hope help you.

    Thread Starter edward_plainview

    (@edward_plainview)

    That action is not optimal. The propertie’s custom fields (meta) is not set when the insert post action is called.

    The ere_property_submitted is called when all the meta is properly set, which means it is much, much easier to work with.

    Thanks for the action! Marking as resolved.

    Plugin Author g5theme

    (@g5theme)

    Hope it work as you want and hope you like my plugin and vote for it.

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

The topic ‘Add action for properties edited’ is closed to new replies.