Make WordPress Core

Ticket #47707: nav-menu.php.diff

File nav-menu.php.diff, 1.4 KB (added by petersplugins, 6 years ago)

Code

  • wp-admin/includes/nav-menu.php

     
    292292                <input type="hidden" value="custom" name="menu-item[<?php echo $_nav_menu_placeholder; ?>][menu-item-type]" />
    293293                <p id="menu-item-url-wrap" class="wp-clearfix">
    294294                        <label class="howto" for="custom-menu-item-url"><?php _e( 'URL' ); ?></label>
    295                         <input id="custom-menu-item-url" name="menu-item[<?php echo $_nav_menu_placeholder; ?>][menu-item-url]" type="text" class="code menu-item-textbox" value="https://" />
     295                        <input id="custom-menu-item-url" name="menu-item[<?php echo $_nav_menu_placeholder; ?>][menu-item-url]" type="text" class="code menu-item-textbox" value="http://" />
    296296                </p>
    297297
    298298                <p id="menu-item-name-wrap" class="wp-clearfix">
     
    894894                                        // And item type either isn't set.
    895895                                        ! isset( $_item_object_data['menu-item-type'] ) ||
    896896                                        // Or URL is the default.
    897                                         in_array( $_item_object_data['menu-item-url'], array( 'http://', 'https://', '' ) ) ||
     897                                        in_array( $_item_object_data['menu-item-url'], array( 'http://', '' ) ) ||
    898898                                        ! ( 'custom' == $_item_object_data['menu-item-type'] && ! isset( $_item_object_data['menu-item-db-id'] ) ) || // or it's not a custom menu item (but not the custom home page)
    899899                                        // Or it *is* a custom menu item that already exists.
    900900                                        ! empty( $_item_object_data['menu-item-db-id'] )