[wp-trac] [WordPress Trac] #59969: Conditional loading `build_template_part_block_variations` for performance improvement
WordPress Trac
noreply at wordpress.org
Tue Jan 23 17:25:13 UTC 2024
#59969: Conditional loading `build_template_part_block_variations` for performance
improvement
--------------------------------------------+--------------------------
Reporter: thekt12 | Owner: joemcgill
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 6.5
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-dev-note close | Focuses: performance
--------------------------------------------+--------------------------
Changes (by joemcgill):
* keywords: has-patch needs-dev-note has-unit-tests => has-patch needs-
dev-note close
Comment:
After reviewing [https://github.com/WordPress/wordpress-develop/pull/5915
PR #5915], I'm leaning towards calling indirect modification of the
variations property unsupported. Instead, it would be better to either use
the `get_block_type_variations` filter to modify block variations at
runtime or to replace the whole array.
As a convenience, it would make sense to implement a proper PHP API for
registering/unregistering block variations
([https://github.com/WordPress/gutenberg/issues/47170 see related
Gutenberg issue]), but doing so is out of scope for this ticket.
Marking this to close, pending additional feedback on the indirect
modification question above.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59969#comment:66>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list