WordPress.org

Make WordPress Core

Changeset 28474


Ignore:
Timestamp:
05/18/2014 07:27:25 AM (7 years ago)
Author:
DrewAPicture
Message:

Add inline documentation for default arguments in wp_insert_category().

See #28298.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/taxonomy.php

    r28374 r28474  
    8585 *
    8686 * @since 2.0.0
    87  *
    88  * @param mixed $catarr See defaults below. Set 'cat_ID' to a non-zero value to update an existing category. The 'taxonomy' key was added in 3.0.0.
    89  * @param bool $wp_error Optional, since 2.5.0. Set this to true if the caller handles WP_Error return values.
    90  * @return 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.
     87 * @since 2.5.0 $wp_error parameter was added.
     88 * @since 3.0.0 The 'taxonomy' argument was added.
     89 *
     90 * @param array $catarr {
     91 *     Array of arguments for inserting a new category.
     92 *
     93 *     @type int        $cat_ID               Categoriy ID. A non-zero value updates an existing category.
     94 *                                            Default 0.
     95 *     @type string     $taxonomy             Taxonomy slug. Defualt 'category'.
     96 *     @type string     $cat_nam              Category name. Default empty.
     97 *     @type string     $category_description Category description. Default empty.
     98 *     @type string     $category_nicename    Category nice (display) name. Default empty.
     99 *     @type int|string $category_parent      Category parent ID. Default empty.
     100 * }
     101 * @param bool  $wp_error Optional. Default false.
     102 * @return int|object The ID number of the new or updated Category on success. Zero or a WP_Error on failure,
     103 *                    depending on param $wp_error.
    91104 */
    92105function wp_insert_category( $catarr, $wp_error = false ) {
Note: See TracChangeset for help on using the changeset viewer.