wp_insert_category


wp_insert_category ( $catarr, $wp_error = false )

Parameters:
  • (array) $catarr { Array of arguments for inserting a new category.
  • (bool) $wp_error Optional. Default false.
Returns:
  • (int|object) The ID number of the new or updated Category on success. Zero or a WP_Error on failure, depending on param $wp_error.
Defined at:
Change Log:
  • 2: .
  • 3: .

Description

Updates an existing Category or creates a new Category.

Related Functions

wp_insert_term, wp_create_category, wp_list_categories, wp_delete_category, is_category

Top Google Results

User discussions

wpseek mobile