[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

Taxonomy API: WP_Taxonomy class

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

Defines 9 functions

  __construct()
  set_props()
  add_rewrite_rules()
  remove_rewrite_rules()
  add_hooks()
  remove_hooks()
  get_rest_controller()
  get_default_labels()
  reset_default_labels()

Functions
Functions that are not part of a class:

__construct( $taxonomy, $object_type, $args = array()   X-Ref
Constructor.

See the register_taxonomy() function for accepted arguments for `$args`.

param: string       $taxonomy    Taxonomy key, must not exceed 32 characters.
param: array|string $object_type Name of the object type for the taxonomy object.
param: array|string $args        Optional. Array or query string of arguments for registering a taxonomy.
since: 4.7.0

set_props( $object_type, $args )   X-Ref
Sets taxonomy properties.

See the register_taxonomy() function for accepted arguments for `$args`.

param: string|string[] $object_type Name or array of names of the object types for the taxonomy.
param: array|string    $args        Array or query string of arguments for registering a taxonomy.
since: 4.7.0

add_rewrite_rules()   X-Ref
Adds the necessary rewrite rules for the taxonomy.

since: 4.7.0

remove_rewrite_rules()   X-Ref
Removes any rewrite rules, permastructs, and rules for the taxonomy.

since: 4.7.0

add_hooks()   X-Ref
Registers the ajax callback for the meta box.

since: 4.7.0

remove_hooks()   X-Ref
Removes the ajax callback for the meta box.

since: 4.7.0

get_rest_controller()   X-Ref
Gets the REST API controller for this taxonomy.

Will only instantiate the controller class once per request.

return: WP_REST_Controller|null The controller instance, or null if the taxonomy
since: 5.5.0

get_default_labels()   X-Ref
Returns the default labels for taxonomies.

return: (string|null)[][] The default labels for taxonomies.
since: 6.0.0

reset_default_labels()   X-Ref
Resets the cache for the default labels.

since: 6.0.0



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