diff --git wp-admin/includes/deprecated.php wp-admin/includes/deprecated.php
index ab5ddafd17..3413c11af2 100644
|
|
function post_form_autocomplete_off() { |
1491 | 1491 | echo ' autocomplete="off"'; |
1492 | 1492 | } |
1493 | 1493 | } |
| 1494 | |
| 1495 | /** |
| 1496 | * This was once used to limit the amount of meta boxes to pages, posts, links, and categories for first time users. |
| 1497 | * |
| 1498 | * @since 3.0.0 |
| 1499 | * @deprecated 4.9.0 |
| 1500 | * @access private |
| 1501 | * |
| 1502 | * @global array $wp_meta_boxes |
| 1503 | **/ |
| 1504 | function wp_initial_nav_menu_meta_boxes() { |
| 1505 | _deprecated_function( __FUNCTION__, '4.9.0' ); |
| 1506 | } |
diff --git wp-admin/includes/nav-menu.php wp-admin/includes/nav-menu.php
index a6aac33053..01dac127c9 100644
|
|
function wp_nav_menu_setup() { |
153 | 153 | } |
154 | 154 | } |
155 | 155 | |
156 | | /** |
157 | | * Limit the amount of meta boxes to pages, posts, links, and categories for first time users. |
158 | | * |
159 | | * @since 3.0.0 |
160 | | * |
161 | | * @global array $wp_meta_boxes |
162 | | **/ |
163 | | function wp_initial_nav_menu_meta_boxes() { |
164 | | global $wp_meta_boxes; |
165 | | |
166 | | if ( get_user_option( 'metaboxhidden_nav-menus' ) !== false || ! is_array($wp_meta_boxes) ) |
167 | | return; |
168 | | |
169 | | $initial_meta_boxes = array( 'add-post-type-page', 'add-post-type-post', 'add-custom-links', 'add-category' ); |
170 | | $hidden_meta_boxes = array(); |
171 | | |
172 | | foreach ( array_keys($wp_meta_boxes['nav-menus']) as $context ) { |
173 | | foreach ( array_keys($wp_meta_boxes['nav-menus'][$context]) as $priority ) { |
174 | | foreach ( $wp_meta_boxes['nav-menus'][$context][$priority] as $box ) { |
175 | | if ( in_array( $box['id'], $initial_meta_boxes ) ) { |
176 | | unset( $box['id'] ); |
177 | | } else { |
178 | | $hidden_meta_boxes[] = $box['id']; |
179 | | } |
180 | | } |
181 | | } |
182 | | } |
183 | | |
184 | | $user = wp_get_current_user(); |
185 | | update_user_option( $user->ID, 'metaboxhidden_nav-menus', $hidden_meta_boxes, true ); |
186 | | } |
187 | | |
188 | 156 | /** |
189 | 157 | * Creates meta boxes for any post type menu item.. |
190 | 158 | * |
diff --git wp-admin/nav-menus.php wp-admin/nav-menus.php
index d8fc77f01d..a77b596e34 100644
|
|
function wp_nav_menu_max_depth( $classes ) { |
511 | 511 | add_filter('admin_body_class', 'wp_nav_menu_max_depth'); |
512 | 512 | |
513 | 513 | wp_nav_menu_setup(); |
514 | | wp_initial_nav_menu_meta_boxes(); |
515 | 514 | |
516 | 515 | if ( ! current_theme_supports( 'menus' ) && ! $num_locations ) |
517 | 516 | $messages[] = '<div id="message" class="updated"><p>' . sprintf( __( 'Your theme does not natively support menus, but you can use them in sidebars by adding a “Custom Menu” widget on the <a href="%s">Widgets</a> screen.' ), admin_url( 'widgets.php' ) ) . '</p></div>'; |