Skip to content

Commit

Permalink
Merge pull request #731 from bianqui149/fix/bug-1.4
Browse files Browse the repository at this point in the history
fix stylesheet name issue
  • Loading branch information
westonruter authored Jun 27, 2023
2 parents a158cae + db77d96 commit 4837460
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions inc/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ function register_editor_assets( WP_Block_Type $block ): void {
/**
* Get highlight theme name.
*
* @return string Theme name.
* @return string Theme name or empty string if disabled.
*/
function get_theme_name(): string {
if ( has_filter( BLOCK_STYLE_FILTER ) ) {
Expand All @@ -331,7 +331,7 @@ function get_theme_name(): string {
} else {
$style = get_plugin_options()['theme_name'];
}
return $style;
return is_string( $style ) ? $style : '';
}

/**
Expand Down Expand Up @@ -851,7 +851,7 @@ function customize_register( WP_Customize_Manager $wp_customize ): void {
);
}

if ( ! has_filter( HIGHLIGHTED_LINE_BACKGROUND_COLOR_FILTER ) ) {
if ( ! has_filter( HIGHLIGHTED_LINE_BACKGROUND_COLOR_FILTER ) && $theme_name ) {
$default_color = strtolower( get_default_line_background_color( $theme_name ) );
$wp_customize->add_setting(
'syntax_highlighting[highlighted_line_background_color]',
Expand Down

0 comments on commit 4837460

Please sign in to comment.