[wp-trac] [WordPress Trac] #58123: Indicate when a theme supports the Site editor in the Themes REST API response
WordPress Trac
noreply at wordpress.org
Wed Jun 14 17:33:12 UTC 2023
#58123: Indicate when a theme supports the Site editor in the Themes REST API
response
-------------------------------------------------+-------------------------
Reporter: grantmkin | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 6.3
Component: REST API | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests has- | Focuses: rest-api
testing-info needs-testing has-screenshots |
-------------------------------------------------+-------------------------
Changes (by ironprogrammer):
* keywords: has-patch has-unit-tests =>
has-patch has-unit-tests has-testing-info needs-testing has-
screenshots
* milestone: Awaiting Review => 6.3
Comment:
Welcome back to Trac, and thanks for the ticket and PR, @grantmkin!
This LGTM 👍🏻 Moving into the 6.3 milestone for consideration.
== Test Report
Patch tested: https://github.com/WordPress/wordpress-develop/pull/4323
=== Steps to Test
1. Activate Gutenberg. This conveniently makes use of Core's
`wp/v2/themes` endpoint.
2. Activate a block theme. This is needed to make the Editor available.
3. Navigate to ''Appearance > Editor'' (`/wp-admin/site-editor.php`).
4. In the browser console, inspect the network connections (in Chrome this
is the Network tab), and filter results by "themes" and/or fetch/XHR
requests. Reload the page if nothing is there the first try.
5. Locate the request for `themes?context=edit...` and preview/inspect the
response.
6. 👀 Expand and inspect the data for each theme.
7. 🩹 Apply patch.
8. Refresh the page, and repeat Step 5.
9. 👀 Expand and inspect the data for each theme again.
=== Expected Results
After applying the patch:
- ✅ Observe that for block themes, the theme data includes
`is_block_theme: true`.
- ✅ Observe that for classic themes, the theme data includes
`is_block_theme: false`.
=== Environment
- Hardware: MacBook Pro Apple M1 Pro
- OS: macOS 13.4
- Browser: Google Chrome 114.0.5735.106
- Server: nginx/1.25.0
- PHP: 7.4.33
- WordPress: 6.3-alpha-55505-src
- Theme: twentytwentythree v1.1
- Active Plugins:
- gutenberg v16.0.0
=== Actual Results
- ✅ Block themes (like TT3) include `is_block_theme: true`.
- ✅ Classic themes (like TT) include `is_block_theme: false`.
=== Supplemental Artifacts
''Figure 1: Chrome DevTools Network tab `themes` endpoint response data
for block theme.''
[[Image(https://cldup.com/pW9NFLc0lD.png)]]
''Figure 2: Chrome DevTools Network tab `themes` endpoint response data
for classic theme.''
[[Image(https://cldup.com/spo24yaSEB.png)]]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58123#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list