WordPress at Your Fingertips
function is not described

WP_Date_Query::get_sql_for_subquery() protected WP 3.7.0

Turns a single date clause into pieces for a WHERE clause.

A wrapper for get_sql_for_clause(), included here for backward compatibility while retaining the naming convention across Query classes.

{} It's a method of the class: WP_Date_Query{}

No Hooks.


Array. Array containing JOIN and WHERE SQL clauses to append to the main query.


// protected - for code of main (parent) or child class
$result = $this->get_sql_for_subquery( $query );
$query(array) (required)
Date query arguments.

Code of WP_Date_Query::get_sql_for_subquery() WP 5.8.3

protected function get_sql_for_subquery( $query ) {
	return $this->get_sql_for_clause( $query, '' );