AnsPress_Hooks::new_comment_approve( integer $comment_id, integer|false $approved )
Description #
Used to create an action when comment publishes.
Parameters #
- $comment_idinteger (Required) Comment ID.
- $approvedinteger | false (Required) 1 if comment is approved else false.
Source #
File: includes/hooks.php
public static function new_comment_approve( $comment_id, $approved ) { if ( 1 === $approved ) { $comment = get_comment( $comment_id ); if ( 'anspress' === $comment->comment_type ) { /** * Action is triggered when a anspress comment is published. * * @param object $comment Comment object. * @since unknown */ do_action( 'ap_publish_comment', $comment ); } } }
Expand full source code Collapse full source code View on GitHub: includes/hooks.php:396
Add your comment