diff --git a/src/js/_enqueues/lib/nav-menu.js b/src/js/_enqueues/lib/nav-menu.js
index 3f1f9a7480..ec0ce55b5c 100644
a
|
b
|
|
949 | 949 | |
950 | 950 | processMethod = processMethod || api.addMenuItemToBottom; |
951 | 951 | |
952 | | if ( '' === url || 'http://' == url ) { |
| 952 | if ( '' === url || 'https://' == url || 'http://' == url ) { |
953 | 953 | $('#customlinkdiv').addClass('form-invalid'); |
954 | 954 | return false; |
955 | 955 | } |
… |
… |
|
961 | 961 | $( '.customlinkdiv .spinner' ).removeClass( 'is-active' ); |
962 | 962 | // Set custom link form back to defaults |
963 | 963 | $('#custom-menu-item-name').val('').blur(); |
964 | | $('#custom-menu-item-url').val('http://'); |
| 964 | $( '#custom-menu-item-url' ).val( '' ).attr( 'placeholder', 'https://' ); |
965 | 965 | }); |
966 | 966 | }, |
967 | 967 | |
diff --git a/src/js/_enqueues/wp/customize/nav-menus.js b/src/js/_enqueues/wp/customize/nav-menus.js
index 19962019a7..91936c3b5c 100644
a
|
b
|
|
584 | 584 | this.currentMenuControl.addItemToMenu( menuItem ); |
585 | 585 | |
586 | 586 | // Reset the custom link form. |
587 | | itemUrl.val( 'http://' ); |
| 587 | itemUrl.val( '' ).attr( 'placeholder', 'https://' ); |
588 | 588 | itemName.val( '' ); |
589 | 589 | }, |
590 | 590 | |
diff --git a/src/wp-admin/includes/nav-menu.php b/src/wp-admin/includes/nav-menu.php
index 25fddcf6a0..5c3aa57b16 100644
a
|
b
|
function wp_nav_menu_item_link_meta_box() { |
292 | 292 | <input type="hidden" value="custom" name="menu-item[<?php echo $_nav_menu_placeholder; ?>][menu-item-type]" /> |
293 | 293 | <p id="menu-item-url-wrap" class="wp-clearfix"> |
294 | 294 | <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="http://" /> |
| 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" placeholder="https://" /> |
296 | 296 | </p> |
297 | 297 | |
298 | 298 | <p id="menu-item-name-wrap" class="wp-clearfix"> |
… |
… |
function wp_save_nav_menu_items( $menu_id = 0, $menu_data = array() ) { |
899 | 899 | // And item type either isn't set. |
900 | 900 | ! isset( $_item_object_data['menu-item-type'] ) || |
901 | 901 | // Or URL is the default. |
902 | | in_array( $_item_object_data['menu-item-url'], array( 'http://', '' ) ) || |
| 902 | in_array( $_item_object_data['menu-item-url'], array( 'https://', 'http://', '' ) ) || |
903 | 903 | ! ( '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) |
904 | 904 | // Or it *is* a custom menu item that already exists. |
905 | 905 | ! empty( $_item_object_data['menu-item-db-id'] ) |
diff --git a/src/wp-includes/class-wp-customize-nav-menus.php b/src/wp-includes/class-wp-customize-nav-menus.php
index 1316a6485c..44ac82a1e0 100644
a
|
b
|
final class WP_Customize_Nav_Menus { |
1192 | 1192 | <input type="hidden" value="custom" id="custom-menu-item-type" name="menu-item[-1][menu-item-type]" /> |
1193 | 1193 | <p id="menu-item-url-wrap" class="wp-clearfix"> |
1194 | 1194 | <label class="howto" for="custom-menu-item-url"><?php _e( 'URL' ); ?></label> |
1195 | | <input id="custom-menu-item-url" name="menu-item[-1][menu-item-url]" type="text" class="code menu-item-textbox" value="http://"> |
| 1195 | <input id="custom-menu-item-url" name="menu-item[-1][menu-item-url]" type="text" class="code menu-item-textbox" placeholder="https://"> |
1196 | 1196 | </p> |
1197 | 1197 | <p id="menu-item-name-wrap" class="wp-clearfix"> |
1198 | 1198 | <label class="howto" for="custom-menu-item-name"><?php _e( 'Link Text' ); ?></label> |