Make WordPress Core

Ticket #23423: 23423.patch

File 23423.patch, 758 bytes (added by tyxla, 9 years ago)

Refreshing patch to work with the new location of dynamic_sidebar()

  • src/wp-includes/widget-functions.php

     
    504504function dynamic_sidebar($index = 1) {
    505505        global $wp_registered_sidebars, $wp_registered_widgets;
    506506
    507         if ( is_int($index) ) {
     507        if ( is_int( $index ) ) {
    508508                $index = "sidebar-$index";
    509509        } else {
    510                 $index = sanitize_title($index);
     510                $sanitized_index = sanitize_title( $index );
    511511                foreach ( (array) $wp_registered_sidebars as $key => $value ) {
    512                         if ( sanitize_title($value['name']) == $index ) {
     512                        if ( sanitize_title( $value['name'] ) == $sanitized_index ) {
    513513                                $index = $key;
    514514                                break;
    515515                        }