Make WordPress Core


Ignore:
Timestamp:
12/12/2015 04:26:42 PM (9 years ago)
Author:
DrewAPicture
Message:

Docs: Document the optional $args parameter in wp_delete_term() in the hash notation style.

Props slushman, swissspidy.
Fixes #34862.

File:
1 edited

Legend:

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

    r35725 r35889  
    20572057 * Metadata associated with the term will be deleted.
    20582058 *
    2059  * The `$args` 'default' will only override the terms found, if there is only one
    2060  * term found. Any other and the found terms are used.
    2061  *
    2062  * The $args 'force_default' will force the term supplied as default to be
    2063  * assigned even if the object was not going to be termless
    2064  *
    2065  * @todo Document $args as a hash notation.
    2066  *
    20672059 * @since 2.3.0
    20682060 *
     
    20712063 * @param int          $term     Term ID.
    20722064 * @param string       $taxonomy Taxonomy Name.
    2073  * @param array|string $args     Optional. Change 'default' term id and override found term ids.
    2074  * @return bool|int|WP_Error Returns false if not term; true if completes delete action.
     2065 * @param array|string $args {
     2066 *     Optional. Array of arguments to override the default term ID. Default empty array.
     2067 *
     2068 *     @type int  $default       The term ID to make the default term. This will only override
     2069 *                               the terms found if there is only one term found. Any other and
     2070 *                               the found terms are used.
     2071 *     @type bool $force_default Optional. Whether to force the supplied term as default to be
     2072 *                               assigned even if the object was not going to be term-less.
     2073 *                               Default false.
     2074 * }
     2075 * @return bool|int|WP_Error True on success, false if term does not exist. Zero on attempted
     2076 *                           deletion of default Category. WP_Error if the taxonomy does not exist.
    20752077 */
    20762078function wp_delete_term( $term, $taxonomy, $args = array() ) {
Note: See TracChangeset for help on using the changeset viewer.