WP_Tax_Query::get_sql

SummerySummery

Generates SQL clauses to be appended to a main query.

Syntax

WP_Tax_Query::get_sql( string $primary_table, string $primary_id_column )

ParametersParameters

$primary_table

(string) (Required) Database table where the object being filtered is stored (eg wp_users).

$primary_id_column

(string) (Required) ID column for the filtered object in $primary_table.

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-tax-query.php


			

ChangelogChangelog

Changelog
Version Description
3.1.0 Introduced.
Scroll to Top