Changeset 47810 for trunk/src/wp-includes/rest-api.php
- Timestamp:
- 05/16/2020 07:01:49 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api.php
r47809 r47810 1382 1382 ) 1383 1383 ); 1384 } 1385 1386 if ( isset( $args['pattern'] ) ) { 1387 $pattern = str_replace( '#', '\\#', $args['pattern'] ); 1388 if ( ! preg_match( '#' . $pattern . '#u', $value ) ) { 1389 /* translators: 1: Parameter, 2: Pattern. */ 1390 return new WP_Error( 'rest_invalid_pattern', sprintf( __( '%1$s does not match pattern %2$s.' ), $param, $args['pattern'] ) ); 1391 } 1384 1392 } 1385 1393 }
Note: See TracChangeset
for help on using the changeset viewer.