[wp-trac] [WordPress Trac] #24595: Twenty Thirteen: Load Genericons in a More Plugin-friendly Way

WordPress Trac noreply at wordpress.org
Fri Jun 21 03:51:03 UTC 2013


#24595: Twenty Thirteen: Load Genericons in a More Plugin-friendly Way
------------------------------+------------------------------
 Reporter:  celloexpressions  |       Owner:
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:  Awaiting Review
Component:  Bundled Theme     |     Version:
 Severity:  normal            |  Resolution:
 Keywords:                    |
------------------------------+------------------------------

Comment (by celloexpressions):

 Replying to [comment:1 Ipstenu]:
 > I don't think Genericons should be in core
 I agree, Dashicons are make sense but Genericons are a theme/plugin
 component.

 > Realistically this is the same struggle anyone faces when a theme
 includes a font that a plugin does as well, and perhaps a better way to
 look at this is more ... generically.
 At first I was considering proposing a {{{wp_enqueue_fonts()}}} feature,
 but then I realized that it would be loading css files anyway and figured
 it would be bloat. But maybe some sort of extension of
 {{{wp_enqueue_style()}}}?

 > Now if TwentyThirteen 'called' genericons instead of bundling all the
 CSS inline in wp-content/themes/twentythirteen/style.css, then yeah,
 that'd be easier :) But it only works as far as I know someone else is
 using the code. If devs aren't consistent in the naming, we hit the same
 problem problem faced with jquery files that aren't in code that people
 pull in via plugins. Even if we use  {{{wp_enqueue_style('genericons')}}}
 there's no promise that Dudley Do-Right won't use {{{wp_enqueue_style
 ('dudley-genericons')}}} instead, thus double loading again.
 Obviously we can't be sure everyone will use the "right way" but it would
 be nice if there is a "right way" established by Twenty Thirteen so that
 plugins have the ''ability'' to play nicely if they want to. I had used
 'genericons', but then noticed that you use 'genericons-styles' and
 include all of the other css in there. In my case Genericons are one of
 several options and having a separate place for them makes more sense.

 Regardless, I think the best short-term solution is to load Genericons via
 {{{wp_enqueue_style('genericons')}}} in Twenty Thirteen so that plugins
 can play nicely, then in the longer term maybe look more broadly at font-
 loading options.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24595#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list