WordPress 4.4.1
[autoinstalls/wordpress.git] / wp-includes / widgets.php
index 5a2f58c5dcab35de38f1717f5bf9f564b916d390..cfc5b93cc298879447b588ceddf8e4cd4ea96a4b 100644 (file)
@@ -607,9 +607,9 @@ function dynamic_sidebar( $index = 1 ) {
        if ( is_int( $index ) ) {
                $index = "sidebar-$index";
        } else {
-               $sanitized_index = sanitize_title( $index );
+               $index = sanitize_title( $index );
                foreach ( (array) $wp_registered_sidebars as $key => $value ) {
-                       if ( sanitize_title( $value['name'] ) == $sanitized_index ) {
+                       if ( sanitize_title( $value['name'] ) == $index ) {
                                $index = $key;
                                break;
                        }