Make WordPress Core

Ticket #54596: 54596.diff

File 54596.diff, 1.8 KB (added by mkaz, 2 years ago)
  • src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php

    diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php
    index 5dda1a9360..f5fd74afcc 100644
    a b class WP_REST_Global_Styles_Controller extends WP_REST_Controller { 
    4141                // List themes global styles.
    4242                register_rest_route(
    4343                        $this->namespace,
    44                         '/' . $this->rest_base . '/themes/(?P<stylesheet>[^.\/]+(?:\/[^.\/]+)?)',
     44                        '/' . $this->rest_base . '/themes/(?P<stylesheet>[\/\w\.-]+)',
    4545                        array(
    4646                                array(
    4747                                        'methods'             => WP_REST_Server::READABLE,
    class WP_REST_Global_Styles_Controller extends WP_REST_Controller { 
    6060                // Lists/updates a single gloval style variation based on the given id.
    6161                register_rest_route(
    6262                        $this->namespace,
    63                         '/' . $this->rest_base . '/(?P<id>[\/\w-]+)',
     63                        '/' . $this->rest_base . '/(?P<id>[\/\w\.-]+)',
    6464                        array(
    6565                                array(
    6666                                        'methods'             => WP_REST_Server::READABLE,
  • src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php

    diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php
    index 75411b107f..e6648bb84a 100644
    a b class WP_REST_Templates_Controller extends WP_REST_Controller { 
    6868                // Lists/updates a single template based on the given id.
    6969                register_rest_route(
    7070                        $this->namespace,
    71                         '/' . $this->rest_base . '/(?P<id>[\/\w-]+)',
     71                        '/' . $this->rest_base . '/(?P<id>[\/\w\.-]+)',
    7272                        array(
    7373                                'args'   => array(
    7474                                        'id' => array(