Opened 16 months ago
Last modified 15 months ago
#63299 assigned enhancement
WP_Theme: Add "has_theme_json" method
| Reported by: | wildworks | Owned by: | wildworks |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Themes | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
We plan to expose the has_theme_json field in the Theme Rest API in #63253. However, because the wp_theme_has_theme_json() function is based on the active theme, the has_theme_json field is not correct when fetching the theme collection with the following code, for example:
wp.data.select( 'core' ).getEntityRecords( 'root', 'theme', { per_page: -1, _fields: [ 'stylesheet', 'has_theme_json', 'is_block_theme' ] } );
To solve this, I think we need a has_theme_json() method, similar to the block_theme() method.
Change History (3)
This ticket was mentioned in PR #8705 on WordPress/wordpress-develop by @wildworks.
16 months ago
#3
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Trac ticket: https://core.trac.wordpress.org/ticket/63299