Make WordPress Core

Opened 14 years ago

Closed 9 years ago

Last modified 9 years ago

#16691 closed feature request (duplicate)

Add do_action or menu description in nav-menus.php

Reported by: linguasite's profile 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)

#1 @ocean90
13 years ago

  • Component changed from Administration to Menus
  • Keywords needs-patch added

#3 @chriscct7
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

1 request in 5 years. Closing as wontfix

#4 @DrewAPicture
9 years ago

  • Resolution changed from wontfix to duplicate

Duplicate of #18584.

Note: See TracTickets for help on using tickets.