Make WordPress Core

Changeset 58699

Timestamp:
07/09/2024 04:06:20 PM (3 weeks ago)
Author:
hellofromTonya
Message:

Editor: Fix ref values within block style variations.

Fixes an issue where block style variations that use ref values to reference styles elsewhere in theme.json weren't working.

Retrieves reference values when generating styles for block style variations. How? When retrieving variation data, to generate styles from, also retrieve any referenced values.

Reviewed by audrasjb.
Merges [58691] to the 6.6 branch.

Props aaronrobertshaw, andrewserong, ramonopoly.
Fixes #61589.

Location:
branches/6.6
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/6.6

  • branches/6.6/src/wp-includes/block-supports/block-style-variations.php

    r58466 r58699  
    4141}
    4242
     43
     44
     45
     46
     47
     48
     49
     50
     51
     52
     53
     54
     55
     56
     57
     58
     59
     60
     61
     62
     63
     64
     65
     66
     67
     68
     69
     70
     71
     72
     73
     74
     75
     76
     77
     78
    4379/**
    4480 * Render the block style variation's styles.
     
    82118        return $parsed_block;
    83119    }
     120
     121
     122
     123
     124
     125
    84126
    85127    $variation_instance = wp_create_block_style_variation_instance_name( $parsed_block, $variation );
  • branches/6.6/tests/phpunit/tests/block-supports/block-style-variations.php

    r58466 r58699  
    160160        $this->assertSameSetsWithIndex( $expected, $group_styles, 'Variation data does not match' );
    161161    }
     162
     163
     164
     165
     166
     167
     168
     169
     170
     171
     172
     173
     174
     175
     176
     177
     178
     179
     180
     181
     182
     183
     184
     185
     186
     187
     188
     189
     190
     191
     192
     193
     194
     195
     196
     197
     198
     199
     200
     201
     202
     203
     204
     205
     206
     207
     208
     209
     210
     211
     212
     213
     214
     215
     216
     217
     218
     219
     220
     221
     222
     223
     224
     225
     226
     227
     228
     229
     230
     231
     232
     233
     234
     235
    162236}
Note: See TracChangeset for help on using the changeset viewer.