diff options
author | Yaco <franco@reevo.org> | 2019-10-04 16:03:20 -0300 |
---|---|---|
committer | Yaco <franco@reevo.org> | 2019-10-04 16:03:20 -0300 |
commit | ac6bedd68a70d744a927494351100e6bfabfe14e (patch) | |
tree | 7a9a7967a6244008edbc27055b205d936cb45b02 /www/crm/wp-includes/nav-menu.php | |
parent | b25b94b8b0aacab5a5a38bb107201c7f92c083ab (diff) |
Actualiza WP a 5.2.3
Diffstat (limited to 'www/crm/wp-includes/nav-menu.php')
-rw-r--r-- | www/crm/wp-includes/nav-menu.php | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/www/crm/wp-includes/nav-menu.php b/www/crm/wp-includes/nav-menu.php index 9b6eeba9..68a9e09c 100644 --- a/www/crm/wp-includes/nav-menu.php +++ b/www/crm/wp-includes/nav-menu.php @@ -456,11 +456,15 @@ function wp_update_nav_menu_item( $menu_id = 0, $menu_item_db_id = 0, $menu_item $original_parent = 0 < $menu_item_db_id ? get_post_field( 'post_parent', $menu_item_db_id ) : 0; - 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 - */ + if ( 'custom' === $args['menu-item-type'] ) { + // If custom menu item, trim the URL. + $args['menu-item-url'] = trim( $args['menu-item-url'] ); + } else { + /* + * If non-custom menu item, then: + * - use the original object's URL. + * - blank default title to sync with the original object's title. + */ $args['menu-item-url'] = ''; |