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

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