[wp-trac] [WordPress Trac] #59137: Add `wp_get_theme_data_custom_templates` function
WordPress Trac
noreply at wordpress.org
Fri Aug 18 08:44:30 UTC 2023
#59137: Add `wp_get_theme_data_custom_templates` function
-------------------------+-----------------------
Reporter: oandregal | Owner: oandregal
Type: enhancement | Status: assigned
Priority: normal | Milestone: 6.4
Component: Themes | Version:
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------
We lack a public function `wp_get_theme_data_custom_templates` to offer
access to metadata stored under `customTemplates` in `theme.json`.
## Why
There is a no public function to get access to that data, so consumers
need to resort to private APIs. This follows the steps of
`wp_get_global_settings`, `wp_theme_has_theme_json`,
`wp_get_theme_directory_pattern_slugs`, and
`wp_get_theme_data_template_parts`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59137>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list