mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
After [34200], force 'before' and 'after' to <ul>
and </ul>
when wp_nav_menu()
falls back to wp_page_menu()
.
See #11095. Built from https://develop.svn.wordpress.org/trunk@34653 git-svn-id: http://core.svn.wordpress.org/trunk@34617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a908b87996
commit
b4ed533e66
@ -1264,10 +1264,21 @@ function wp_page_menu( $args = array() ) {
|
|||||||
$list_args['title_li'] = '';
|
$list_args['title_li'] = '';
|
||||||
$menu .= str_replace( array( "\r", "\n", "\t" ), '', wp_list_pages($list_args) );
|
$menu .= str_replace( array( "\r", "\n", "\t" ), '', wp_list_pages($list_args) );
|
||||||
|
|
||||||
|
$container = sanitize_text_field( $args['container'] );
|
||||||
|
|
||||||
if ( $menu ) {
|
if ( $menu ) {
|
||||||
|
|
||||||
|
// wp_nav_menu doesn't set before and after
|
||||||
|
if ( isset( $args['fallback_cb'] ) &&
|
||||||
|
'wp_page_menu' === $args['fallback_cb'] &&
|
||||||
|
'ul' !== $container ) {
|
||||||
|
$args['before'] = '<ul>';
|
||||||
|
$args['after'] = '</ul>';
|
||||||
|
}
|
||||||
|
|
||||||
$menu = $args['before'] . $menu . $args['after'];
|
$menu = $args['before'] . $menu . $args['after'];
|
||||||
}
|
}
|
||||||
$container = sanitize_text_field( $args['container'] );
|
|
||||||
$attrs = '';
|
$attrs = '';
|
||||||
if ( ! empty( $args['menu_id'] ) ) {
|
if ( ! empty( $args['menu_id'] ) ) {
|
||||||
$attrs .= ' id="' . esc_attr( $args['menu_id'] ) . '"';
|
$attrs .= ' id="' . esc_attr( $args['menu_id'] ) . '"';
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.4-alpha-34652';
|
$wp_version = '4.4-alpha-34653';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user