Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#30678 closed defect (bug) (fixed)

Twenty Fifteen: Problem with fonts turned off

Reported by: pavelevap Owned by: lancewillett
Priority: normal Milestone: 4.1
Component: Bundled Theme Version: 4.1
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

I tried to turn off all Twenty Fifteen fonts in localization files and following URL is called:

<link rel="stylesheet" id="twentyfifteen-fonts-css" href="//fonts.googleapis.com/css?family&amp;subset=latin%2Clatin-ext" type="text/css" media="all">

There is also GET error in browser console. We should not call fonts when they are turned off by translators?

Attachments (2)

30678.patch (730 bytes ) - added by SergeyBiryukov 12 years ago.
30678.diff (1.7 KB ) - added by obenland 12 years ago.
Set variable at beginning of function and remove dependency on fonts.

Download all attachments as: .zip

Change History (17)

#1 @SergeyBiryukov
12 years ago

  • Keywords has-patch added
  • Milestone Awaiting Review4.1

Good catch.

#2 @pavelevap
12 years ago

And related problem: I tried to make a child theme for 2015, but when I dequeued twentyfifteen-fonts, then parent style.css was not loaded in child theme because there is following dependency:

wp_enqueue_style( 'twentyfifteen-style', get_stylesheet_uri(), array( 'twentyfifteen-fonts', 'genericons' ) );

I am not sure if it is a bug (or I am doing it wrong), but it should be possible to remove fonts from child theme?

#3 @pavelevap
12 years ago

Version 0, edited 12 years ago by pavelevap (next)

#4 @SergeyBiryukov
12 years ago

Yes, the 'twentyfifteen-fonts' dependency should probably be removed.

In Twenty Fourteen, we didn't have 'twentyfourteen-lato' as a dependency for the main stylesheet.

@obenland
12 years ago

Set variable at beginning of function and remove dependency on fonts.

#5 @obenland
12 years ago

We should probably remove all dependencies for style.css. Twenty Twelve and Thirteen had no dependencies.

Twenty Fourteen has a Genericon dependency, which doesn't seem good to have. If Genericons are unavailable, the theme should still be styled.

#6 @lancewillett
12 years ago

Removing Genericons dependencies sounds like a new ticket -- keeping this one focused on the fonts issue.

#7 @lancewillett
12 years ago

  • Owner set to lancewillett
  • Resolutionfixed
  • Status newclosed

In 30832:

Twenty Fifteen: remove fonts as a style dependency.

Props obenland, SergeyBiryukov. Fixes #30678.

#8 follow-up: @pavelevap
12 years ago

But problem with Genericons is the same. When removed in child theme, no styles will be applied and it is wrong...

#9 @pavelevap
12 years ago

  • Resolution fixed
  • Status closedreopened

It should be also committed into 4.1 branch?

#10 in reply to: ↑ 8 @iamtakashi
12 years ago

  • Resolutionfixed
  • Status reopenedclosed

Replying to pavelevap:

But problem with Genericons is the same. When removed in child theme, no styles will be applied and it is wrong...

"Removing Genericons dependencies sounds like a new ticket -- keeping this one focused on the fonts issue."

Look Lance's comment above. Feel free to open a new ticket.

#11 @pavelevap
12 years ago

  • Resolution fixed
  • Status closedreopened

For Genericons I will reopen #30532, there is no need for another ticket.

But this ticket was reopened because fix for fonts was committed only to trunk and not to 4.1 branch, even if it is marked for 4.1 milestone.

#12 @nacin
12 years ago

  • Keywords commit fixed-major added

This ticket was mentioned in Slack in #core by lancewillett. View the logs.


12 years ago

#14 @johnbillion
12 years ago

  • Resolutionfixed
  • Status reopenedclosed

In 30881:

Twenty Fifteen: remove fonts as a style dependency.

Merges [30832] to the 4.1 branch.

Props obenland, SergeyBiryukov.
Fixes #30678.

#15 @johnbillion
12 years ago

  • Keywords commit fixed-major removed
Note: See TracTickets for help on using tickets.