[wp-trac] Re: [WordPress Trac] #6424: erroneous widget count for sidebars

WordPress Trac wp-trac at lists.automattic.com
Fri Mar 28 00:54:20 GMT 2008


#6424: erroneous widget count for sidebars
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |        Owner:  anonymous
     Type:  defect             |       Status:  new      
 Priority:  lowest             |    Milestone:  2.5      
Component:  Administration     |      Version:  2.5      
 Severity:  trivial            |   Resolution:           
 Keywords:  needs-patch        |  
-------------------------------+--------------------------------------------
Changes (by Viper007Bond):

  * keywords:  => needs-patch
  * priority:  low => lowest
  * severity:  minor => trivial

Comment:

 Thought I'd throw in an explanation of what's going on since I've been
 working with widgets lately.

 This is happening because that plugin's widget is still technically in the
 sidebar, but it just doesn't show up because it doesn't exist. Note that
 if you re-activate the plugin, the widget will be back in your sidebar
 exactly where you put it rather than on the left side in the unused
 widgets list. If you hit save which will refresh the sidebar array, the
 non-existent widget will be removed.

 This inaccurate count occurs because that number is just a simple
 `count($widgets)` and done before the widgets are outputted and actually
 checked to see if they exist.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/6424#comment:1>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list