WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/26/2019 08:30:59 PM (2 years ago)
Author:
whyisjake
Message:

Menus: Replace http with https in placeholders.

Encourage the use of https with the placeholder text in menus.

Fixes #46312
Props aksl95, audrasjb, celloexpressions, SergeyBiryukov, jorbin.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/nav-menu.php

    r46309 r46330  
    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="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://" />
    296296        </p>
    297297
     
    919919                    ! isset( $_item_object_data['menu-item-type'] ) ||
    920920                    // Or URL is the default.
    921                     in_array( $_item_object_data['menu-item-url'], array( 'http://', '' ) ) ||
     921                    in_array( $_item_object_data['menu-item-url'], array( 'https://', 'http://', '' ) ) ||
    922922                    ! ( '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)
    923923                    // Or it *is* a custom menu item that already exists.
Note: See TracChangeset for help on using the changeset viewer.