Changeset 46964 for trunk/src/wp-admin/widgets.php
- Timestamp:
- 12/16/2019 12:53:59 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/widgets.php
r45932 r46964 25 25 check_admin_referer( 'widgets-access' ); 26 26 27 $widgets_access = 'on' == $_GET['widgets-access'] ? 'on' : 'off';27 $widgets_access = 'on' === $_GET['widgets-access'] ? 'on' : 'off'; 28 28 set_user_setting( 'widgets_access', $widgets_access ); 29 29 } 30 30 31 if ( 'on' == $widgets_access ) {31 if ( 'on' === $widgets_access ) { 32 32 add_filter( 'admin_body_class', 'wp_widgets_access_body_class' ); 33 33 } else { … … 97 97 98 98 foreach ( $sidebars_widgets as $sidebar_id => $widgets ) { 99 if ( 'wp_inactive_widgets' == $sidebar_id ) {99 if ( 'wp_inactive_widgets' === $sidebar_id ) { 100 100 continue; 101 101 } … … 189 189 190 190 foreach ( (array) $wp_registered_widget_updates as $name => $control ) { 191 if ( $name != $id_base || ! is_callable( $control['callback'] ) ) {191 if ( $name !== $id_base || ! is_callable( $control['callback'] ) ) { 192 192 continue; 193 193 } … … 317 317 foreach ( $wp_registered_sidebars as $sbname => $sbvalue ) { 318 318 echo "\t\t<tr><td><label><input type='radio' name='sidebar' value='" . esc_attr( $sbname ) . "'" . checked( $sbname, $sidebar, false ) . " /> $sbvalue[name]</label></td><td>"; 319 if ( 'wp_inactive_widgets' == $sbname || 'orphaned_widgets'== substr( $sbname, 0, 16 ) ) {319 if ( 'wp_inactive_widgets' === $sbname || 'orphaned_widgets' === substr( $sbname, 0, 16 ) ) { 320 320 echo ' '; 321 321 } else { … … 457 457 $theme_sidebars = array(); 458 458 foreach ( $wp_registered_sidebars as $sidebar => $registered_sidebar ) { 459 if ( false !== strpos( $registered_sidebar['class'], 'inactive-sidebar' ) || 'orphaned_widgets' == substr( $sidebar, 0, 16 ) ) {459 if ( false !== strpos( $registered_sidebar['class'], 'inactive-sidebar' ) || 'orphaned_widgets' === substr( $sidebar, 0, 16 ) ) { 460 460 $wrap_class = 'widgets-holder-wrap'; 461 461 if ( ! empty( $registered_sidebar['class'] ) ) { … … 463 463 } 464 464 465 $is_inactive_widgets = 'wp_inactive_widgets' == $registered_sidebar['id'];465 $is_inactive_widgets = 'wp_inactive_widgets' === $registered_sidebar['id']; 466 466 ?> 467 467 <div class="<?php echo esc_attr( $wrap_class ); ?>"> … … 511 511 512 512 if ( $sidebars_count > 1 ) { 513 $split = ceil( $sidebars_count / 2 );513 $split = (int) ceil( $sidebars_count / 2 ); 514 514 } else { 515 515 $single_sidebar_class = ' single-sidebar'; … … 532 532 } 533 533 534 if ( $split && $i == $split ) {534 if ( $split && $i === $split ) { 535 535 ?> 536 536 </div><div class="sidebars-column-2">
Note: See TracChangeset
for help on using the changeset viewer.