WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#21186 closed defect (bug) (fixed)

WP_Rewrite::mod_rewrite_rules() should use site_url()

Reported by: JustinSainton Owned by: nacin
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.4.1
Component: Rewrite Rules Keywords: has-patch dev-feedback
Focuses: Cc:

Description

I could be off here, but I'm thinking site_url() should be used here in place of get_option( 'siteurl' ). The potential issues are naturally inferred, and slightly further down in the function, home_url() is used.

Let me know if I'm missing something here.

Attachments (1)

21186.patch (454 bytes) - added by JustinSainton 3 years ago.

Download all attachments as: .zip

Change History (4)

@JustinSainton3 years ago

comment:1 @SergeyBiryukov3 years ago

  • Milestone changed from Awaiting Review to 3.5

comment:2 @ryan3 years ago

It's been using get_option()/get_setting() forever. There doesn't seem to be a reason is hasn't changed to site_url(). mod_rewrite_rules() is scheme agnostic so the patch should be fine.

comment:3 @nacin3 years ago

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

In [21810]:

Use site_url() in WP_Rewrite::mod_rewrite_rules(), rather than get_option(). props JustinSainton. fixes #21186.

Note: See TracTickets for help on using tickets.