Opened 3 years ago
Closed 3 years ago
#54349 closed defect (bug) (fixed)
Themes controller does not handle themes in nested directories
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.9 | Priority: | normal |
Severity: | normal | Version: | 5.7 |
Component: | REST API | Keywords: | has-patch has-unit-tests |
Focuses: | Cc: |
Description ¶
WordPress supports nesting themes inside a directory to essentially have a theme "bundle". This is used, for example, by the Theme Experiments repo.
In WordPress 5.7 we added support for the Themes controller to query information for a specific theme, #50152. However, the Regex used to identify the theme stylesheet does not allow for a /
, meaning these nested themes cannot be addressed by the REST API.
Reported in https://github.com/WordPress/gutenberg/pull/35985.
Commits (1)
- [52017] REST API: Support subdirectory themes in the Themes controller.… by @TimothyBlynJacobs 3 years ago
Pull Requests
- Loading…
Change History (4)
This ticket was mentioned in PR #1793 on WordPress/wordpress-develop by TimothyBJacobs.
3 years ago
#1
- Keywords has-patch has-unit-tests added
#2
@ Core Committer
3 years ago
- Owner set to TimothyBlynJacobs
- Status changed from new to assigned
This copies the same handling from the Plugins controller, which has a similar situation where a plugin can either be a single-file plugin or inside a directory.
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 #35985.
Trac ticket: https://core.trac.wordpress.org/ticket/54349