Make WordPress Core

Opened 10 years ago

Closed 6 years ago

#20257 closed enhancement (wontfix)

Url of navigation menu item of alternative type removed

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


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 8 years ago.

Download all attachments as: .zip

Change History (4)

#1 @stephenh1988
10 years ago

  • Cc stephen@… added

8 years ago

#2 @ocean90
8 years ago

  • Keywords close reporter-feedback added
  • Type changed from defect (bug) to 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
6 years ago

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

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

Note: See TracTickets for help on using tickets.