@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | */ |
| 55 | 55 | public function init() |
| 56 | 56 | { |
| 57 | - add_action( 'wp_print_styles', array( $this, 'print_compiled_style' ) ); |
|
| 57 | + add_action('wp_print_styles', array($this, 'print_compiled_style')); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | /** |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | * |
| 63 | 63 | * @param type $path The absolute path to the dynamic style |
| 64 | 64 | */ |
| 65 | - public function enqueue_style( $path ) |
|
| 65 | + public function enqueue_style($path) |
|
| 66 | 66 | { |
| 67 | 67 | $this->styles[] = $path; |
| 68 | 68 | } |
@@ -73,12 +73,12 @@ discard block |
||
| 73 | 73 | public function print_compiled_style() |
| 74 | 74 | { |
| 75 | 75 | ob_start(); |
| 76 | - foreach( $this->styles as $style ) |
|
| 76 | + foreach ($this->styles as $style) |
|
| 77 | 77 | { |
| 78 | 78 | include $style; |
| 79 | 79 | echo "\n"; |
| 80 | 80 | } |
| 81 | - $css = $this->parse_css( ob_get_clean() ); |
|
| 81 | + $css = $this->parse_css(ob_get_clean()); |
|
| 82 | 82 | include 'style.phtml'; |
| 83 | 83 | } |
| 84 | 84 | |
@@ -93,10 +93,10 @@ discard block |
||
| 93 | 93 | * @return string The compiled CSS after converting the variables to their |
| 94 | 94 | * corresponding values |
| 95 | 95 | */ |
| 96 | - public function parse_css( $css ) |
|
| 96 | + public function parse_css($css) |
|
| 97 | 97 | { |
| 98 | 98 | return preg_replace_callback('#\$([\w]+)#', function($matches) { |
| 99 | - return apply_filters( 'wp_dynamic_css_get_variable_value', $matches[1]); |
|
| 99 | + return apply_filters('wp_dynamic_css_get_variable_value', $matches[1]); |
|
| 100 | 100 | }, $css); |
| 101 | 101 | } |
| 102 | 102 | } |
| 103 | 103 | \ No newline at end of file |