mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
strtolower widget id. Props filosofo. fixes #6949
git-svn-id: https://develop.svn.wordpress.org/trunk@7915 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -95,6 +95,8 @@ function register_sidebar_widget($name, $output_callback, $classname = '') {
|
||||
function wp_register_sidebar_widget($id, $name, $output_callback, $options = array()) {
|
||||
global $wp_registered_widgets;
|
||||
|
||||
$id = strtolower($id);
|
||||
|
||||
if ( empty($output_callback) ) {
|
||||
unset($wp_registered_widgets[$id]);
|
||||
return;
|
||||
@@ -164,6 +166,8 @@ function register_widget_control($name, $control_callback, $width = '', $height
|
||||
*/
|
||||
function wp_register_widget_control($id, $name, $control_callback, $options = array()) {
|
||||
global $wp_registered_widget_controls;
|
||||
|
||||
$id = strtolower($id);
|
||||
|
||||
if ( empty($control_callback) ) {
|
||||
unset($wp_registered_widget_controls[$id]);
|
||||
|
||||
Reference in New Issue
Block a user