Changeset 38077
- Timestamp:
- 07/17/2016 04:14:27 PM (9 years ago)
- Location:
- trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit-tags.php
r37914 r38077 11 11 12 12 if ( ! $taxnow ) 13 wp_die( __( 'Invalid taxonomy ' ) );13 wp_die( __( 'Invalid taxonomy.' ) ); 14 14 15 15 $tax = get_taxonomy( $taxnow ); 16 16 17 17 if ( ! $tax ) 18 wp_die( __( 'Invalid taxonomy ' ) );18 wp_die( __( 'Invalid taxonomy.' ) ); 19 19 20 20 if ( ! in_array( $tax->name, get_taxonomies( array( 'show_ui' => true ) ) ) ) { -
trunk/src/wp-admin/includes/class-wp-terms-list-table.php
r37488 r38077 54 54 55 55 if ( ! taxonomy_exists( $taxonomy ) ) 56 wp_die( __( 'Invalid taxonomy ' ) );56 wp_die( __( 'Invalid taxonomy.' ) ); 57 57 58 58 $tax = get_taxonomy( $taxonomy ); -
trunk/src/wp-includes/class-wp-term.php
r36250 r38077 177 177 // Don't return terms from invalid taxonomies. 178 178 if ( ! taxonomy_exists( $_term->taxonomy ) ) { 179 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy ' ) );179 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) ); 180 180 } 181 181 -
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r38076 r38077 1427 1427 1428 1428 if ( ! $term ) 1429 return new IXR_Error( 403, __( 'Invalid term ID ' ) );1429 return new IXR_Error( 403, __( 'Invalid term ID.' ) ); 1430 1430 1431 1431 $terms[$taxonomy][] = (int) $term_id; … … 1874 1874 1875 1875 if ( ! taxonomy_exists( $content_struct['taxonomy'] ) ) 1876 return new IXR_Error( 403, __( 'Invalid taxonomy ' ) );1876 return new IXR_Error( 403, __( 'Invalid taxonomy.' ) ); 1877 1877 1878 1878 $taxonomy = get_taxonomy( $content_struct['taxonomy'] ); … … 1961 1961 1962 1962 if ( ! taxonomy_exists( $content_struct['taxonomy'] ) ) 1963 return new IXR_Error( 403, __( 'Invalid taxonomy ' ) );1963 return new IXR_Error( 403, __( 'Invalid taxonomy.' ) ); 1964 1964 1965 1965 $taxonomy = get_taxonomy( $content_struct['taxonomy'] ); … … 1979 1979 1980 1980 if ( ! $term ) 1981 return new IXR_Error( 404, __( 'Invalid term ID ' ) );1981 return new IXR_Error( 404, __( 'Invalid term ID.' ) ); 1982 1982 1983 1983 if ( isset( $content_struct['name'] ) ) { … … 2057 2057 2058 2058 if ( ! taxonomy_exists( $taxonomy ) ) 2059 return new IXR_Error( 403, __( 'Invalid taxonomy ' ) );2059 return new IXR_Error( 403, __( 'Invalid taxonomy.' ) ); 2060 2060 2061 2061 $taxonomy = get_taxonomy( $taxonomy ); … … 2070 2070 2071 2071 if ( ! $term ) 2072 return new IXR_Error( 404, __( 'Invalid term ID ' ) );2072 return new IXR_Error( 404, __( 'Invalid term ID.' ) ); 2073 2073 2074 2074 $result = wp_delete_term( $term_id, $taxonomy->name ); … … 2128 2128 2129 2129 if ( ! taxonomy_exists( $taxonomy ) ) 2130 return new IXR_Error( 403, __( 'Invalid taxonomy ' ) );2130 return new IXR_Error( 403, __( 'Invalid taxonomy.' ) ); 2131 2131 2132 2132 $taxonomy = get_taxonomy( $taxonomy ); … … 2141 2141 2142 2142 if ( ! $term ) 2143 return new IXR_Error( 404, __( 'Invalid term ID ' ) );2143 return new IXR_Error( 404, __( 'Invalid term ID.' ) ); 2144 2144 2145 2145 return $this->_prepare_term( $term ); … … 2186 2186 2187 2187 if ( ! taxonomy_exists( $taxonomy ) ) 2188 return new IXR_Error( 403, __( 'Invalid taxonomy ' ) );2188 return new IXR_Error( 403, __( 'Invalid taxonomy.' ) ); 2189 2189 2190 2190 $taxonomy = get_taxonomy( $taxonomy ); … … 2281 2281 2282 2282 if ( ! taxonomy_exists( $taxonomy ) ) 2283 return new IXR_Error( 403, __( 'Invalid taxonomy ' ) );2283 return new IXR_Error( 403, __( 'Invalid taxonomy.' ) ); 2284 2284 2285 2285 $taxonomy = get_taxonomy( $taxonomy ); -
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.