Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions customizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,6 @@ public function theme_font_customizer( $wp_customize ) {

}

}

if( !$has_panel ){
$this->display_inputs( $theme_font_locations, $wp_customize );
} else{
$wp_customize->add_setting(
'show_advanced_fonts',
array( 'transport' => 'postMessage' )
Expand All @@ -301,6 +296,11 @@ public function theme_font_customizer( $wp_customize ) {
'section' => 'theme_fonts_main',
)
);

}

if( !$has_panel ){
$this->display_inputs( $theme_font_locations, $wp_customize );
}

}
Expand Down Expand Up @@ -351,7 +351,7 @@ public function display_inputs( $font_locations, $wp_customize, $section = 'main

$default = array(
'' => 'Select a Font',
$font_location['default'] => $font_location['default'] . ' (default)',
$font_location['default'] => !empty( $font_location['default_title'] ) ? $font_location['default_title'] : sprintf( esc_html__( '%s (default)', 'typecase' ), $font_location['default'] ),
);

$wp_customize->add_control(
Expand Down Expand Up @@ -477,4 +477,4 @@ public function customizer_live_preview(){

}

$typecase_customizer = Typecase_Customizer::init();
$typecase_customizer = Typecase_Customizer::init();
5 changes: 5 additions & 0 deletions typecase.php
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,11 @@ public function display_frontend(){
$import_url .= '|';

$import_url .= str_replace(" ","+",$family).$this->stringify_font_part($weights).$this->stringify_font_part($charsets);

// Skip font styles if no selectors are defined
if ( empty( $selectors ) ) {
continue;
}

$selectors = explode("|",$selectors);

Expand Down