diff options
Diffstat (limited to 'plugins/jetpack/modules/custom-css/csstidy')
3 files changed, 21 insertions, 9 deletions
diff --git a/plugins/jetpack/modules/custom-css/csstidy/class.csstidy.php b/plugins/jetpack/modules/custom-css/csstidy/class.csstidy.php index b9e933aa..a502fac5 100644 --- a/plugins/jetpack/modules/custom-css/csstidy/class.csstidy.php +++ b/plugins/jetpack/modules/custom-css/csstidy/class.csstidy.php @@ -241,6 +241,7 @@ class csstidy { * @var string */ public $tokens_list = ""; + /** * Loads standard template and sets default settings * @access private @@ -285,6 +286,10 @@ class csstidy { $this->tokens_list = & $GLOBALS['csstidy']['tokens']; } + function csstidy() { + $this->__construct(); + } + /** * Get the value of a setting. * @param string $setting diff --git a/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_optimise.php b/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_optimise.php index b2e8eb96..176e0fd3 100644 --- a/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_optimise.php +++ b/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_optimise.php @@ -40,7 +40,6 @@ * @version 1.0 */ class csstidy_optimise { - /** * Constructor * @param array $css contains the class csstidy @@ -57,6 +56,10 @@ class csstidy_optimise { $this->value = & $css->value; } + function csstidy_optimise(&$css) { + $this->__construct($css); + } + /** * Optimises $css after parsing * @access public @@ -214,7 +217,7 @@ class csstidy_optimise { * @return string * @version 1.0 */ - function shorthand($value) { + static function shorthand($value) { $important = ''; if (csstidy::is_important($value)) { $values = csstidy::gvw_important($value); @@ -500,7 +503,7 @@ class csstidy_optimise { * @version 1.0 * @see merge_4value_shorthands() */ - function dissolve_4value_shorthands($property, $value) { + static function dissolve_4value_shorthands($property, $value) { $shorthands = & $GLOBALS['csstidy']['shorthands']; if (!is_array($shorthands[$property])) { $return[$property] = $value; @@ -545,7 +548,7 @@ class csstidy_optimise { * @return array * @version 1.0 */ - function explode_ws($sep, $string) { + static function explode_ws($sep, $string) { $status = 'st'; $to = ''; @@ -588,7 +591,7 @@ class csstidy_optimise { * @version 1.2 * @see dissolve_4value_shorthands() */ - function merge_4value_shorthands($array) { + static function merge_4value_shorthands($array) { $return = $array; $shorthands = & $GLOBALS['csstidy']['shorthands']; @@ -622,7 +625,7 @@ class csstidy_optimise { * @see merge_bg() * @todo full CSS 3 compliance */ - function dissolve_short_bg($str_value) { + static function dissolve_short_bg($str_value) { // don't try to explose background gradient ! if (stripos($str_value, "gradient(")!==FALSE) return array('background'=>$str_value); @@ -700,7 +703,7 @@ class csstidy_optimise { * @see dissolve_short_bg() * @todo full CSS 3 compliance */ - function merge_bg($input_css) { + static function merge_bg($input_css) { $background_prop_default = & $GLOBALS['csstidy']['background_prop_default']; // Max number of background images. CSS3 not yet fully implemented $number_of_values = @max(count(csstidy_optimise::explode_ws(',', $input_css['background-image'])), count(csstidy_optimise::explode_ws(',', $input_css['background-color'])), 1); @@ -780,7 +783,7 @@ class csstidy_optimise { * @version 1.3 * @see merge_font() */ - function dissolve_short_font($str_value) { + static function dissolve_short_font($str_value) { $font_prop_default = & $GLOBALS['csstidy']['font_prop_default']; $font_weight = array('normal', 'bold', 'bolder', 'lighter', 100, 200, 300, 400, 500, 600, 700, 800, 900); $font_variant = array('normal', 'small-caps'); @@ -867,7 +870,7 @@ class csstidy_optimise { * @version 1.3 * @see dissolve_short_font() */ - function merge_font($input_css) { + static function merge_font($input_css) { $font_prop_default = & $GLOBALS['csstidy']['font_prop_default']; $new_font_value = ''; $important = ''; diff --git a/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_print.php b/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_print.php index 21f438cb..c720d398 100644 --- a/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_print.php +++ b/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_print.php @@ -76,6 +76,10 @@ class csstidy_print { $this->namespace = & $css->namespace; } + function csstidy_print(&$css) { + $this->__construct($css); + } + /** * Resets output_css and output_css_plain (new css code) * @access private |