wppaste
WordPress

WP_Comment_Query::parse_query( string|array $query = '' )

Since
4.2.0
Source
wp-includes/class-wp-comment-query.php:334
Parse arguments passed to the comment query with default query parameters.

Parameters

$querystring|arrayoptional
WP_Comment_Query arguments. See WP_Comment_Query::__construct() for accepted arguments.Default: ''

Hooks fired · 1

One hook fires while WP_Comment_Query::parse_query() runs, in this order:

  1. do_action( parse_comment_query )actionline 348 (+14 into the body)

    Fires after the comment query vars have been parsed.

Uses · 2

  • wp_parse_args()Merges user defined arguments into defaults array.
  • do_action_ref_array()Calls the callback functions that have been added to an action hook, specifying arguments in an array.

Used by · 1

Source

	public function parse_query( $query = '' ) {		if ( empty( $query ) ) {			$query = $this->query_vars;		} 		$this->query_vars = wp_parse_args( $query, $this->query_var_defaults ); 		/**		 * Fires after the comment query vars have been parsed.		 *		 * @since 4.2.0		 *		 * @param WP_Comment_Query $query The WP_Comment_Query instance (passed by reference).		 */		do_action_ref_array( 'parse_comment_query', array( &$this ) );	}

History

Introduced in 4.2.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.0.4 tag, from src/wp-includes/class-wp-comment-query.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.