[wp-trac] [WordPress Trac] #20257: Url of navigation menu item of alternative type removed
WordPress Trac
wp-trac at lists.automattic.com
Sun Mar 18 19:49:27 UTC 2012
#20257: Url of navigation menu item of alternative type removed
--------------------------+-----------------------------
Reporter: stephenh1988 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Menus | Version: 3.3.1
Severity: normal | Keywords:
--------------------------+-----------------------------
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'] = '';
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20257>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list