Ticket #20809: duplicate_strings.patch
| File duplicate_strings.patch, 3.5 KB (added by pavelevap, 13 months ago) |
|---|
-
wp-includes/class-wp-xmlrpc-server.php
946 946 947 947 $post_type = get_post_type_object( $post_data['post_type'] ); 948 948 if ( ! $post_type ) 949 return new IXR_Error( 403, __( 'Invalid post type ' ) );949 return new IXR_Error( 403, __( 'Invalid post type.' ) ); 950 950 951 951 $update = ! empty( $post_data['ID'] ); 952 952 … … 1072 1072 $term = get_term_by( 'id', $term_id, $taxonomy ); 1073 1073 1074 1074 if ( ! $term ) 1075 return new IXR_Error( 403, __( 'Invalid term ID ' ) );1075 return new IXR_Error( 403, __( 'Invalid term ID.' ) ); 1076 1076 1077 1077 $terms[$taxonomy][] = (int) $term_id; 1078 1078 } -
wp-includes/taxonomy.php
502 502 503 503 foreach ( (array) $taxonomies as $taxonomy ) { 504 504 if ( ! taxonomy_exists( $taxonomy ) ) 505 return new WP_Error( 'invalid_taxonomy', __( 'Invalid Taxonomy' ) );505 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) ); 506 506 } 507 507 508 508 $defaults = array( 'order' => 'ASC' ); … … 855 855 } 856 856 857 857 if ( ! taxonomy_exists($taxonomy) ) { 858 $error = new WP_Error('invalid_taxonomy', __('Invalid Taxonomy'));858 $error = new WP_Error('invalid_taxonomy', __('Invalid taxonomy.')); 859 859 return $error; 860 860 } 861 861 … … 984 984 */ 985 985 function get_term_children( $term_id, $taxonomy ) { 986 986 if ( ! taxonomy_exists($taxonomy) ) 987 return new WP_Error('invalid_taxonomy', __('Invalid Taxonomy'));987 return new WP_Error('invalid_taxonomy', __('Invalid taxonomy.')); 988 988 989 989 $term_id = intval( $term_id ); 990 990 … … 1174 1174 1175 1175 foreach ( $taxonomies as $taxonomy ) { 1176 1176 if ( ! taxonomy_exists($taxonomy) ) { 1177 $error = new WP_Error('invalid_taxonomy', __('Invalid Taxonomy'));1177 $error = new WP_Error('invalid_taxonomy', __('Invalid taxonomy.')); 1178 1178 return $error; 1179 1179 } 1180 1180 } … … 1875 1875 1876 1876 foreach ( (array) $taxonomies as $taxonomy ) { 1877 1877 if ( ! taxonomy_exists($taxonomy) ) 1878 return new WP_Error('invalid_taxonomy', __('Invalid Taxonomy'));1878 return new WP_Error('invalid_taxonomy', __('Invalid taxonomy.')); 1879 1879 } 1880 1880 1881 1881 if ( !is_array($object_ids) ) … … 2015 2015 global $wpdb; 2016 2016 2017 2017 if ( ! taxonomy_exists($taxonomy) ) 2018 return new WP_Error('invalid_taxonomy', __('Invalid taxonomy '));2018 return new WP_Error('invalid_taxonomy', __('Invalid taxonomy.')); 2019 2019 2020 2020 $term = apply_filters( 'pre_insert_term', $term, $taxonomy ); 2021 2021 if ( is_wp_error( $term ) ) 2022 2022 return $term; 2023 2023 2024 2024 if ( is_int($term) && 0 == $term ) 2025 return new WP_Error('invalid_term_id', __('Invalid term ID '));2025 return new WP_Error('invalid_term_id', __('Invalid term ID.')); 2026 2026 2027 2027 if ( '' == trim($term) ) 2028 2028 return new WP_Error('empty_term_name', __('A name is required for this term')); … … 2146 2146 $object_id = (int) $object_id; 2147 2147 2148 2148 if ( ! taxonomy_exists($taxonomy) ) 2149 return new WP_Error('invalid_taxonomy', __('Invalid Taxonomy'));2149 return new WP_Error('invalid_taxonomy', __('Invalid taxonomy.')); 2150 2150 2151 2151 if ( !is_array($terms) ) 2152 2152 $terms = array($terms); … … 2320 2320 global $wpdb; 2321 2321 2322 2322 if ( ! taxonomy_exists($taxonomy) ) 2323 return new WP_Error('invalid_taxonomy', __('Invalid taxonomy '));2323 return new WP_Error('invalid_taxonomy', __('Invalid taxonomy.')); 2324 2324 2325 2325 $term_id = (int) $term_id; 2326 2326