diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php index 10b5c29a33..b34bc317e1 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php @@ -16,6 +16,8 @@ */ class WP_REST_Themes_Controller extends WP_REST_Controller { + const PATTERN = '[^.\/]+(?:\/[^.\/]+)?'; + /** * Constructor. * @@ -50,7 +52,7 @@ class WP_REST_Themes_Controller extends WP_REST_Controller { register_rest_route( $this->namespace, - '/' . $this->rest_base . '/(?P[\w-]+)', + sprintf( '/%s/(?P%s)', $this->rest_base, self::PATTERN ), array( 'args' => array( 'stylesheet' => array( diff --git a/wp-includes/version.php b/wp-includes/version.php index a9d1ddc3c5..47a4886c24 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-52016'; +$wp_version = '5.9-alpha-52017'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.