[wp-trac] [WordPress Trac] #16691: Add do_action or menu description in nav-menus.php
WordPress Trac
wp-trac at lists.automattic.com
Sun Feb 27 17:54:14 UTC 2011
#16691: Add do_action or menu description in nav-menus.php
-----------------------------+-----------------------------
Reporter: linguasite | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version: 3.1
Severity: normal | Keywords:
-----------------------------+-----------------------------
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.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16691>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list