Changeset 26285 for trunk/src/wp-admin/widgets.php
- Timestamp:
- 11/20/2013 04:44:21 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/widgets.php
r26271 r26285 346 346 347 347 <?php 348 349 $theme_sidebars = array(); 348 350 foreach ( $wp_registered_sidebars as $sidebar => $registered_sidebar ) { 349 351 if ( false !== strpos( $registered_sidebar['class'], 'inactive-sidebar' ) || 'orphaned_widgets' == substr( $sidebar, 0, 16 ) ) { … … 352 354 $wrap_class .= ' ' . $registered_sidebar['class']; 353 355 354 ?> 355 356 ?> 356 357 <div class="<?php echo esc_attr( $wrap_class ); ?>"> 357 358 <div class="sidebar-name"> 358 359 <div class="sidebar-name-arrow"><br /></div> 359 <h3><?php echo esc_html( $registered_sidebar['name'] ); ?> 360 <span class="spinner"></span> 361 </h3> 360 <h3><?php echo esc_html( $registered_sidebar['name'] ); ?> <span class="spinner"></span></h3> 362 361 </div> 363 362 <div class="widget-holder inactive"> … … 366 365 </div> 367 366 </div> 368 <?php 367 <?php 368 } else { 369 $theme_sidebars[$sidebar] = $registered_sidebar; 369 370 } 370 371 } … … 376 377 <div class="widget-liquid-right"> 377 378 <div id="widgets-right"> 378 <?php 379 $i = 0; 380 foreach ( $wp_registered_sidebars as $sidebar => $registered_sidebar ) { 381 if ( false !== strpos( $registered_sidebar['class'], 'inactive-sidebar' ) || 'orphaned_widgets' == substr( $sidebar, 0, 16 ) ) 382 continue; 383 379 <div class="sidebars-column-1"> 380 <?php 381 382 $i = $split = 0; 383 $sidebars_count = count( $theme_sidebars ); 384 385 if ( $sidebars_count > 2 ) 386 $split = ceil( $sidebars_count / 2 ); 387 388 foreach ( $theme_sidebars as $sidebar => $registered_sidebar ) { 384 389 $wrap_class = 'widgets-holder-wrap'; 385 390 if ( !empty( $registered_sidebar['class'] ) ) 386 391 $wrap_class .= ' sidebar-' . $registered_sidebar['class']; 387 392 388 if ( $i ) 389 $wrap_class .= ' closed'; ?> 390 393 if ( $i > 0 ) 394 $wrap_class .= ' closed'; 395 396 if ( $split && $i == $split ) { 397 ?> 398 </div><div class="sidebars-column-2"> 399 <?php 400 } 401 402 ?> 391 403 <div class="<?php echo esc_attr( $wrap_class ); ?>"> 392 <div class="sidebar-name"> 393 <div class="sidebar-name-arrow"><br /></div> 394 <h3><?php echo esc_html( $registered_sidebar['name'] ); ?> 395 <span class="spinner"></span></h3></div> 396 <?php wp_list_widget_controls( $sidebar ); // Show the control forms for each of the widgets in this sidebar ?> 397 </div> 398 <?php 404 <div class="sidebar-name"> 405 <div class="sidebar-name-arrow"><br /></div> 406 <h3><?php echo esc_html( $registered_sidebar['name'] ); ?> <span class="spinner"></span></h3> 407 </div> 408 <?php wp_list_widget_controls( $sidebar ); // Show the control forms for each of the widgets in this sidebar ?> 409 </div> 410 <?php 411 399 412 $i++; 400 } ?> 413 } 414 415 ?> 416 </div> 401 417 </div> 402 418 </div>
Note: See TracChangeset
for help on using the changeset viewer.