Last active
March 23, 2016 22:19
-
-
Save ilyaevseev/3a04e34da9b5b2235168 to your computer and use it in GitHub Desktop.
Suppress wp-cli warnings with Enfold theme installed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/wp-content/themes/enfold/css/dynamic-css.php b/wp-content/themes/enfold/css/dynamic-css.php | |
index 65a291e..c09c24f 100644 | |
--- a/wp-content/themes/enfold/css/dynamic-css.php | |
+++ b/wp-content/themes/enfold/css/dynamic-css.php | |
@@ -33,7 +33,7 @@ $output = ""; | |
$body_color = ""; | |
extract($color_set); | |
-extract($main_color); | |
+if ($main_color !== NULL) extract($main_color); | |
extract($styles); | |
unset($background_image); | |
diff --git a/wp-content/themes/enfold/functions-enfold.php b/wp-content/themes/enfold/functions-enfold.php | |
index 6eeeb8d..3d25c94 100644 | |
--- a/wp-content/themes/enfold/functions-enfold.php | |
+++ b/wp-content/themes/enfold/functions-enfold.php | |
@@ -1294,7 +1294,7 @@ if(!function_exists('avia_generate_grid_dimension')) | |
function avia_generate_grid_dimension($options, $color_set, $styles) | |
{ | |
global $avia_config; | |
- extract($options); | |
+ if ($options !== "") extract($options); | |
if(empty($content_width)) $content_width = 73; | |
if(empty($combined_width)) $combined_width = 100; | |
diff --git a/wp-content/themes/enfold/includes/admin/register-dynamic-styles.php b/wp-content/themes/enfold/includes/admin/register-dynamic-styles.php | |
index 4f457c1..81fbdcc 100644 | |
--- a/wp-content/themes/enfold/includes/admin/register-dynamic-styles.php | |
+++ b/wp-content/themes/enfold/includes/admin/register-dynamic-styles.php | |
@@ -8,6 +8,7 @@ function avia_prepare_dynamic_styles($options = false) | |
$color_set = $styles = array(); | |
$post_id = avia_get_the_ID(); | |
$options = apply_filters('avia_pre_prepare_colors', $options); | |
+ if ($options === "") $options = array(); | |
//boxed or stretched layout | |
$avia_config['box_class'] = empty($options['color-body_style']) ? "stretched" : $options['color-body_style']; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment