diff -r c7c34916027a -r 177826044cd9 wp/wp-includes/class-wp-widget-factory.php --- a/wp/wp-includes/class-wp-widget-factory.php Mon Oct 14 18:06:33 2019 +0200 +++ b/wp/wp-includes/class-wp-widget-factory.php Mon Oct 14 18:28:13 2019 +0200 @@ -71,13 +71,13 @@ return spl_object_hash( $widget ); } else { $class_name = get_class( $widget ); - $hash = $class_name; + $hash = $class_name; if ( ! isset( $widget->_wp_widget_factory_hash_id ) ) { if ( ! isset( $this->hashed_class_counts[ $class_name ] ) ) { $this->hashed_class_counts[ $class_name ] = 0; } $this->hashed_class_counts[ $class_name ] += 1; - $widget->_wp_widget_factory_hash_id = $this->hashed_class_counts[ $class_name ]; + $widget->_wp_widget_factory_hash_id = $this->hashed_class_counts[ $class_name ]; } $hash .= ':' . $widget->_wp_widget_factory_hash_id; return $hash; @@ -127,18 +127,18 @@ */ public function _register_widgets() { global $wp_registered_widgets; - $keys = array_keys($this->widgets); - $registered = array_keys($wp_registered_widgets); - $registered = array_map('_get_widget_id_base', $registered); + $keys = array_keys( $this->widgets ); + $registered = array_keys( $wp_registered_widgets ); + $registered = array_map( '_get_widget_id_base', $registered ); foreach ( $keys as $key ) { // don't register new widget if old widget with the same id is already registered - if ( in_array($this->widgets[$key]->id_base, $registered, true) ) { - unset($this->widgets[$key]); + if ( in_array( $this->widgets[ $key ]->id_base, $registered, true ) ) { + unset( $this->widgets[ $key ] ); continue; } - $this->widgets[$key]->_register(); + $this->widgets[ $key ]->_register(); } } }