mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Always register all widgets, props hakre, fixes #10954
git-svn-id: http://svn.automattic.com/wordpress/trunk@12249 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4cb414fc17
commit
fce64c00bc
@ -126,20 +126,24 @@ class WP_Widget {
|
||||
|
||||
function _register() {
|
||||
$settings = $this->get_settings();
|
||||
$empty = true;
|
||||
|
||||
if ( empty($settings) ) {
|
||||
// If there are none, we register the widget's existance with a
|
||||
// generic template
|
||||
$this->_set(1);
|
||||
$this->_register_one();
|
||||
} elseif ( is_array($settings) ) {
|
||||
if ( is_array($settings) ) {
|
||||
foreach ( array_keys($settings) as $number ) {
|
||||
if ( is_numeric($number) ) {
|
||||
$this->_set($number);
|
||||
$this->_register_one($number);
|
||||
$empty = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( $empty ) {
|
||||
// If there are none, we register the widget's existance with a
|
||||
// generic template
|
||||
$this->_set(1);
|
||||
$this->_register_one();
|
||||
}
|
||||
}
|
||||
|
||||
function _set($number) {
|
||||
|
Loading…
Reference in New Issue
Block a user