Template: Add fallback for empty containers.

Since [14031] the container can be omitted in `wp_nav_menu()`. It can not
however in `wp_page_menu()`, which creates a conflict if it is set as
the fallback, Let's make sure there is always a valid container tag.

Fixes #33974.


Built from https://develop.svn.wordpress.org/trunk@34950


git-svn-id: http://core.svn.wordpress.org/trunk@34915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Konstantin Obenland 2015-10-08 18:27:25 +00:00
parent 45bda3af69
commit b5be742e1f
2 changed files with 6 additions and 1 deletions

View File

@ -1275,6 +1275,11 @@ function wp_page_menu( $args = array() ) {
$container = sanitize_text_field( $args['container'] );
// Fallback in case `wp_nav_menu()` was called without a container.
if ( empty( $container ) ) {
$container = 'div';
}
if ( $menu ) {
// wp_nav_menu doesn't set before and after

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-alpha-34949';
$wp_version = '4.4-alpha-34950';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.