Changeset 48599 for trunk/src/wp-includes/taxonomy.php
- Timestamp:
- 07/24/2020 12:02:47 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r48591 r48599 2139 2139 * 4. The term cache is cleaned. 2140 2140 * 5. Several more actions are fired. 2141 * 6. An array is returned containing the term_id and term_taxonomy_id.2141 * 6. An array is returned containing the `term_id` and `term_taxonomy_id`. 2142 2142 * 2143 2143 * If the 'slug' argument is not empty, then it is checked to see if the term … … 2149 2149 * 2150 2150 * Error handling: 2151 * If $taxonomy does not exist or $termis empty,2151 * If `$taxonomy` does not exist or `$term` is empty, 2152 2152 * a WP_Error object will be returned. 2153 2153 * … … 2431 2431 * 2432 2432 * @param int $term_id Term ID. 2433 * @param int $tt_id T axonomy termID.2433 * @param int $tt_id Term taxonomy ID. 2434 2434 */ 2435 2435 $term_id = apply_filters( 'term_id_filter', $term_id, $tt_id ); … … 2884 2884 * Update term based on arguments provided. 2885 2885 * 2886 * The $argswill indiscriminately override all values with the same field name.2886 * The `$args` will indiscriminately override all values with the same field name. 2887 2887 * Care must be taken to not override important information need to update or 2888 2888 * update will fail (or perhaps create a new term, neither would be acceptable). 2889 2889 * 2890 2890 * Defaults will set 'alias_of', 'description', 'parent', and 'slug' if not 2891 * defined in $args already. 2892 * 2893 * 'alias_of' will create a term group, if it doesn't already exist, and update 2894 * it for the $term. 2895 * 2896 * If the 'slug' argument in $args is missing, then the 'name' in $args will be 2897 * used. It should also be noted that if you set 'slug' and it isn't unique then 2898 * a WP_Error will be passed back. If you don't pass any slug, then a unique one 2899 * will be created for you. 2900 * 2901 * For what can be overrode in `$args`, check the term scheme can contain and stay 2902 * away from the term keys. 2891 * defined in `$args` already. 2892 * 2893 * 'alias_of' will create a term group, if it doesn't already exist, and 2894 * update it for the `$term`. 2895 * 2896 * If the 'slug' argument in `$args` is missing, then the 'name' will be used. 2897 * If you set 'slug' and it isn't unique, then a WP_Error is returned. 2898 * If you don't pass any slug, then a unique one will be created. 2903 2899 * 2904 2900 * @since 2.3.0 … … 2906 2902 * @global wpdb $wpdb WordPress database abstraction object. 2907 2903 * 2908 * @param int $term_id The ID of the term 2909 * @param string $taxonomy The context in which to relate the term to the object. 2910 * @param array|string $args Optional. Array of get_terms() arguments. Default empty array. 2911 * @return array|WP_Error Returns Term ID and Taxonomy Term ID 2904 * @param int $term_id The ID of the term. 2905 * @param string $taxonomy The taxonomy of the term. 2906 * @param array|string $args { 2907 * Optional. Array or string of arguments for updating a term. 2908 * 2909 * @type string $alias_of Slug of the term to make this term an alias of. 2910 * Default empty string. Accepts a term slug. 2911 * @type string $description The term description. Default empty string. 2912 * @type int $parent The id of the parent term. Default 0. 2913 * @type string $slug The term slug to use. Default empty string. 2914 * } 2915 * @return array|WP_Error An array containing the `term_id` and `term_taxonomy_id`, 2916 * WP_Error otherwise. 2912 2917 */ 2913 2918 function wp_update_term( $term_id, $taxonomy, $args = array() ) {
Note: See TracChangeset
for help on using the changeset viewer.