Make WordPress Core

Ticket #38310: taxonomy.php.patch

File taxonomy.php.patch, 2.4 KB (added by hilayt24, 3 years ago)

Long statements removed and meaning full shot statements added.

  • wp-includes/taxonomy.php

     
    29192919 * Will make slug unique, if it isn't already.
    29202920 *
    29212921 * The `$slug` has to be unique global to every taxonomy, meaning that one
    2922  * taxonomy term can't have a matching slug with another taxonomy term. Each
    2923  * slug has to be globally unique for every taxonomy.
     2922 * taxonomy term can't have a matching slug with another taxonomy term.
    29242923 *
    29252924 * The way this works is that if the taxonomy that the term belongs to is
    29262925 * hierarchical and has a parent, it will append that parent to the $slug.
     
    30223021 * Update term based on arguments provided.
    30233022 *
    30243023 * The `$args` will indiscriminately override all values with the same field name.
    3025  * Care must be taken to not override important information need to update or
    3026  * update will fail (or perhaps create a new term, neither would be acceptable).
     3024 * Care must be taken to not override important information need to update
     3025 * or update will fail (or perhaps create a new term, neither would be acceptable).
    30273026 *
    3028  * Defaults will set 'alias_of', 'description', 'parent', and 'slug' if not
     3027 * Defaults will set for the parameters like 'alias_of', 'description', 'parent', and 'slug' if not
    30293028 * defined in `$args` already.
    30303029 *
    30313030 * 'alias_of' will create a term group, if it doesn't already exist, and
    30323031 * update it for the `$term`.
    30333032 *
    3034  * If the 'slug' argument in `$args` is missing, then the 'name' will be used.
     3033 * If the 'slug' argument in `$args` is missing, then the 'name' will be used in place of 'slug'.
    30353034 * If you set 'slug' and it isn't unique, then a WP_Error is returned.
    3036  * If you don't pass any slug, then a unique one will be created.
     3035 * If you don't pass any slug, then a unique slug will be created.
    30373036 *
    30383037 * @since 2.3.0
    30393038 *
     
    30463045 *
    30473046 *     @type string $alias_of    Slug of the term to make this term an alias of.
    30483047 *                               Default empty string. Accepts a term slug.
    3049  *     @type string $description The term description. Default empty string.
     3048 *     @type string $description The description of term . Default empty string.
    30503049 *     @type int    $parent      The id of the parent term. Default 0.
    30513050 *     @type string $slug        The term slug to use. Default empty string.
    30523051 * }