pre_get_comments
Fires before comments are retrieved.
Использование
add_action( 'pre_get_comments', 'wp_kama_pre_get_comments_action' ); /** * Function for `pre_get_comments` action-hook. * * @param WP_Comment_Query $query Current instance of WP_Comment_Query (passed by reference). * * @return void */ function wp_kama_pre_get_comments_action( $query ){ // action... }
- $query(WP_Comment_Query)
- Current instance of WP_Comment_Query (passed by reference).
Список изменений
С версии 3.1.0 | Введена. |
Где вызывается хук
wp-includes/class-wp-comment-query.php 394
do_action_ref_array( 'pre_get_comments', array( &$this ) );