[wp-trac] [WordPress Trac] #59383: Blocks: Introduce helper function to retrieve hooked blocks
WordPress Trac
noreply at wordpress.org
Mon Sep 25 11:46:24 UTC 2023
#59383: Blocks: Introduce helper function to retrieve hooked blocks
--------------------------------------+-----------------------
Reporter: gziolo | Owner: gziolo
Type: enhancement | Status: reopened
Priority: normal | Milestone: 6.4
Component: Themes | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+-----------------------
Comment (by spacedmonkey):
In [changeset:"56677" 56677]:
{{{
#!CommitTicketReference repository="" revision="56677"
Themes: Use instanceof in get_hooked_blocks.
In [56610], the get_hooked_blocks function was introduced. However, using
property_exists within this function negatively impacted its performance.
This commit replaces the property_exists function call with instanceof
WP_Block_Type, resulting in improved performance.
Props gziolo, spacedmonkey.
See #59383.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59383#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list