Changeset 57328
- Timestamp:
- 01/23/2024 05:36:40 AM (8 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-supports/layout.php
r57246 r57328 616 616 } 617 617 return $processor->get_updated_html(); 618 } elseif ( ! $block_supports_layout ) { 619 // Ensure layout classnames are not injected if there is no layout support. 620 return $block_content; 618 621 } 619 622 -
trunk/tests/phpunit/tests/block-supports/layout.php
r57246 r57328 172 172 * @ticket 57584 173 173 * @ticket 58548 174 * @ticket 60292 174 175 * 175 176 * @dataProvider data_layout_support_flag_renders_classnames_on_wrapper … … 251 252 'expected_output' => '<div class="wp-block-group"><div class="wp-block-group__inner-wrapper is-layout-flow wp-block-group-is-layout-flow"></div></div>', 252 253 ), 254 'skip classname output if block does not support layout and there are no child layout classes to be output' => array( 255 'args' => array( 256 'block_content' => '<p>A paragraph</p>', 257 'block' => array( 258 'blockName' => 'core/paragraph', 259 'attrs' => array( 260 'style' => array( 261 'layout' => array( 262 'selfStretch' => 'fit', 263 ), 264 ), 265 ), 266 'innerBlocks' => array(), 267 'innerHTML' => '<p>A paragraph</p>', 268 'innerContent' => array( '<p>A paragraph</p>' ), 269 ), 270 ), 271 'expected_output' => '<p>A paragraph</p>', 272 ), 253 273 ); 254 274 }
Note: See TracChangeset
for help on using the changeset viewer.