WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/03/2009 05:27:13 AM (10 years ago)
Author:
azaozz
Message:

Widgets UI styling, see #9511

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/widgets.php

    r11155 r11160  
    824824    $sidebars_widgets = wp_get_sidebars_widgets(false);
    825825
    826     if ( is_array($sidebars_widgets) ) foreach ( $sidebars_widgets as $sidebar => $widgets )
    827         if ( 'wp_inactive_widgets' == $sidebar )
    828             continue;
    829 
    830         if ( is_array($widgets) ) foreach ( $widgets as $widget )
    831             if ( ( $callback && isset($wp_registered_widgets[$widget]['callback']) && $wp_registered_widgets[$widget]['callback'] == $callback ) || ( $id_base && preg_replace( '/-[0-9]+$/', '', $widget ) == $id_base ) ) {
    832                 if ( !$widget_id || $widget_id == $wp_registered_widgets[$widget]['id'] )
    833                     return $sidebar;
     826    if ( is_array($sidebars_widgets) ) {
     827        foreach ( $sidebars_widgets as $sidebar => $widgets ) {
     828            if ( is_array($widgets) ) {
     829                foreach ( $widgets as $widget ) {
     830                    if ( ( $callback && isset($wp_registered_widgets[$widget]['callback']) && $wp_registered_widgets[$widget]['callback'] == $callback ) || ( $id_base && preg_replace( '/-[0-9]+$/', '', $widget ) == $id_base ) ) {
     831                        if ( !$widget_id || $widget_id == $wp_registered_widgets[$widget]['id'] )
     832                            return $sidebar;
     833                    }
     834                }
    834835            }
    835 
     836        }
     837    }
    836838    return false;
    837839}
Note: See TracChangeset for help on using the changeset viewer.