WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#19942 closed defect (bug) (fixed)

Simplify themes preview link building

Reported by: ocean90 Owned by: nacin
Milestone: 3.4 Priority: normal
Severity: minor Version: 2.8
Component: Themes Keywords: has-patch commit
Focuses: Cc:

Description

Just use home_url().

Attachments (1)

19942.patch (1.7 KB) - added by ocean90 2 years ago.

Download all attachments as: .zip

Change History (4)

ocean902 years ago

comment:1 SergeyBiryukov2 years ago

  • Keywords commit added

comment:2 nacin2 years ago

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

In [19811]:

Use home_url() rather than get_option() + is_ssl(). props ocean90, fixes #19942.

comment:3 koopersmith2 years ago

Just to note that this was actually incorrect if we wanted to match the admin's scheme — home_url() defaults to 'http' when is_admin() is true. See #20137, [20051].

However, now that the theme customizer is in core (#19910, [19995]) this preview code will likely be used for no-js previewing, which does *not* need to match the admin's scheme as it will load in a new tab.

Note: See TracTickets for help on using tickets.