- Timestamp:
- 12/21/2021 04:12:06 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php
r52376 r52399 69 69 register_rest_route( 70 70 $this->namespace, 71 '/' . $this->rest_base . '/(?P<id>[\/\s%\w\.\(\)\[\]\@_\-]+)', 71 // The route. 72 sprintf( 73 '/%s/(?P<id>%s%s)', 74 $this->rest_base, 75 // Matches theme's directory: `/themes/<subdirectory>/<theme>/` or `/themes/<theme>/`. 76 // Excludes invalid directory name characters: `/:<>*?"|`. 77 '([^\/:<>\*\?"\|]+(?:\/[^\/:<>\*\?"\|]+)?)', 78 // Matches the template name. 79 '[\/\w-]+' 80 ), 72 81 array( 73 82 'args' => array( … … 150 159 */ 151 160 public function _sanitize_template_id( $id ) { 152 // Decode empty space.153 161 $id = urldecode( $id ); 154 162
Note: See TracChangeset
for help on using the changeset viewer.