[wp-trac] [WordPress Trac] #59969: Conditional loading `build_template_part_block_variations` for performance improvement
WordPress Trac
noreply at wordpress.org
Mon Jan 22 11:01:11 UTC 2024
#59969: Conditional loading `build_template_part_block_variations` for performance
improvement
--------------------------------------+--------------------------
Reporter: thekt12 | Owner: joemcgill
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.5
Component: General | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch needs-dev-note | Focuses: performance
--------------------------------------+--------------------------
Comment (by thekt12):
@gaambo `variations_callback` execution happens only when you try to
access `$block_type->variations` (which should be way later than any other
post-term, navigation queries), meaning using it should solve your
problem.
I would highly recommend trying `variation_callback` first. If not then go
for the `get_block_type_variations` filter.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59969#comment:50>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list