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