ap_trigger_qa_update_hook( object $_post, string $event )

Description #

Trigger question and answer update hooks.

Parameters #

  • $_post
    object (Required) Post object.
  • $event
    string (Required) Event name.

Source #

File: includes/functions.php

1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
function ap_trigger_qa_update_hook( $_post, $event ) {
    $_post = ap_get_post( $_post );
 
    // Check if post type is question or answer.
    if ( ! in_array( $_post->post_type, array( 'question', 'answer' ), true ) ) {
        return;
    }
 
    /**
        * Triggered right after updating question/answer.
        *
        * @param object $_post      Inserted post object.
        * @since 0.9
        */
    do_action( 'ap_after_update_' . $_post->post_type, $_post, $event );
}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment