Changeset 38077 for trunk/src/wp-includes/taxonomy.php
- Timestamp:
- 07/17/2016 04:14:27 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r38029 r38077 506 506 function unregister_taxonomy( $taxonomy ) { 507 507 if ( ! taxonomy_exists( $taxonomy ) ) { 508 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy ' ) );508 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) ); 509 509 } 510 510 … … 737 737 foreach ( (array) $taxonomies as $taxonomy ) { 738 738 if ( ! taxonomy_exists( $taxonomy ) ) { 739 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy ' ) );739 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) ); 740 740 } 741 741 } … … 827 827 828 828 if ( $taxonomy && ! taxonomy_exists( $taxonomy ) ) { 829 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy ' ) );829 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) ); 830 830 } 831 831 … … 989 989 */ 990 990 function get_term_children( $term_id, $taxonomy ) { 991 if ( ! taxonomy_exists($taxonomy) ) 992 return new WP_Error('invalid_taxonomy', __('Invalid taxonomy')); 991 if ( ! taxonomy_exists( $taxonomy ) ) { 992 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) ); 993 } 993 994 994 995 $term_id = intval( $term_id ); … … 1209 1210 foreach ( $args['taxonomy'] as $taxonomy ) { 1210 1211 if ( ! taxonomy_exists( $taxonomy ) ) { 1211 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy ' ) );1212 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) ); 1212 1213 } 1213 1214 } … … 1976 1977 foreach ( $taxonomies as $taxonomy ) { 1977 1978 if ( ! taxonomy_exists($taxonomy) ) 1978 return new WP_Error( 'invalid_taxonomy', __('Invalid taxonomy'));1979 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) ); 1979 1980 } 1980 1981 … … 2227 2228 2228 2229 if ( ! taxonomy_exists($taxonomy) ) { 2229 return new WP_Error( 'invalid_taxonomy', __('Invalid taxonomy'));2230 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) ); 2230 2231 } 2231 2232 /** … … 2242 2243 } 2243 2244 if ( is_int($term) && 0 == $term ) { 2244 return new WP_Error( 'invalid_term_id', __('Invalid term ID'));2245 return new WP_Error( 'invalid_term_id', __( 'Invalid term ID.' ) ); 2245 2246 } 2246 2247 if ( '' == trim($term) ) { 2247 return new WP_Error( 'empty_term_name', __('A name is required for this term'));2248 return new WP_Error( 'empty_term_name', __( 'A name is required for this term.' ) ); 2248 2249 } 2249 2250 $defaults = array( 'alias_of' => '', 'description' => '', 'parent' => 0, 'slug' => ''); … … 2474 2475 $object_id = (int) $object_id; 2475 2476 2476 if ( ! taxonomy_exists($taxonomy) ) 2477 return new WP_Error('invalid_taxonomy', __('Invalid taxonomy')); 2477 if ( ! taxonomy_exists( $taxonomy ) ) { 2478 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) ); 2479 } 2478 2480 2479 2481 if ( !is_array($terms) ) … … 2612 2614 2613 2615 if ( ! taxonomy_exists( $taxonomy ) ) { 2614 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy ' ) );2616 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) ); 2615 2617 } 2616 2618 … … 2808 2810 2809 2811 if ( ! taxonomy_exists( $taxonomy ) ) { 2810 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy ' ) );2812 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) ); 2811 2813 } 2812 2814
Note: See TracChangeset
for help on using the changeset viewer.