Don't run sanitize_title on IDs in new widgets API to avoid performance overhead. fixes #5326
git-svn-id: http://svn.automattic.com/wordpress/trunk@6323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
964c6c72c1
commit
1ea72d5996
|
@ -86,8 +86,6 @@ function wp_register_sidebar_widget($id, $name, $output_callback, $options = arr
|
|||
|
||||
global $wp_registered_widgets, $wp_register_widget_defaults;
|
||||
|
||||
$id = sanitize_title($id);
|
||||
|
||||
if ( empty($output_callback) ) {
|
||||
unset($wp_registered_widgets[$id]);
|
||||
return;
|
||||
|
@ -142,8 +140,6 @@ 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, $wp_register_widget_defaults;
|
||||
|
||||
$id = sanitize_title($id);
|
||||
|
||||
if ( empty($control_callback) ) {
|
||||
unset($wp_registered_widget_controls[$id]);
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue