Skip to content
Permalink
Browse files

Store theme key by stylesheet name, not template name. Resolves #29.

  • Loading branch information...
pdclark committed Sep 5, 2013
1 parent 1ca2c05 commit bb723d489f8f91fee6b15ec4dcf03df8dfebcee3
Showing with 5 additions and 5 deletions.
  1. +5 −5 classes/styles-helpers.php
@@ -79,7 +79,7 @@ public static function get_json_error( $json_file, $json_result ) {
return sprintf( $template, $error, $url, $path );
}
public static function get_template() {
public static function get_theme() {
if ( isset( self::$template ) ) {
return self::$template;
}
@@ -89,9 +89,9 @@ public static function get_template() {
if ( isset( $_GET['theme'] ) ) {
self::$template = $_GET['theme'];
}else if ( is_a( $wp_customize, 'WP_Customize_Manager' ) ) {
self::$template = $wp_customize->theme()->template;
self::$template = $wp_customize->theme()->stylesheet;
}else {
self::$template = get_template();
self::$template = get_stylesheet();
}
return self::$template;
@@ -100,9 +100,9 @@ public static function get_template() {
public static function get_option_key( $suffix = false ) {
if ( $suffix ) {
return 'storm-styles-' . self::get_template() . '-' . $suffix;
return 'storm-styles-' . self::get_theme() . '-' . $suffix;
}else {
return 'storm-styles-' . self::get_template();
return 'storm-styles-' . self::get_theme();
}
}
}

0 comments on commit bb723d4

Please sign in to comment.
You can’t perform that action at this time.