Changeset 47753 for trunk/src/wp-includes/rest-api.php
- Timestamp:
- 05/03/2020 07:18:40 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api.php
r47627 r47753 1392 1392 /* translators: %s: IP address. */ 1393 1393 return new WP_Error( 'rest_invalid_param', sprintf( __( '%s is not a valid IP address.' ), $param ) ); 1394 } 1395 break; 1396 case 'uuid': 1397 if ( ! wp_is_uuid( $value ) ) { 1398 /* translators: %s is the name of a JSON field expecting a valid uuid. */ 1399 return new WP_Error( 'rest_invalid_uuid', sprintf( __( '%s is not a valid UUID.' ), $param ) ); 1394 1400 } 1395 1401 break; … … 1550 1556 case 'ip': 1551 1557 return sanitize_text_field( $value ); 1558 1559 case 'uuid': 1560 return sanitize_text_field( $value ); 1552 1561 } 1553 1562 }
Note: See TracChangeset
for help on using the changeset viewer.