[ Index ]

WordPress 5.4.1

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    




/wp-includes/ -> class-wp-term-query.php (summary)

Taxonomy API: WP_Term_Query class.

File Size: 1027 lines (36 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WP_Term_Query:: (9 methods):

Class: WP_Term_Query  - X-Ref

Class used for querying terms.

__construct( $query = '' )   X-Ref

Sets up the term query, based on the query vars passed.

param: string|array $query {

parse_query( $query = '' )   X-Ref
Parse arguments passed to the term query with default query parameters.

param: string|array $query WP_Term_Query arguments. See WP_Term_Query::__construct()

query( $query )   X-Ref
Sets up the query for retrieving terms.

param: string|array $query Array or URL query string of parameters.
return: array|int List of terms, or number of terms when 'count' is passed as a query var.

get_terms()   X-Ref
Get terms, based on query_vars.

return: array List of terms.

parse_orderby( $orderby_raw )   X-Ref
Parse and sanitize 'orderby' keys passed to the term query.

param: string $orderby_raw Alias for the field to order by.
return: string|false Value to used in the ORDER clause. False otherwise.

parse_orderby_meta( $orderby_raw )   X-Ref
Generate the ORDER BY clause for an 'orderby' param that is potentially related to a meta query.

param: string $orderby_raw Raw 'orderby' value passed to WP_Term_Query.
return: string ORDER BY clause.

parse_order( $order )   X-Ref
Parse an 'order' query variable and cast it to ASC or DESC as necessary.

param: string $order The 'order' query variable.
return: string The sanitized 'order' query variable.

get_search_sql( $string )   X-Ref
Used internally to generate a SQL string related to the 'search' parameter.

param: string $string
return: string

populate_terms( $term_ids )   X-Ref
Creates an array of term objects from an array of term IDs.

Also discards invalid term objects.

param: array $term_ids Term IDs.
return: array

Generated: Tue May 19 15:51:04 2020 Cross-referenced by PHPXref 0.7.1