[wp-trac] [WordPress Trac] #62234: Theme JSON: remove redundant check and relocate $selectors assignment in get_block_nodes()
WordPress Trac
noreply at wordpress.org
Mon Oct 21 04:46:56 UTC 2024
#62234: Theme JSON: remove redundant check and relocate $selectors assignment in
get_block_nodes()
---------------------------------------+-------------------------
Reporter: ramonopoly | Owner: ramonopoly
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.7
Component: Themes | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch gutenberg-merge | Focuses:
---------------------------------------+-------------------------
Changes (by ramonopoly):
* owner: (none) => ramonopoly
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"59262" 59262]:
{{{
#!CommitTicketReference repository="" revision="59262"
Theme JSON: remove redundant styles check and relocate $selectors
assignment.
In `WP_Theme_JSON::get_block_nodes()`, remove redundant check for
`$theme_json['styles']`, which means
`WP_Theme_JSON::get_blocks_metadata()` is only called if necessary.
Also skip unnecessary `$selector` assignment if only nodes are to be
returned.
Props ramonopoly, mukesh27.
Fixes #62234.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62234#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list