AnsPress_Hooks::after_new_answer( integer $post_id, object $post )
Description #
Things to do after creating an answer
Parameters #
- $post_idinteger (Required) answer id.
- $postobject (Required) answer post object.
Changelog #
| Version | Description |
|---|---|
| 4.1.2 | Removed @see ap_update_post_activity_meta(). |
| 4.1.11 | Removed @see ap_update_answers_count(). |
| 2.0.1 | Introduced. |
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 );
}
Expand full source code Collapse full source code View on GitHub: includes/hooks.php:170
Add your comment