Make WordPress Core

Opened 14 years ago

Closed 11 years ago

#20257 closed enhancement (wontfix)

Url of navigation menu item of alternative type removed

Reported by: stephenh1988 Owned by:
Priority: normal Milestone:
Component: Menus Version: 3.3.1
Severity: normal Keywords: close reporter-feedback
Cc: Focuses:

Description

When creating a new navigation menu item with wp_update_nav_menu_item the url is removed if the type of the item is not 'custom'. If the type of the item is 'taxonomy' or 'post_type', the url is then set appropriately. However, if the item has a type other than 'custom','taxonomy', or 'post_type' the menu item is saved without an url.

wp-includes/nav-menu.php L314

if ( 'custom' != $args['menu-item-type'] ) {
     /* if non-custom menu item, then:
     * use original object's URL
     * blank default title to sync with original object's
     */

     $args['menu-item-url'] = '';

Attachments (1)

20257.patch (788 bytes ) - added by ocean90 12 years ago.

Download all attachments as: .zip

Change History (4)

#1 @stephenh1988
14 years ago

  • Cc stephen@… added

@ocean90
12 years ago

#2 @ocean90
12 years ago

  • Keywords close reporter-feedback added
  • Type defect (bug)enhancement

Hello stephenh1988, sorry you never got a response.

Why do you need an alternative type? Is this the only issue when using a new object type? If yes, something like 20257.patch could work. But for the UI Walker_Nav_Menu_Edit needs probably some changes too.

But I'm more in favor of wontfix since the ticket has had no traction in two years.

#3 @wonderboymusic
11 years ago

  • Milestone Awaiting Review
  • Resolutionwontfix
  • Status newclosed

comment:2 asked for reporter feedback 19 months ago, at which point ocean90 suggested wontfix

Note: See TracTickets for help on using tickets.