mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 09:07:59 +01:00
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:
parent
45bda3af69
commit
b5be742e1f
@ -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
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user