mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Create a default menu containing the first 15 top-level pages. see #11817
git-svn-id: https://develop.svn.wordpress.org/trunk@13406 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -56,6 +56,12 @@ if ( isset( $_POST[ 'delete-menu' ] ) && $menu_selected_id > 0 ) {
|
||||
|
||||
// Default Menu to show
|
||||
$custom_menus = wp_get_nav_menus();
|
||||
|
||||
if ( empty($custom_menus) && empty($_POST) ) {
|
||||
wp_create_default_nav_menu();
|
||||
$custom_menus = wp_get_nav_menus();
|
||||
}
|
||||
|
||||
if ( ! $menu_selected_id && ! empty( $custom_menus ) )
|
||||
$menu_selected_id = $custom_menus[0]->term_id;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user