0; foreach ($this->tokens as $key => $token) { switch ($token[0]) { case \AT_START: $out .= $template[0] . $this->_htmlsp($token[1], $plain) . $template[1]; $indent_level++; if (!isset($in_at_out[$indent_level])) { $in_at_out[$indent_level] = ''; } $out =& $in_at_out[$indent_level]; break; case \SEL_START: if ($this->parser->get_cfg('lowercase_s')) { $token[1] = \strtolower($token[1]); } $out .= $token[1][0] !== '@' ? $template[2] . $this->_htmlsp($token[1], $plain) : $template[0] . $this->_htmlsp($token[1], $plain); $out .= $template[3]; break; case \PROPERTY: if ($this->parser->get_cfg('case_properties') === 2) { $token[1] = \strtoupper($token[1]); } elseif ($this->parser->get_cfg('case_properties') === 1) { $token[1] = \strtolower($token[1]); } $out .= $template[4] . $this->_htmlsp($token[1], $plain) . ':' . $template[5]; break; case \VALUE: $out .= $this->_htmlsp($token[1], $plain); if ($this->_seeknocomment($key, 1) == \SEL_END && $this->parser->get_cfg('remove_last_;')) { $out .= \str_replace(';', '', $template[6]); } else { $out .= $template[6]; } break; case \SEL_END: $out .= $template[7]; if ($this->_seeknocomment($key, 1) != \AT_END) { $out .= $template[8]; } break; case \AT_END: if (\strlen($template[10])) { // indent the bloc we are closing $out = \str_replace("\n\n", "\r\n", $out); // don't fill empty lines $out = \str_replace("\n", "\n" . $template[10], $out); $out = \str_replace("\r\n", "\n\n", $out); } if ($indent_level > 1) { $out =& $in_at_out[$indent_level - 1]; } else { $out =& $output; } $out .= $template[10] . $in_at_out[$indent_level]; if ($this->_seeknocomment($key, 1) != \AT_END) { $out .= $template[9]; } else { $out .= \rtrim($template[9]); } unset($in_at_out[$indent_level]); $indent_level--; break; case \IMPORTANT_COMMENT: case \COMMENT: $out .= $template[11] . '/*' . $this->_htmlsp($token[1], $plain) . '*/' . $template[12]; break; } } $output = \trim($output); if (!$plain) { $this->output_css = $output; $this->_print(\true); } else { // If using spaces in the template, don't want these to appear in the plain output $this->output_css_plain = \str_replace(' ', '', $output); } } public function _seeknocomment($key, $move) { $go = $move > 0 ? 1 : -1; for ($i = $key + 1; \abs($key - $i) - 1 < \abs($move); $i += $go) { if (!isset($this->tokens[$i])) { return; } if ($this->tokens[$i][0] == \COMMENT) { $move += 1; continue; } return $this->tokens[$i][0]; } } public function _convert_raw_css($default_media = '') { $this->tokens = array(); $sort_selectors = $this->parser->get_cfg('sort_selectors'); $sort_properties = $this->parser->get_cfg('sort_properties'); // important comment section ? if (isset($this->css['!'])) { $this->parser->_add_token(\IMPORTANT_COMMENT, \rtrim($this->css['!']), \true); unset($this->css['!']); } foreach ($this->css as $medium => $val) { if ($sort_selectors) { \ksort($val); } if (\intval($medium) < \DEFAULT_AT) { // un medium vide (contenant @font-face ou autre @) ne produit aucun conteneur if (\strlen(\trim($medium))) { $parts_to_open = \explode('{', $medium); foreach ($parts_to_open as $part) { $this->parser->_add_token(\AT_START, $part, \true); } } } elseif ($default_media) { $this->parser->_add_token(\AT_START, $default_media, \true); } foreach ($val as $selector => $vali) { if ($sort_properties) { \ksort($vali); } $this->parser->_add_token(\SEL_START, $selector, \true); $invalid = array( '*' => array(), // IE7 hacks first '_' => array(), // IE6 hacks '/' => array(), // IE6 hacks '-' => array(), ); foreach ($vali as $property => $valj) { if (\strncmp($property, "//", 2) !== 0) { $matches = array(); if ($sort_properties && \preg_match('/^(\\*|_|\\/|-)(?!(ms|moz|o\\b|xv|atsc|wap|khtml|webkit|ah|hp|ro|rim|tc)-)/', $property, $matches)) { $invalid[$matches[1]][$property] = $valj; } else { $this->parser->_add_token(\PROPERTY, $property, \true); $this->parser->_add_token(\VALUE, $valj, \true); } } } foreach ($invalid as $prefix => $props) { foreach ($props as $property => $valj) { $this->parser->_add_token(\PROPERTY, $property, \true); $this->parser->_add_token(\VALUE, $valj, \true); } } $this->parser->_add_token(\SEL_END, $selector, \true); } if (\intval($medium) < \DEFAULT_AT) { // un medium vide (contenant @font-face ou autre @) ne produit aucun conteneur if (\strlen(\trim($medium))) { $parts_to_close = \explode('{', $medium); foreach (\array_reverse($parts_to_close) as $part) { $this->parser->_add_token(\AT_END, $part, \true); } } } elseif ($default_media) { $this->parser->_add_token(\AT_END, $default_media, \true); } } } public function _htmlsp($string, $plain) { if (!$plain) { return \htmlspecialchars($string, \ENT_QUOTES, 'utf-8'); } return $string; } public function get_ratio() { if (!$this->output_css_plain) { $this->formatted(); } return \round((\strlen($this->input_css) - \strlen($this->output_css_plain)) / \strlen($this->input_css), 3) * 100; } public function get_diff() { if (!$this->output_css_plain) { $this->formatted(); } $diff = \strlen($this->output_css_plain) - \strlen($this->input_css); if ($diff > 0) { return '+' . $diff; } elseif ($diff == 0) { return '+-' . $diff; } return $diff; } public function size($loc = 'output') { if ($loc === 'output' && !$this->output_css) { $this->formatted(); } if ($loc === 'input') { return \strlen($this->input_css) / 1000; } else { return \strlen($this->output_css_plain) / 1000; } } }
Fatal error: Uncaught Error: Class "Automattic\WooCommerce\Admin\Features\Navigation\Init" not found in /htdocs/wp-content/plugins/woocommerce/src/Internal/Features/FeaturesController.php:180 Stack trace: #0 /htdocs/wp-content/plugins/woocommerce/src/Internal/Features/FeaturesController.php(432): Automattic\WooCommerce\Internal\Features\FeaturesController->get_feature_definitions() #1 /htdocs/wp-content/plugins/woocommerce/src/Internal/Features/FeaturesController.php(332): Automattic\WooCommerce\Internal\Features\FeaturesController->feature_exists('marketplace') #2 /htdocs/wp-content/plugins/woocommerce/src/Utilities/FeaturesUtil.php(42): Automattic\WooCommerce\Internal\Features\FeaturesController->feature_is_enabled('marketplace') #3 /htdocs/wp-content/plugins/woocommerce/src/Internal/Admin/Marketplace.php(26): Automattic\WooCommerce\Utilities\FeaturesUtil::feature_is_enabled('marketplace') #4 [internal function]: Automattic\WooCommerce\Internal\Admin\Marketplace->init() #5 /htdocs/wp-content/plugins/woocommerce/src/Internal/DependencyManagement/Definition.php(59): call_user_func_array(Array, Array) #6 /htdocs/wp-content/plugins/woocommerce/src/Internal/DependencyManagement/Definition.php(29): Automattic\WooCommerce\Internal\DependencyManagement\Definition->invokeInit(Object(Automattic\WooCommerce\Internal\Admin\Marketplace)) #7 /htdocs/wp-content/plugins/woocommerce/lib/packages/League/Container/Definition/Definition.php(212): Automattic\WooCommerce\Internal\DependencyManagement\Definition->resolveClass('Automattic\\WooC...') #8 /htdocs/wp-content/plugins/woocommerce/lib/packages/League/Container/Definition/DefinitionAggregate.php(94): Automattic\WooCommerce\Vendor\League\Container\Definition\Definition->resolve(false) #9 /htdocs/wp-content/plugins/woocommerce/lib/packages/League/Container/Container.php(157): Automattic\WooCommerce\Vendor\League\Container\Definition\DefinitionAggregate->resolve('Automattic\\WooC...', false) #10 /htdocs/wp-content/plugins/woocommerce/src/Internal/DependencyManagement/ExtendedContainer.php(176): Automattic\WooCommerce\Vendor\League\Container\Container->get('Automattic\\WooC...', false) #11 /htdocs/wp-content/plugins/woocommerce/lib/packages/League/Container/Container.php(178): Automattic\WooCommerce\Internal\DependencyManagement\ExtendedContainer->get('Automattic\\WooC...', false) #12 /htdocs/wp-content/plugins/woocommerce/src/Internal/DependencyManagement/ExtendedContainer.php(176): Automattic\WooCommerce\Vendor\League\Container\Container->get('Automattic\\WooC...', false) #13 /htdocs/wp-content/plugins/woocommerce/src/Container.php(120): Automattic\WooCommerce\Internal\DependencyManagement\ExtendedContainer->get('Automattic\\WooC...') #14 /htdocs/wp-content/plugins/woocommerce/includes/class-woocommerce.php(285): Automattic\WooCommerce\Container->get('Automattic\\WooC...') #15 /htdocs/wp-content/plugins/woocommerce/includes/class-woocommerce.php(200): WooCommerce->init_hooks() #16 /htdocs/wp-content/plugins/woocommerce/includes/class-woocommerce.php(158): WooCommerce->__construct() #17 /htdocs/wp-content/plugins/woocommerce/woocommerce.php(51): WooCommerce::instance() #18 /htdocs/wp-content/plugins/woocommerce/woocommerce.php(66): WC() #19 /htdocs/wp-settings.php(526): include_once('/htdocs/wp-cont...') #20 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #21 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #22 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #23 /htdocs/index.php(17): require('/htdocs/wp-blog...') #24 {main} thrown in /htdocs/wp-content/plugins/woocommerce/src/Internal/Features/FeaturesController.php on line 180