Widget will not be shown in case of its id includes upper characters
|Reported by:||kamiyeye||Owned by:||azaozz|
A widget with its id/id_base includes at least one upper character
- Access the back-end page 'Appearance->Widget'
- Drag the widget to a sidebar
- Simply refresh the page
The widget is shown on that sidebar
The widget isn't shown on that sidebar
Before a widget is registered ,the field 'id' is lowered, say:
-- line 557,function wp_register_sidebar_widget,file widgets.php--- $id = strtolower($id);
But 'id' stored in new WP_Widget class is not lowered:
-- line 90, function __construct, file widgets.php----------------- $this->id_base = empty($id_base) ? preg_replace( '/(wp_)?widget_/', '', strtolower(get_class($this)) ) : $id_base;
I gathered from these that why the widget isn't shown is because no widgets with such an id(has some upper characters) found in the registered widgets(all ids are lowered), am i right?
It tooks me several hours on this issue, i reviewed my widget codes again and again, every time, couldn't found any fault.I were almost mad before i caught the damned issue. Now, it's yours.