From af32dce26ad49fe36820b335db0d133211bb152b Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sat, 28 Apr 2007 06:08:27 +0000 Subject: [PATCH] Create widget id from widget name when id not specified. git-svn-id: https://develop.svn.wordpress.org/trunk@5338 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/widgets.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php index f701232f13..878981c744 100644 --- a/wp-includes/widgets.php +++ b/wp-includes/widgets.php @@ -81,7 +81,7 @@ function register_sidebar_widget($name, $output_callback, $classname = '', $id = } // Last resort -- this can be broken when names get translated so please provide a unique id. - if ( !isset($id) ) + if ( empty($id) ) $id = sanitize_title($name); if ( (!isset($classname) || empty($classname) || !is_string($classname)) && is_string($output_callback) ) @@ -122,7 +122,7 @@ function register_widget_control($name, $control_callback, $width = 300, $height $name = $name[0]; } - if ( !isset($id) || empty($id) ) + if ( empty($id) ) $id = $name; $id = sanitize_title($id);