[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

WordPress Taxonomy Administration API.

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

Defines 11 functions

  category_exists()
  get_category_to_edit()
  wp_create_category()
  wp_create_categories()
  wp_insert_category()
  wp_update_category()
  tag_exists()
  wp_create_tag()
  get_tags_to_edit()
  get_terms_to_edit()
  wp_create_term()

Functions
Functions that are not part of a class:

category_exists( $cat_name, $parent = null )   X-Ref
Check whether a category exists.

since: 2.0.0
return: mixed
param: int|string $cat_name Category name.
param: int        $parent   Optional. ID of parent term.

get_category_to_edit( $id )   X-Ref
Get category object for given ID and 'edit' filter context.

since: 2.0.0
return: object
param: int $id

wp_create_category( $cat_name, $parent = 0 )   X-Ref
Add a new category to the database if it does not already exist.

since: 2.0.0
return: int|WP_Error
param: int|string $cat_name
param: int        $parent

wp_create_categories( $categories, $post_id = '' )   X-Ref
Create categories for the given post.

since: 2.0.0
return: array List of categories to create for the given post.
param: string[] $categories Array of category names to create.
param: int      $post_id    Optional. The post ID. Default empty.

wp_insert_category( $catarr, $wp_error = false )   X-Ref
Updates an existing Category or creates a new Category.

since: 2.0.0
since: 2.5.0 $wp_error parameter was added.
since: 3.0.0 The 'taxonomy' argument was added.
return: int|object The ID number of the new or updated Category on success. Zero or a WP_Error on failure,
param: array $catarr {
param: bool  $wp_error Optional. Default false.

wp_update_category( $catarr )   X-Ref
Aliases wp_insert_category() with minimal args.

If you want to update only some fields of an existing category, call this
function with only the new values set inside $catarr.

since: 2.0.0
return: int|bool The ID number of the new or updated Category on success. Zero or FALSE on failure.
param: array $catarr The 'cat_ID' value is required. All other keys are optional.

tag_exists( $tag_name )   X-Ref
Check whether a post tag with a given name exists.

since: 2.3.0
return: mixed
param: int|string $tag_name

wp_create_tag( $tag_name )   X-Ref
Add a new tag to the database if it does not already exist.

since: 2.3.0
return: array|WP_Error
param: int|string $tag_name

get_tags_to_edit( $post_id, $taxonomy = 'post_tag' )   X-Ref
Get comma-separated list of tags available to edit.

since: 2.3.0
return: string|bool|WP_Error
param: int    $post_id
param: string $taxonomy Optional. The taxonomy for which to retrieve terms. Default 'post_tag'.

get_terms_to_edit( $post_id, $taxonomy = 'post_tag' )   X-Ref
Get comma-separated list of terms available to edit for the given post ID.

since: 2.8.0
return: string|bool|WP_Error
param: int    $post_id
param: string $taxonomy Optional. The taxonomy for which to retrieve terms. Default 'post_tag'.

wp_create_term( $tag_name, $taxonomy = 'post_tag' )   X-Ref
Add a new term to the database if it does not already exist.

since: 2.8.0
return: array|WP_Error
param: int|string $tag_name
param: string $taxonomy Optional. The taxonomy for which to retrieve terms. Default 'post_tag'.



Generated: Tue Jul 23 01:00:03 2019 Cross-referenced by PHPXref 0.7.1