comment_on_password_protected
Fires when a comment is attempted on a password-protected post.
Использование
add_action( 'comment_on_password_protected', 'wp_kama_comment_on_password_protected_action' );
/**
* Function for `comment_on_password_protected` action-hook.
*
* @param int $comment_post_id Post ID.
*
* @return void
*/
function wp_kama_comment_on_password_protected_action( $comment_post_id ){
// action...
}
- $comment_post_id(int)
- Post ID.
Список изменений
| С версии 2.9.0 | Введена. |
Где вызывается хук
comment_on_password_protected
wp-includes/comment.php 3721
do_action( 'comment_on_password_protected', $comment_post_id );