Plugin Directory

Changeset 2844934


Ignore:
Timestamp:
01/07/2023 03:54:19 PM (3 years ago)
Author:
fieldofcode
Message:

bug fix for variables

Location:
scss-4-wp/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • scss-4-wp/trunk/scss-4-wp.php

    r2834575 r2844934  
    44* Plugin URI: https://github.com/Field-Of-Code/scss-4-wp
    55* Description: Compiles scss files live on WordPress.
    6 * Version: 1.0.0
     6* Version: 1.0.1
    77* Author: Field Of Code
    88* Author URI: https://fieldofcode.com
     
    2020    const ID = 'scss4wp';
    2121    const NAME = 'SCSS-4-WP';
    22     const VERSION = '1.0.0';
     22    const VERSION = '1.0.1';
    2323
    2424    /**
  • scss-4-wp/trunk/src/Core.php

    r2834575 r2844934  
    102102        $variables = apply_filters('scss4wp_variables', array());
    103103        foreach ($variables as $key => $value) {
    104             if (strlen(trim($variable_value)) == 0) {
    105                 unset($variables[$variable_key]);
    106             }
    107         }
    108         $this->scssc->set_variables($variables);
     104            if (strlen(trim($value)) == 0) {
     105                unset($variables[$key]);
     106            }
     107        }
     108        if(!empty($variables)) {
     109            $this->scssc->addVariables($variables);
     110        }
    109111
    110112        $this->scssc->setOutputStyle( $this->settings['compiling'] );
Note: See TracChangeset for help on using the changeset viewer.