WordPress.org

Make WordPress Core

Ticket #12566: nav-menus-custom-url-save.diff

File nav-menus-custom-url-save.diff, 840 bytes (added by yoavf, 4 years ago)

Fix bug where custom urls weren't saved in the menu editor

  • wp-admin/nav-menus.php

     
    128128                $object_id = isset( $_POST['item-postmenu'.$k] )? $_POST['item-postmenu'.$k] : 0; 
    129129                $parent_id = isset( $_POST['item-parent'.$k] )? $_POST['item-parent'.$k] : 0; 
    130130                $custom_title = isset( $_POST['item-title'.$k] )?  $_POST['item-title'.$k] : ''; 
    131                 $custom_linkurl = ( isset( $_POST['item-url'.$k] ) && 'custom' == $_POST['linktype'.$k] ) ? $_POST['item-url'.$k] : ''; 
     131                $custom_linkurl = ( isset( $_POST['item-url'.$k] ) && 'Custom' == $_POST['item-type'.$k] ) ? $_POST['item-url'.$k] : ''; 
    132132                $custom_description = isset( $_POST['item-description'.$k] )? $_POST['item-description'.$k] : ''; 
    133133 
    134134                // doesn't seem to be used by UI