Make WordPress Core

Opened 6 years ago

Last modified 6 years ago

#21973 closed defect (bug)

2 bugs in wp_enqueue_style — at Version 1

Reported by: thomask Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description (last modified by SergeyBiryukov)

Current twenty twelve theme uses wp_enqueue_style for loading google fonts and it points to two bugs in wp_enqueue_style

  1. it does not allow to add address without protocol. It is perfectly valid to use e.g. //fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700" and it would load http when you are running it from http server or https if you are using https. If you put this to wp_enqueue_style, it deletes one "/" from the begining and then it try to load it from 'yourserver.tld/fonts.googleapis.com/'
  1. it has very funny and hard to notice bug for developers - when you are using with user logged on, it works OK. But when you are looking at the web logged off, it cut everything behind the ? char, so it will try to load http(s)://fonts.googleapis.com/css and so in this case finishes with 404

P.S.: i set it as a blocker, because future default theme twenty twelve uses this as default (what is wrong btw., see #21972)

Change History (1)

#1 @SergeyBiryukov
6 years ago

  • Description modified (diff)
Note: See TracTickets for help on using tickets.