AnsPress_Hooks::after_new_answer( integer $post_id, object $post )

Description #

Things to do after creating an answer

Parameters #

  • $post_id
    integer (Required) answer id.
  • $post
    object (Required) answer post object.

Changelog #

VersionDescription
4.1.2Removed @see ap_update_post_activity_meta().
4.1.11Removed @see ap_update_answers_count().
2.0.1Introduced.

Source #

File: includes/hooks.php

	public static function after_new_answer( $post_id, $post ) {
		// Update answer count.
		ap_update_answers_count( $post->post_parent );

		/**
		 * Action triggered after inserting an answer
		 *
		 * @since 0.9
		 */
		do_action( 'ap_after_new_answer', $post_id, $post );
	}

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