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)
Change History (4)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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_Editneeds probably some changes too.But I'm more in favor of wontfix since the ticket has had no traction in two years.