Opened 14 months ago
Last modified 14 months ago
#20257 new defect (bug)
Url of navigation menu item of alternative type removed
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Menus | Version: | 3.3.1 |
| Severity: | normal | Keywords: | |
| Cc: | stephen@… |
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'] = '';
Note: See
TracTickets for help on using
tickets.
