Fix variations reference issue - Trac 60309#58072
Fix variations reference issue - Trac 60309#58072kt-12 wants to merge 3 commits intoWordPress:trunkfrom
Conversation
| } | ||
|
|
||
| $navigation_block_type->variations[] = $variation; | ||
| $navigation_block_type->variations = array_merge( $navigation_block_type->variations, $variation ); |
There was a problem hiding this comment.
This will not fixed the issue as
gutenberg/packages/block-library/src/navigation-link/index.php
Lines 360 to 363 in 2bc59bd
|
I think we can also revert changes introduced in #56100. The hook registration order is not important now that variations are lazily evaluated. |
|
@kt-12 Idea. We add new function for adding / removing variants. |
joemcgill
left a comment
There was a problem hiding this comment.
The PHPUnit failures have been fixed via #58090 (which is the same approach being suggested here).
If we're going to address directly modifying registered variations as a valid back-compat concern, those PHPUnit tests should be added to the core tests suite that covers the main API for the block type registry, rather than only having tests in this repo for that behavior.
What?
Fixes
WordPress/wordpress-develop#5718 (comment)
Detailed issue in the description - https://core.trac.wordpress.org/ticket/60309#ticket
Why?
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast