Browse Source

Radcliffe 2: Make sure theme is not trying to load the non-existant default.css when the stylepack is set to default.

Laurel Fulford 6 years ago
parent
commit
22665ca7aa
1 changed files with 6 additions and 3 deletions
  1. 6 3
      radcliffe-2/inc/style-packs-core.php

+ 6 - 3
radcliffe-2/inc/style-packs-core.php

@@ -66,6 +66,9 @@ class Style_Packs_Core {
 
 	public function enqueue_style() {
 		if ( array_key_exists( $this->style, $this->config['styles'] ) ) {
+			if ( 'default' === $this->style ) {
+				return;
+			}
 			$stylesheet = $this->get_stylesheet_uri( $this->style );
 			wp_enqueue_style( $this->get_style_pack_id( $this->style ), $stylesheet, array(), $this->theme_version );
 		}
@@ -182,7 +185,7 @@ class Style_Packs_Core {
 			'styles'            => $style_pack_stylesheets,
 			'fonts'             => $style_pack_fonts,
 		);
-		
+
 		wp_localize_script( 'style-packs-customizer', 'stylePacksData', $style_packs_data );
 	}
 
@@ -236,7 +239,7 @@ class Style_Packs_Core {
 		}
 		register_default_headers( $headers );
 	}
-	
+
 	static function get_description( $style ) {
 		if ( array_key_exists( $style, self::$instance->config['style_descriptions'] ) ) {
 			return self::$instance->config['style_descriptions'][ $style ];
@@ -327,4 +330,4 @@ class Style_Pack_Customize_Control_Radio_Image extends WP_Customize_Control {
 
 }
 
-endif;
+endif;