Make WordPress Core


Ignore:
Timestamp:
11/05/2021 02:29:32 AM (5 years ago)
Author:
TimothyBlynJacobs
Message:

REST API: Support subdirectory themes in the Themes controller.

This allows for themes that are included inside of a subdirectory, for example subdir/my-theme, to be accessed via the single item route of the /wp/v2/themes controller.

Fixes #54349.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-schema-setup.php

    r51568 r52017  
    138138                        '/wp/v2/templates/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)',
    139139                        '/wp/v2/themes',
    140                         '/wp/v2/themes/(?P<stylesheet>[\w-]+)',
     140                        '/wp/v2/themes/(?P<stylesheet>[^.\/]+(?:\/[^.\/]+)?)',
    141141                        '/wp/v2/plugins',
    142142                        '/wp/v2/plugins/(?P<plugin>[^.\/]+(?:\/[^.\/]+)?)',
Note: See TracChangeset for help on using the changeset viewer.