WordPress.org

Make WordPress Core

Ticket #31643: 31634.diff

File 31634.diff, 933 bytes (added by welcher, 6 years ago)
  • src/wp-admin/widgets.php

     
    413413<?php
    414414
    415415foreach ( $theme_sidebars as $sidebar => $registered_sidebar ) {
    416         $wrap_class = 'widgets-holder-wrap';
    417         if ( !empty( $registered_sidebar['class'] ) )
    418                 $wrap_class .= ' sidebar-' . $registered_sidebar['class'];
     416        $wrap_class = array(
     417                'widgets-holder-wrap'
     418        );
     419        if ( !empty( $registered_sidebar['class'] ) ) {
     420                $wrap_class[] = ' sidebar-' . $registered_sidebar['class'];
     421        }
    419422
    420         if ( $i > 0 )
    421                 $wrap_class .= ' closed';
     423        if ( $i > 0 ) {
     424                $wrap_class[] = 'closed';
     425        }
    422426
     427        $wrap_class = join( ' ', apply_filters( 'registered_sidebar_wrap_class', $wrap_class, $i, $theme_sidebars, $sidebar, $registered_sidebar ) );
     428
    423429        if ( $split && $i == $split ) {
    424430                ?>
    425431                </div><div class="sidebars-column-2">