WordPress.org

Make WordPress Core

Opened 7 months ago

Closed 4 months ago

Last modified 4 months ago

#52813 closed enhancement (fixed)

Pass the scheme to all the `*_url` filters

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

Description

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 7 months ago.
52813.2.diff (3.9 KB) - added by desrosj 4 months ago.

Download all attachments as: .zip

Change History (7)

@johnbillion
7 months ago

#1 @johnbillion
7 months ago

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

#2 @desrosj
5 months 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.

@desrosj
4 months ago

#3 @desrosj
4 months ago

  • Keywords commit added

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

#4 @desrosj
4 months 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
4 months ago

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