Don't run sanitize_title on IDs in new widgets API to avoid performance overhead. fixes #5326
git-svn-id: https://develop.svn.wordpress.org/trunk@6323 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3330c693e4
commit
8893deff85
@ -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
Block a user