[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

Taxonomy API: WP_Term class

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

Defines 5 functions

  get_instance()
  __construct()
  filter()
  to_array()
  __get()

Functions
Functions that are not part of a class:

get_instance( $term_id, $taxonomy = null )   X-Ref
Retrieve WP_Term instance.

return: WP_Term|WP_Error|false Term object, if found. WP_Error if `$term_id` is shared between taxonomies and
param: int    $term_id  Term ID.
param: string $taxonomy Optional. Limit matched terms to those matching `$taxonomy`. Only used for
since: 4.4.0

__construct( $term )   X-Ref
Constructor.

param: WP_Term|object $term Term object.
since: 4.4.0

filter( $filter )   X-Ref
Sanitizes term fields, according to the filter type provided.

param: string $filter Filter context. Accepts 'edit', 'db', 'display', 'attribute', 'js', 'rss', or 'raw'.
since: 4.4.0

to_array()   X-Ref
Converts an object to array.

return: array Object as array.
since: 4.4.0

__get( $key )   X-Ref
Getter.

return: mixed Property value.
param: string $key Property to get.
since: 4.4.0



Generated: Thu Nov 21 01:00:03 2024 Cross-referenced by PHPXref 0.7.1