pre_get_comments WordPress Action Hook

The pre_get_comments hook is a hook that is called before the comments are fetched. It is used to modify the query that is used to fetch the comments.

do_action_ref_array( 'pre_get_comments', WP_Comment_Query $query ) #

Fires before comments are retrieved.


Parameters

$query

(WP_Comment_Query)Current instance of WP_Comment_Query (passed by reference).


Top ↑

Source

File: wp-includes/class-wp-comment-query.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.