Make WordPress Core

Ticket #59138: 59138.diff

File 59138.diff, 904 bytes (added by kushang78, 5 months ago)

Added patch for this ticket.

  • src/wp-includes/block-supports/layout.php

    diff --git a/src/wp-includes/block-supports/layout.php b/src/wp-includes/block-supports/layout.php
    index 67d6a3f1b7..dbf1117295 100644
    a b function wp_restore_image_outer_container( $block_content, $block ) { 
    982982        }
    983983        $content_classnames          = explode( ' ', $matches[2] );
    984984        $filtered_content_classnames = array_diff( $content_classnames, $wrapper_classnames );
     985        $filtered_merge_classes      = array_merge( $wrapper_classnames, $filtered_content_classnames );
    985986
    986         return '<div class="' . implode( ' ', $wrapper_classnames ) . '">' . $matches[1] . implode( ' ', $filtered_content_classnames ) . $matches[3] . '</div>';
     987    return $matches[1] . implode( ' ', $filtered_merge_classes ) . $matches[3];
    987988}
    988989
    989990add_filter( 'render_block_core/image', 'wp_restore_image_outer_container', 10, 2 );