Ticket #32464: 32464.3.patch
File 32464.3.patch, 1.0 KB (added by , 9 years ago) |
---|
-
src/wp-includes/nav-menu-template.php
325 325 326 326 $show_container = false; 327 327 if ( $args->container ) { 328 329 if ( ! is_string( $args->container ) ) { 330 $args->container = 'div'; 331 } 332 328 333 /** 329 334 * Filter the list of HTML tags that are valid for use as menu containers. 330 335 * … … 334 339 * Default is array containing 'div' and 'nav'. 335 340 */ 336 341 $allowed_tags = apply_filters( 'wp_nav_menu_container_allowedtags', array( 'div', 'nav' ) ); 337 if ( is_string( $args->container ) && in_array( $args->container, $allowed_tags ) ) { 342 343 if ( in_array( $args->container, $allowed_tags ) ) { 338 344 $show_container = true; 339 345 $class = $args->container_class ? ' class="' . esc_attr( $args->container_class ) . '"' : ' class="menu-'. $menu->slug .'-container"'; 340 346 $id = $args->container_id ? ' id="' . esc_attr( $args->container_id ) . '"' : '';