WordPress at a glance
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.

Return

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

  • join(string)
    SQL fragment to append to the main JOIN clause.

  • where(string)
    SQL fragment to append to the main WHERE clause.

Usage

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

Changelog

Since 3.7.0 Introduced.

Code of WP_Date_Query::get_sql_for_subquery() WP 5.5.1

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