[wp-trac] [WordPress Trac] #62399: Theme JSON: include block style variations in path only output of get_block_nodes

WordPress Trac noreply at wordpress.org
Tue Nov 19 04:42:34 UTC 2024


#62399: Theme JSON: include block style variations in path only output of
get_block_nodes
--------------------------------------+-------------------------
 Reporter:  ramonopoly                |       Owner:  ramonopoly
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  6.8
Component:  General                   |     Version:
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-------------------------
Changes (by ramonopoly):

 * owner:  (none) => ramonopoly
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"59418" 59418]:
 {{{
 #!CommitTicketReference repository="" revision="59418"
 Theme JSON: include block style variations in path only output of
 get_block_nodes

 An `$include_node_paths_only` option to `get_block_nodes()` was introduced
 to improve performance.

 When set to `true`, this option tells the function to only return paths,
 and not selectors, for consumers that only needed paths to style values.

 For one of the conditional blocks, block style variations wasn't included.

 This commit adds them to the array of paths following the existing model
 `$node[]['path' => [], 'variations' => ['path' => []]]`.

 Follow-up to [61858].

 Props aaronrobertshaw, ramonopoly.
 Fixes #62399.
 }}}

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


More information about the wp-trac mailing list