Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#52813 closed enhancement (fixed)

Pass the scheme to all the `*_url` filters

Reported by: johnbillion's profile johnbillion Owned by: desrosj's profile desrosj
Milestone: 5.8 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch commit needs-dev-note
Focuses: Cc:


The following filters miss the $scheme parameter that's present in the other URL related filters.

  • admin_url
  • includes_url
  • network_admin_url
  • user_admin_url

Attachments (2)

52813.diff (3.7 KB) - added by johnbillion 3 years ago.
52813.2.diff (3.9 KB) - added by desrosj 3 years ago.

Download all attachments as: .zip

Change History (7)

3 years ago

#1 @johnbillion
3 years ago

  • Keywords has-patch added; needs-patch removed
  • Milestone changed from Awaiting Review to 5.8

#2 @desrosj
3 years ago

52813.diff looks good to me. I think it would be beneficial to document the default value to be more clear, though.

For example, the default scheme for admin_url, network_admin_url, and user_admin_url is admin (which obeys which obeys force_ssl_admin() and is_ssl()), but includes_url uses a null default.

3 years ago

#3 @desrosj
3 years ago

  • Keywords commit added

52813.2.diff adjusts the @param tags to indicate default values.

#4 @desrosj
3 years ago

  • Owner set to desrosj
  • Resolution set to fixed
  • Status changed from new to closed

In 51024:

General: Pass the scheme to the *_url filters.

This adds an additional $scheme parameter to the following URL related filters:

  • admin_url.
  • includes_url.
  • network_admin_url.
  • user_admin_url.

Props johnbillion, SergeyBiryukov, desrosj.
Fixes #52813.

#5 @milana_cap
3 years ago

  • Keywords needs-dev-note added
Note: See TracTickets for help on using tickets.