Make WordPress Core

Opened 9 years ago

Closed 2 years ago

#35685 closed enhancement (fixed)

Default HTTP schema when adding a custom link

Reported by: isdampe's profile isdampe Owned by:
Milestone: 5.3 Priority: low
Severity: minor Version:
Component: Menus Keywords: has-patch has-ui-feedback
Focuses: ui, administration Cc:

Description

When editing menus in Wordpress (nav-menus.php), the "Custom links" accordion input box always defaults to http://

I feel this should default to https:// if the WP install is running on SSL.

I can't speak for all, but I mostly use custom links for custom links that are already on my site, and if I'm running SSL, then I need to manually change http:// to https:// each time.

Most sites running SSL will only link to other secure sites and resources too, so this may be another point of confirmation.

Attachments (4)

nav-menu.patch (1.0 KB) - added by isdampe 9 years ago.
35685.diff (878 bytes) - added by christophherr 9 years ago.
Removes the default value from the Custom Links URL input field
35685-2.diff (1.8 KB) - added by christophherr 8 years ago.
Updated patch removes the default value from the Custom Links URL input field from Appearance - Menus and Appearance - Customize - Menus interactions
35685.2.diff (1.8 KB) - added by christophherr 8 years ago.

Download all attachments as: .zip

Change History (12)

@isdampe
9 years ago

#1 @Clorith
9 years ago

I wonder if the default value should perhaps be filterable at this point, as core becomes more open to interactions outside of the normal URL scope?

Creating a filter like wp_nav_menu_default_prefix might be an idea here, and also escaping the value before outputting it in the form.

#2 @johnbillion
9 years ago

  • Keywords needs-patch added
  • Priority changed from normal to low
  • Severity changed from normal to minor
  • Version 4.4 deleted

The current URL's scheme is not relevant to the home URL scheme (for example, sites that use FORCE_ADMIN_SSL but don't serve the front end over HTTPS).

My preference here would be to remove the default value entirely.

@christophherr
9 years ago

Removes the default value from the Custom Links URL input field

#3 @christophherr
9 years ago

  • Focuses ui added
  • Keywords has-patch ui-feedback added; needs-patch removed

The uploaded 35685.diff removes the default value.
I guess the UI change needs some feedback.

#4 @karmatosed
8 years ago

  • Keywords has-ui-feedback added; ui-feedback removed

@christophherr I agree that removing the default all together works. However, I notice it's only been removed through Appearance > Menus. It should also be removed in the Customizer menu interactions. If that can happen, I would agree this is ready to consider for commit, thanks.

@christophherr
8 years ago

Updated patch removes the default value from the Custom Links URL input field from Appearance - Menus and Appearance - Customize - Menus interactions

#5 @christophherr
8 years ago

Thank you, @karmatosed.

I attached an updated patch that removes the default value from the Customizer menu interactions as well.

#6 @karmatosed
8 years ago

@christophherr unfortunately I don't seem to be able to get the patch to work. Could you check the patch again, please?

#7 @christophherr
8 years ago

Sorry about that.
I only tested with svn patch not with grunt patch.
I uploaded a new patch through grunt upload_patch.
It applies for me now with svn patch and grunt patch.

#8 @sabernhardt
2 years ago

  • Milestone set to 5.3
  • Resolution set to fixed
  • Status changed from new to closed

Changed from http:// value to https:// placeholder in [46330]

Note: See TracTickets for help on using tickets.