WP_Meta_Query::get_clauses() WordPress Method

The WP_Meta_Query::get_clauses() method is used to get the SQL clauses for a meta query. This is useful for turning a meta query into SQL.

WP_Meta_Query::get_clauses() #

Get a flattened list of sanitized meta clauses.


Description

This array should be used for clause lookup, as when the table alias and CAST type must be determined for a value of ‘orderby’ corresponding to a meta clause.


Top ↑

Return

(array) Meta clauses.


Top ↑

Source

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

	public function get_clauses() {
		return $this->clauses;
	}

Top ↑

Changelog

Changelog
VersionDescription
4.2.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.