Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#21399 closed defect (bug) (fixed)

Twenty Twelve: use protocol relative URL to load Google Fonts

Reported by: lancewillett's profile lancewillett Owned by: lancewillett's profile lancewillett
Milestone: 3.5 Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:

Description

To avoid insecure content errors in Theme Customizer we should use relative protocol URL in the font CSS enqueue call.

Attachments (3)

21399.diff (650 bytes) - added by lancewillett 13 years ago.
21399.2.diff (793 bytes) - added by obenland 13 years ago.
Adds is_ssl() check
21399.3.diff (1.1 KB) - added by obenland 13 years ago.
Version check with is_ssl() as fallback

Download all attachments as: .zip

Change History (7)

@lancewillett
13 years ago

#1 follow-up: @obenland
13 years ago

  • Cc konstantin@… added

Won't this mess with back-compat? It was only introduced in [21166].

#2 in reply to: ↑ 1 @lancewillett
13 years ago

Replying to obenland:

Won't this mess with back-compat? It was only introduced in [21166].

We'd need to test to see how older versions of WP would react. The alternate is to check is_ssl() and output the correct protocol in the path. Which is not as elegant, but works.

@nacin, any thoughts?

#3 @nacin
13 years ago

Prior to 3.5, // is considered a path-relative URL, and the site URL is prepended. So that's a no-go.

We could consider a version check, and then register // if we're good, and otherwise, checking is_ssl(). Not as elegant as a straight is_ssl() check, but at least sets the expectation that you can now do // with enqueues.

Might complicate the theme more than it should, though. I'm fine with a straight is_ssl() check.

Last edited 13 years ago by nacin (previous) (diff)

@obenland
13 years ago

Adds is_ssl() check

@obenland
13 years ago

Version check with is_ssl() as fallback

#4 @lancewillett
13 years ago

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

In [21391]:

Twenty Twelve: use is_ssl() to load the correct protocol for Google font CSS file. Fixes #21399, props obenland.

Note: See TracTickets for help on using tickets.