Skip to content

Commit

Permalink
Theme fonts now load in the PPB
Browse files Browse the repository at this point in the history
  • Loading branch information
rramo012 committed Aug 30, 2018
1 parent b2bfd04 commit 1d8c0a1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,20 @@ public function enqueue_webfonts() {
if ( $pagenow && ! in_array( $pagenow, array( 'post-new.php', 'post.php' ) ) ) {
return;
}

foreach ( array_keys( Kirki::$config ) as $config_id ) {
$web_fonts = Kirki_Modules_Webfont_Loader::get_instance();
Kirki_Modules_Webfont_Loader::$load = true;
$web_fonts->enqueue_scripts();

$async = new Kirki_Modules_Webfonts_Async(
$config_id,
Kirki_Modules_Webfonts::get_instance(),
Kirki_Fonts_Google::get_instance()
);

$async->webfont_loader();
$async->webfont_loader_script();

$local_fonts = new Kirki_Modules_Webfonts_Local(
Kirki_Modules_Webfonts::get_instance(),
Expand Down
6 changes: 6 additions & 0 deletions src/includes/class-boldgrid-framework-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,20 @@ public function enqueue_webfonts() {
if ( $pagenow && ! in_array( $pagenow, array( 'post-new.php', 'post.php' ) ) ) {
return;
}

foreach ( array_keys( Kirki::$config ) as $config_id ) {
$web_fonts = Kirki_Modules_Webfont_Loader::get_instance();
Kirki_Modules_Webfont_Loader::$load = true;
$web_fonts->enqueue_scripts();

$async = new Kirki_Modules_Webfonts_Async(
$config_id,
Kirki_Modules_Webfonts::get_instance(),
Kirki_Fonts_Google::get_instance()
);

$async->webfont_loader();
$async->webfont_loader_script();

$local_fonts = new Kirki_Modules_Webfonts_Local(
Kirki_Modules_Webfonts::get_instance(),
Expand Down

0 comments on commit 1d8c0a1

Please sign in to comment.