WP_Date_Query::get_sql_for_clause

SummerySummery

Turns a first-order date query into SQL for a WHERE clause.

Syntax

WP_Date_Query::get_sql_for_clause( array $query, array $parent_query )

ParametersParameters

$query

(array) (Required) Date query clause.

$parent_query

(array) (Required) Parent query of the current date query.

ReturnReturn

(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.

SourceSource

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


			

ChangelogChangelog

Changelog
Version Description
4.1.0 Introduced.
Scroll to Top