#16691 closed feature request (duplicate)
Add do_action or menu description in nav-menus.php
Reported by: | linguasite | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.1 |
Component: | Menus | Keywords: | needs-patch |
Focuses: | Cc: |
Description
The nav menu feature uses the taxonomy structure but does not use i.e. the term description.
This field could be used by adding an action in wp-admin/nav-menus.php, for example in line 538 or 552.
<label class="menu-name-label howto open-label" for="menu-name"> <span><?php _e('Menu Name'); ?></span> <input name="menu-name" id="menu-name" type="text" class="menu-name regular-text menu-item-textbox input-with-default-title" title="<?php esc_attr_e('Enter menu name here'); ?>" value="<?php echo esc_attr( $nav_menu_selected_title ); ?>" /> </label> <?php if ( !empty( $nav_menu_selected_id ) ) : if ( ! isset( $auto_add ) ) { $auto_add = get_option( 'nav_menu_options' ); if ( ! isset( $auto_add['auto_add'] ) ) $auto_add = false; elseif ( false !== array_search( $nav_menu_selected_id, $auto_add['auto_add'] ) ) $auto_add = true; else $auto_add = false; } ?> <div class="auto-add-pages"> <label class="howto"><input type="checkbox"<?php checked( $auto_add ); ?> name="auto-add-pages" value="1" /> <?php printf( __('Automatically add new top-level pages' ), esc_url( admin_url( 'edit.php?post_type=page' ) ) ); ?></label> </div> <?php endif; ?>
This would allow plugin developers to add additional fields or settings for nav menus and save them on updating or saving the menu.
Change History (4)
Note: See
TracTickets for help on using
tickets.
Related: #18584