[wp-trac] [WordPress Trac] #39481: Twenty Seventeen: Allowing Google fonts in child themes

WordPress Trac noreply at wordpress.org
Fri Jan 6 08:10:30 UTC 2017


#39481: Twenty Seventeen: Allowing Google fonts in child themes
---------------------------+------------------------------
 Reporter:  tsvikas        |       Owner:
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Bundled Theme  |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |     Focuses:
---------------------------+------------------------------

Comment (by superpoincare):

 Actually since

 a) the child functions.php loads first and
 b) that wp_enqueue_style doesn't override,

 just this would do:

 {{{
 add_action( 'wp_enqueue_scripts', 'mychild_scripts' );
 function mychild_scripts() {
    wp_enqueue_style( 'twentyseventeen-fonts',
 'https://fonts.googleapis.com/css/....', array(), null );
 }
 }}}

 Since anyway child functions.php enqueues other styles and scripts, the
 above is effectively just one line.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39481#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list