Changeset 49536 for trunk/src/wp-includes/rest-api.php
- Timestamp:
- 11/07/2020 09:57:54 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api.php
r49257 r49536 2010 2010 2011 2011 if ( isset( $args['minItems'] ) && count( $value ) < $args['minItems'] ) { 2012 /* translators: 1: Parameter, 2: Number. */ 2013 return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s must contain at least %2$s items.' ), $param, number_format_i18n( $args['minItems'] ) ) ); 2012 return new WP_Error( 2013 'rest_invalid_param', 2014 sprintf( 2015 /* translators: 1: Parameter, 2: Number. */ 2016 _n( 2017 '%1$s must contain at least %2$s item.', 2018 '%1$s must contain at least %2$s items.', 2019 $args['minItems'] 2020 ), 2021 $param, 2022 number_format_i18n( $args['minItems'] ) 2023 ) 2024 ); 2014 2025 } 2015 2026 2016 2027 if ( isset( $args['maxItems'] ) && count( $value ) > $args['maxItems'] ) { 2017 /* translators: 1: Parameter, 2: Number. */ 2018 return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s must contain at most %2$s items.' ), $param, number_format_i18n( $args['maxItems'] ) ) ); 2028 return new WP_Error( 2029 'rest_invalid_param', 2030 sprintf( 2031 /* translators: 1: Parameter, 2: Number. */ 2032 _n( 2033 '%1$s must contain at most %2$s item.', 2034 '%1$s must contain at most %2$s items.', 2035 $args['maxItems'] 2036 ), 2037 $param, 2038 number_format_i18n( $args['maxItems'] ) 2039 ) 2040 ); 2019 2041 } 2020 2042 … … 2087 2109 2088 2110 if ( isset( $args['minProperties'] ) && count( $value ) < $args['minProperties'] ) { 2089 /* translators: 1: Parameter, 2: Number. */ 2090 return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s must contain at least %2$s properties.' ), $param, number_format_i18n( $args['minProperties'] ) ) ); 2111 return new WP_Error( 2112 'rest_invalid_param', 2113 sprintf( 2114 /* translators: 1: Parameter, 2: Number. */ 2115 _n( 2116 '%1$s must contain at least %2$s property.', 2117 '%1$s must contain at least %2$s properties.', 2118 $args['minProperties'] 2119 ), 2120 $param, 2121 number_format_i18n( $args['minProperties'] ) 2122 ) 2123 ); 2091 2124 } 2092 2125 2093 2126 if ( isset( $args['maxProperties'] ) && count( $value ) > $args['maxProperties'] ) { 2094 /* translators: 1: Parameter, 2: Number. */ 2095 return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s must contain at most %2$s properties.' ), $param, number_format_i18n( $args['maxProperties'] ) ) ); 2127 return new WP_Error( 2128 'rest_invalid_param', 2129 sprintf( 2130 /* translators: 1: Parameter, 2: Number. */ 2131 _n( 2132 '%1$s must contain at most %2$s property.', 2133 '%1$s must contain at most %2$s properties.', 2134 $args['maxProperties'] 2135 ), 2136 $param, 2137 number_format_i18n( $args['maxProperties'] ) 2138 ) 2139 ); 2096 2140 } 2097 2141 }
Note: See TracChangeset
for help on using the changeset viewer.