[wp-trac] [WordPress Trac] #61112: Avoid re-constructing `WP_Theme_JSON` object from raw theme_json, instead use `WP_Theme_JSON` object inside `WP_Theme_JSON_data`

WordPress Trac noreply at wordpress.org
Wed Jun 19 16:39:23 UTC 2024


#61112: Avoid re-constructing `WP_Theme_JSON` object from raw theme_json, instead
use `WP_Theme_JSON` object inside `WP_Theme_JSON_data`
-------------------------------------------------+-------------------------
 Reporter:  thekt12                              |       Owner:  thekt12
     Type:  defect (bug)                         |      Status:  reopened
 Priority:  normal                               |   Milestone:  6.6
Component:  General                              |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-testing-info needs-    |     Focuses:
  testing                                        |  performance
-------------------------------------------------+-------------------------

Comment (by joemcgill):

 In [changeset:"58443" 58443]:
 {{{
 #!CommitTicketReference repository="" revision="58443"
 Editor: Improve compatibility for `WP_Theme_JSON_Data`.

 This checks that objects returned from any of the `wp_theme_json_data_`
 filters are `WP_Theme_JSON_Data` objects in order to avoid
 incompatibilities. Otherwise, reprocess the theme.json data as new
 `WP_Theme_JSON` objects to ensure the data matches the expectations of
 code consuming that data.

 Follow-up to [58185].

 Props joemcgill, adamsilverstein, oandregal, ryelle, ocean90, pbearne.
 See #61112.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61112#comment:32>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list