Skip to content

Commit

Permalink
webfonts for #2009
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath committed Nov 9, 2018
1 parent 2eb9875 commit e1811a1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class Kirki_Modules_Webfont_Loader {
*/
protected function __construct() {
add_action( 'wp_head', array( $this, 'enqueue_scripts' ), 20 );
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ), 20 );
}

/**
Expand Down
4 changes: 4 additions & 0 deletions modules/webfonts/class-kirki-modules-webfonts-async.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ public function __construct( $config_id, $webfonts, $googlefonts, $args = array(
add_action( 'wp_head', array( $this, 'webfont_loader' ) );
add_action( 'wp_head', array( $this, 'webfont_loader_script' ), 30 );

// Add these in the dashboard to support editor-styles.
add_action( 'admin_enqueue_scripts', array( $this, 'webfont_loader' ) );
add_action( 'admin_enqueue_scripts', array( $this, 'webfont_loader_script' ), 30 );

add_filter( 'wp_resource_hints', array( $this, 'resource_hints' ), 10, 2 );
}

Expand Down
1 change: 1 addition & 0 deletions modules/webfonts/class-kirki-modules-webfonts-local.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public function __construct( $webfonts, $googlefonts ) {
$this->googlefonts = $googlefonts;

add_action( 'wp_footer', array( $this, 'add_styles' ) );
add_action( 'admin_footer', array( $this, 'add_styles' ) );
}

/**
Expand Down

0 comments on commit e1811a1

Please sign in to comment.