mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Avoid notice with empty menu. Props ansimation, SergeyBiryukov. fixes #18085
git-svn-id: https://develop.svn.wordpress.org/trunk@18740 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -216,7 +216,7 @@ if ( apply_filters('custom_menu_order', false) ) {
|
||||
|
||||
// Remove the last menu item if it is a separator.
|
||||
$last_menu_key = array_pop( array_keys( $menu ) );
|
||||
if ( 'wp-menu-separator' == $menu[ $last_menu_key ][ 4 ] )
|
||||
if ( !empty( $menu ) && 'wp-menu-separator' == $menu[ $last_menu_key ][ 4 ] )
|
||||
unset( $menu[ $last_menu_key ] );
|
||||
unset( $last_menu_key );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user