Changeset 48600 for trunk/src/wp-includes/taxonomy.php
- Timestamp:
- 07/24/2020 12:17:54 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r48599 r48600 2159 2159 * @since 2.3.0 2160 2160 * 2161 * @param string $term The term name to add or update.2161 * @param string $term The term name to add. 2162 2162 * @param string $taxonomy The taxonomy to which to add the term. 2163 2163 * @param array|string $args { … … 2185 2185 * @since 3.0.0 2186 2186 * 2187 * @param string|WP_Error $term The term name to add or update, or a WP_Error object if there's an error.2187 * @param string|WP_Error $term The term name to add, or a WP_Error object if there's an error. 2188 2188 * @param string $taxonomy Taxonomy slug. 2189 2189 */ 2190 2190 $term = apply_filters( 'pre_insert_term', $term, $taxonomy ); 2191 2191 2192 if ( is_wp_error( $term ) ) { 2192 2193 return $term; 2193 2194 } 2195 2194 2196 if ( is_int( $term ) && 0 === $term ) { 2195 2197 return new WP_Error( 'invalid_term_id', __( 'Invalid term ID.' ) ); 2196 2198 } 2199 2197 2200 if ( '' === trim( $term ) ) { 2198 2201 return new WP_Error( 'empty_term_name', __( 'A name is required for this term.' ) ); 2199 2202 } 2203 2200 2204 $defaults = array( 2201 2205 'alias_of' => '',
Note: See TracChangeset
for help on using the changeset viewer.