diff --git a/admin/importers/importers-init.php b/admin/importers/importers-init.php index 88bf64a2e011e..80667998c47b8 100644 --- a/admin/importers/importers-init.php +++ b/admin/importers/importers-init.php @@ -14,7 +14,7 @@ /** * woocommerce_tax_rates_importer function. - * + * * @access public * @return void */ @@ -25,7 +25,7 @@ function woocommerce_tax_rates_importer() { if ( ! class_exists( 'WP_Importer' ) ) { $class_wp_importer = ABSPATH . 'wp-admin/includes/class-wp-importer.php'; - if ( file_exists( $class_wp_importer ) ) + if ( file_exists( $class_wp_importer ) ) require $class_wp_importer; } diff --git a/admin/importers/tax-rates-importer.php b/admin/importers/tax-rates-importer.php index 8d5acdc3e31a4..9c303627b7a1e 100644 --- a/admin/importers/tax-rates-importer.php +++ b/admin/importers/tax-rates-importer.php @@ -7,12 +7,12 @@ * @package WooCommerce/Admin/Importers * @version 1.7.0 */ - + if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly if ( class_exists( 'WP_Importer' ) ) { class WC_CSV_Tax_Rates_Import extends WP_Importer { - + var $id; var $file_url; var $import_page; @@ -20,17 +20,17 @@ class WC_CSV_Tax_Rates_Import extends WP_Importer { var $posts = array(); var $imported; var $skipped; - + /** * __construct function. - * + * * @access public * @return void */ public function __construct() { $this->import_page = 'woocommerce_tax_rate_csv'; } - + /** * Registered callback function for the WordPress Importer * @@ -38,13 +38,13 @@ public function __construct() { */ function dispatch() { $this->header(); - + if ( ! empty( $_POST['delimiter'] ) ) $this->delimiter = stripslashes( trim( $_POST['delimiter'] ) ); - - if ( ! $this->delimiter ) + + if ( ! $this->delimiter ) $this->delimiter = ','; - + $step = empty( $_GET['step'] ) ? 0 : (int) $_GET['step']; switch ( $step ) { case 0: @@ -58,26 +58,26 @@ function dispatch() { $file = get_attached_file( $this->id ); else $file = ABSPATH . $this->file_url; - + add_filter( 'http_request_timeout', array( &$this, 'bump_request_timeout' ) ); - + if ( function_exists( 'gc_enable' ) ) gc_enable(); - + @set_time_limit(0); @ob_flush(); @flush(); - + $this->import( $file ); } break; } $this->footer(); } - + /** * format_data_from_csv function. - * + * * @access public * @param mixed $data * @param mixed $enc @@ -89,134 +89,134 @@ function format_data_from_csv( $data, $enc ) { /** * import function. - * + * * @access public * @param mixed $file * @return void */ function import( $file ) { global $woocommerce, $wpdb; - + $this->imported = $this->skipped = 0; - + if ( ! is_file($file) ) { echo '
' . __( 'Sorry, there has been an error.', 'woocommerce' ) . '
';
echo __( 'The file does not exist, please try again.', 'woocommerce' ) . '
' . __( 'Sorry, there has been an error.', 'woocommerce' ) . '
';
echo __( 'The CSV is invalid.', 'woocommerce' ) . '
'.sprintf( __( 'Import complete - imported %s tax rates and skipped %s.', 'woocommerce' ), $this->imported, $this->skipped ).'
' . __( 'All done!', 'woocommerce' ) . ' ' . __( 'View Tax Rates', 'woocommerce' ) . '' . '
'; - + do_action( 'import_end' ); } - + /** * Handles the CSV upload and initial parsing of the file to prepare for * displaying author import options @@ -224,40 +224,40 @@ function import_end() { * @return bool False if error uploading or invalid file, true otherwise */ function handle_upload() { - + if ( empty( $_POST['file_url'] ) ) { - + $file = wp_import_handle_upload(); - + if ( isset( $file['error'] ) ) { echo '' . __( 'Sorry, there has been an error.', 'woocommerce' ) . '
';
echo esc_html( $file['error'] ) . '
' . __( 'Sorry, there has been an error.', 'woocommerce' ) . '
'; return false; - + } - + } - + return true; } - + /** * header function. - * + * * @access public * @return void */ @@ -268,32 +268,32 @@ function header() { /** * footer function. - * + * * @access public * @return void */ function footer() { echo ''; } - + /** * greet function. - * + * * @access public * @return void */ function greet() { global $woocommerce; - + echo '' . __( 'Hi there! Upload a CSV file containing tax rates to import the contents into your shop. Choose a .csv file to upload, then click "Upload file and import".', 'woocommerce' ).'
'; - + echo '' . sprintf( __( 'Tax rates need to be defined with columns in a specific order (6 columns). Click here to download a sample.', 'woocommerce' ), $woocommerce->plugin_url() . '/admin/importers/samples/sample_tax_rates.csv' ) . '
'; - + echo '' . sprintf( __( 'Local tax rates also need to be defined with columns in a specific order (8 columns). Click here to download a sample.', 'woocommerce' ), $woocommerce->plugin_url() . '/admin/importers/samples/sample_local_tax_rates.csv' ) . '
'; - + $action = 'admin.php?import=woocommerce_tax_rate_csv&step=1'; - + $bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() ); $size = wp_convert_bytes_to_hr( $bytes ); $upload_dir = wp_upload_dir(); @@ -336,10 +336,10 @@ function greet() { '; } - + /** * Added to http_request_timeout filter to force timeout at 60 seconds during import * @return int 60 diff --git a/admin/includes/class-cssmin.php b/admin/includes/class-cssmin.php index bbe83a2a74bc3..bd60e89351b0b 100644 --- a/admin/includes/class-cssmin.php +++ b/admin/includes/class-cssmin.php @@ -1,7 +1,7 @@ * @@ -11,10 +11,10 @@ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -23,7 +23,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * -- - * + * * @package CssMin * @link http://code.google.com/p/cssmin/ * @author Joe Scylla
* @variables
@@ -541,7 +541,7 @@ public function __toString()
* }
* color: var(defaultColor);
*
- *
+ *
* Will get converted to:
*
* color:black;
@@ -558,19 +558,19 @@ class CssVariablesMinifierPlugin extends aCssMinifierPlugin
{
/**
* Regular expression matching a value.
- *
+ *
* @var string
*/
private $reMatch = "/var\((.+)\)/iSU";
/**
* Parsed variables.
- *
+ *
* @var array
*/
private $variables = null;
/**
* Returns the variables.
- *
+ *
* @return array
*/
public function getVariables()
@@ -579,7 +579,7 @@ public function getVariables()
}
/**
* Implements {@link aCssMinifierPlugin::minify()}.
- *
+ *
* @param aCssToken $token Token to process
* @return boolean Return TRUE to break the processing of this token; FALSE to continue
*/
@@ -614,7 +614,7 @@ public function apply(aCssToken &$token)
}
/**
* Implements {@link aMinifierPlugin::getTriggerTokens()}
- *
+ *
* @return array
*/
public function getTriggerTokens()
@@ -628,7 +628,7 @@ public function getTriggerTokens()
}
/**
* Sets the variables.
- *
+ *
* @param array $variables Variables to set
* @return void
*/
@@ -639,10 +639,10 @@ public function setVariables(array $variables)
}
/**
- * This {@link aCssMinifierFilter minifier filter} will parse the variable declarations out of @variables at-rule
- * blocks. The variables will get store in the {@link CssVariablesMinifierPlugin} that will apply the variables to
+ * This {@link aCssMinifierFilter minifier filter} will parse the variable declarations out of @variables at-rule
+ * blocks. The variables will get store in the {@link CssVariablesMinifierPlugin} that will apply the variables to
* declaration.
- *
+ *
* @package CssMin/Minifier/Filters
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -654,7 +654,7 @@ class CssVariablesMinifierFilter extends aCssMinifierFilter
{
/**
* Implements {@link aCssMinifierFilter::filter()}.
- *
+ *
* @param array $tokens Array of objects of type aCssToken
* @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array
*/
@@ -734,9 +734,9 @@ public function apply(array &$tokens)
/**
* {@link aCssParserPlugin Parser plugin} for preserve parsing url() values.
- *
+ *
* This plugin return no {@link aCssToken CssToken} but ensures that url() values will get parsed properly.
- *
+ *
* @package CssMin/Parser/Plugins
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -748,7 +748,7 @@ class CssUrlParserPlugin extends aCssParserPlugin
{
/**
* Implements {@link aCssParserPlugin::getTriggerChars()}.
- *
+ *
* @return array
*/
public function getTriggerChars()
@@ -757,7 +757,7 @@ public function getTriggerChars()
}
/**
* Implements {@link aCssParserPlugin::getTriggerStates()}.
- *
+ *
* @return array
*/
public function getTriggerStates()
@@ -766,7 +766,7 @@ public function getTriggerStates()
}
/**
* Implements {@link aCssParserPlugin::parse()}.
- *
+ *
* @param integer $index Current index
* @param string $char Current char
* @param string $previousChar Previous char
@@ -810,9 +810,9 @@ public function parse($index, $char, $previousChar, $state)
/**
* {@link aCssParserPlugin Parser plugin} for preserve parsing string values.
- *
+ *
* This plugin return no {@link aCssToken CssToken} but ensures that string values will get parsed properly.
- *
+ *
* @package CssMin/Parser/Plugins
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -824,13 +824,13 @@ class CssStringParserPlugin extends aCssParserPlugin
{
/**
* Current string delimiter char.
- *
+ *
* @var string
*/
private $delimiterChar = null;
/**
* Implements {@link aCssParserPlugin::getTriggerChars()}.
- *
+ *
* @return array
*/
public function getTriggerChars()
@@ -839,7 +839,7 @@ public function getTriggerChars()
}
/**
* Implements {@link aCssParserPlugin::getTriggerStates()}.
- *
+ *
* @return array
*/
public function getTriggerStates()
@@ -848,7 +848,7 @@ public function getTriggerStates()
}
/**
* Implements {@link aCssParserPlugin::parse()}.
- *
+ *
* @param integer $index Current index
* @param string $char Current char
* @param string $previousChar Previous char
@@ -881,7 +881,7 @@ public function parse($index, $char, $previousChar, $state)
// End of string
elseif ($char === $this->delimiterChar && $state === "T_STRING")
{
- // If the Previous char is a escape char count the amount of the previous escape chars. If the amount of
+ // If the Previous char is a escape char count the amount of the previous escape chars. If the amount of
// escape chars is uneven do not end the string
if ($previousChar == "\\")
{
@@ -911,7 +911,7 @@ public function parse($index, $char, $previousChar, $state)
/**
* This {@link aCssMinifierFilter minifier filter} sorts the ruleset declarations of a ruleset by name.
- *
+ *
* @package CssMin/Minifier/Filters
* @link http://code.google.com/p/cssmin/
* @author Rowan Beentje
@@ -923,7 +923,7 @@ class CssSortRulesetPropertiesMinifierFilter extends aCssMinifierFilter
{
/**
* Implements {@link aCssMinifierFilter::filter()}.
- *
+ *
* @param array $tokens Array of objects of type aCssToken
* @return integer Count of added, changed or removed tokens; a return value larger than 0 will rebuild the array
*/
@@ -955,7 +955,7 @@ public function apply(array &$tokens)
$declarations = array_slice($tokens, $startIndex + 1, $endIndex - $startIndex - 1);
// Check whether a sort is required
$sortRequired = $lastPropertyName = false;
- foreach ($declarations as $declaration)
+ foreach ($declarations as $declaration)
{
if ($lastPropertyName)
{
@@ -990,7 +990,7 @@ public function apply(array &$tokens)
}
/**
* User defined sort function.
- *
+ *
* @return integer
*/
public static function userDefinedSort1($a, $b)
@@ -1001,7 +1001,7 @@ public static function userDefinedSort1($a, $b)
/**
* This {@link aCssToken CSS token} represents the start of a ruleset.
- *
+ *
* @package CssMin/Tokens
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -1013,14 +1013,14 @@ class CssRulesetStartToken extends aCssRulesetStartToken
{
/**
* Array of selectors.
- *
+ *
* @var array
*/
public $Selectors = array();
/**
* Set the properties of a ruleset token.
- *
- * @param array $selectors Selectors of the ruleset
+ *
+ * @param array $selectors Selectors of the ruleset
* @return void
*/
public function __construct(array $selectors = array())
@@ -1029,7 +1029,7 @@ public function __construct(array $selectors = array())
}
/**
* Implements {@link aCssToken::__toString()}.
- *
+ *
* @return string
*/
public function __toString()
@@ -1040,8 +1040,8 @@ public function __toString()
/**
* {@link aCssParserPlugin Parser plugin} for parsing ruleset block with including declarations.
- *
- * Found rulesets will add a {@link CssRulesetStartToken} and {@link CssRulesetEndToken} to the
+ *
+ * Found rulesets will add a {@link CssRulesetStartToken} and {@link CssRulesetEndToken} to the
* parser; including declarations as {@link CssRulesetDeclarationToken}.
*
* @package CssMin/Parser/Plugins
@@ -1055,7 +1055,7 @@ class CssRulesetParserPlugin extends aCssParserPlugin
{
/**
* Implements {@link aCssParserPlugin::getTriggerChars()}.
- *
+ *
* @return array
*/
public function getTriggerChars()
@@ -1064,7 +1064,7 @@ public function getTriggerChars()
}
/**
* Implements {@link aCssParserPlugin::getTriggerStates()}.
- *
+ *
* @return array
*/
public function getTriggerStates()
@@ -1073,13 +1073,13 @@ public function getTriggerStates()
}
/**
* Selectors.
- *
+ *
* @var array
*/
private $selectors = array();
/**
* Implements {@link aCssParserPlugin::parse()}.
- *
+ *
* @param integer $index Current index
* @param string $char Current char
* @param string $previousChar Previous char
@@ -1179,7 +1179,7 @@ public function parse($index, $char, $previousChar, $state)
*/
class CssRulesetEndToken extends aCssRulesetEndToken
{
-
+
}
/**
@@ -1196,13 +1196,13 @@ class CssRulesetDeclarationToken extends aCssDeclarationToken
{
/**
* Media types of the declaration.
- *
+ *
* @var array
*/
public $MediaTypes = array("all");
/**
- * Set the properties of a ddocument- or at-rule @media level declaration.
- *
+ * Set the properties of a ddocument- or at-rule @media level declaration.
+ *
* @param string $property Property of the declaration
* @param string $value Value of the declaration
* @param mixed $mediaTypes Media types of the declaration
@@ -1218,10 +1218,10 @@ public function __construct($property, $value, $mediaTypes = null, $isImportant
}
/**
- * This {@link aCssMinifierFilter minifier filter} sets the IsLast property of any last declaration in a ruleset,
- * @font-face at-rule or @page at-rule block. If the property IsLast is TRUE the decrations will get stringified
+ * This {@link aCssMinifierFilter minifier filter} sets the IsLast property of any last declaration in a ruleset,
+ * @font-face at-rule or @page at-rule block. If the property IsLast is TRUE the decrations will get stringified
* without tailing semicolon.
- *
+ *
* @package CssMin/Minifier/Filters
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -1233,7 +1233,7 @@ class CssRemoveLastDelarationSemiColonMinifierFilter extends aCssMinifierFilter
{
/**
* Implements {@link aCssMinifierFilter::filter()}.
- *
+ *
* @param array $tokens Array of objects of type aCssToken
* @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array
*/
@@ -1244,7 +1244,7 @@ public function apply(array &$tokens)
$current = get_class($tokens[$i]);
$next = isset($tokens[$i+1]) ? get_class($tokens[$i+1]) : false;
if (($current === "CssRulesetDeclarationToken" && $next === "CssRulesetEndToken") ||
- ($current === "CssAtFontFaceDeclarationToken" && $next === "CssAtFontFaceEndToken") ||
+ ($current === "CssAtFontFaceDeclarationToken" && $next === "CssAtFontFaceEndToken") ||
($current === "CssAtPageDeclarationToken" && $next === "CssAtPageEndToken"))
{
$tokens[$i]->IsLast = true;
@@ -1255,7 +1255,7 @@ public function apply(array &$tokens)
}
/**
- * This {@link aCssMinifierFilter minifier filter} will remove any empty rulesets (including @keyframes at-rule block
+ * This {@link aCssMinifierFilter minifier filter} will remove any empty rulesets (including @keyframes at-rule block
* rulesets).
*
* @package CssMin/Minifier/Filters
@@ -1269,7 +1269,7 @@ class CssRemoveEmptyRulesetsMinifierFilter extends aCssMinifierFilter
{
/**
* Implements {@link aCssMinifierFilter::filter()}.
- *
+ *
* @param array $tokens Array of objects of type aCssToken
* @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array
*/
@@ -1295,9 +1295,9 @@ public function apply(array &$tokens)
}
/**
- * This {@link aCssMinifierFilter minifier filter} will remove any empty @font-face, @keyframes, @media and @page
+ * This {@link aCssMinifierFilter minifier filter} will remove any empty @font-face, @keyframes, @media and @page
* at-rule blocks.
- *
+ *
* @package CssMin/Minifier/Filters
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -1309,7 +1309,7 @@ class CssRemoveEmptyAtBlocksMinifierFilter extends aCssMinifierFilter
{
/**
* Implements {@link aCssMinifierFilter::filter()}.
- *
+ *
* @param array $tokens Array of objects of type aCssToken
* @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array
*/
@@ -1337,7 +1337,7 @@ public function apply(array &$tokens)
/**
* This {@link aCssMinifierFilter minifier filter} will remove any comments from the array of parsed tokens.
- *
+ *
* @package CssMin/Minifier/Filters
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -1349,7 +1349,7 @@ class CssRemoveCommentsMinifierFilter extends aCssMinifierFilter
{
/**
* Implements {@link aCssMinifierFilter::filter()}.
- *
+ *
* @param array $tokens Array of objects of type aCssToken
* @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array
*/
@@ -1370,7 +1370,7 @@ public function apply(array &$tokens)
/**
* CSS Parser.
- *
+ *
* @package CssMin/Parser
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -1382,57 +1382,57 @@ class CssParser
{
/**
* Parse buffer.
- *
+ *
* @var string
*/
private $buffer = "";
/**
* {@link aCssParserPlugin Plugins}.
- *
+ *
* @var array
*/
private $plugins = array();
/**
* Source to parse.
- *
+ *
* @var string
*/
private $source = "";
/**
* Current state.
- *
+ *
* @var integer
*/
private $state = "T_DOCUMENT";
/**
* Exclusive state.
- *
+ *
* @var string
*/
private $stateExclusive = false;
/**
* Media types state.
- *
+ *
* @var mixed
*/
private $stateMediaTypes = false;
/**
* State stack.
- *
+ *
* @var array
*/
private $states = array("T_DOCUMENT");
/**
* Parsed tokens.
- *
+ *
* @var array
*/
private $tokens = array();
/**
* Constructer.
- *
+ *
* Create instances of the used {@link aCssParserPlugin plugins}.
- *
+ *
* @param string $source CSS source [optional]
* @param array $plugins Plugin configuration [optional]
* @return void
@@ -1478,7 +1478,7 @@ public function __construct($source = null, array $plugins = null)
}
/**
* Append a token to the array of tokens.
- *
+ *
* @param aCssToken $token Token to append
* @return void
*/
@@ -1488,7 +1488,7 @@ public function appendToken(aCssToken $token)
}
/**
* Clears the current buffer.
- *
+ *
* @return void
*/
public function clearBuffer()
@@ -1497,7 +1497,7 @@ public function clearBuffer()
}
/**
* Returns and clear the current buffer.
- *
+ *
* @param string $trim Chars to use to trim the returned buffer
* @param boolean $tolower if TRUE the returned buffer will get converted to lower case
* @return string
@@ -1510,7 +1510,7 @@ public function getAndClearBuffer($trim = "", $tolower = false)
}
/**
* Returns the current buffer.
- *
+ *
* @param string $trim Chars to use to trim the returned buffer
* @param boolean $tolower if TRUE the returned buffer will get converted to lower case
* @return string
@@ -1530,16 +1530,16 @@ public function getBuffer($trim = "", $tolower = false)
}
/**
* Returns the current media types state.
- *
+ *
* @return array
- */
+ */
public function getMediaTypes()
{
return $this->stateMediaTypes;
}
/**
* Returns the CSS source.
- *
+ *
* @return string
*/
public function getSource()
@@ -1548,7 +1548,7 @@ public function getSource()
}
/**
* Returns the current state.
- *
+ *
* @return integer The current state
*/
public function getState()
@@ -1557,8 +1557,8 @@ public function getState()
}
/**
* Returns a plugin by class name.
- *
- * @param string $name Class name of the plugin
+ *
+ * @param string $name Class name of the plugin
* @return aCssParserPlugin
*/
public function getPlugin($class)
@@ -1576,7 +1576,7 @@ public function getPlugin($class)
}
/**
* Returns the parsed tokens.
- *
+ *
* @return array
*/
public function getTokens()
@@ -1585,7 +1585,7 @@ public function getTokens()
}
/**
* Returns if the current state equals the passed state.
- *
+ *
* @param integer $state State to compare with the current state
* @return boolean TRUE is the state equals to the passed state; FALSE if not
*/
@@ -1595,7 +1595,7 @@ public function isState($state)
}
/**
* Parse the CSS source and return a array with parsed tokens.
- *
+ *
* @param string $source CSS source
* @return array Array with tokens
*/
@@ -1604,7 +1604,7 @@ public function parse($source)
// Reset
$this->source = "";
$this->tokens = array();
- // Create a global and plugin lookup table for trigger chars; set array of plugins as local variable and create
+ // Create a global and plugin lookup table for trigger chars; set array of plugins as local variable and create
// several helper variables for plugin handling
$globalTriggerChars = "";
$plugins = $this->plugins;
@@ -1658,7 +1658,7 @@ public function parse($source)
// Extended processing only if the current char is a global trigger char
if (strpos($globalTriggerChars, $c) !== false)
{
- // Exclusive state is set; process with the exclusive plugin
+ // Exclusive state is set; process with the exclusive plugin
if ($exclusive)
{
$tPluginIndex = $pluginIndex[$exclusive];
@@ -1710,7 +1710,7 @@ public function parse($source)
}
/**
* Remove the last state of the state stack and return the removed stack value.
- *
+ *
* @return integer Removed state value
*/
public function popState()
@@ -1721,7 +1721,7 @@ public function popState()
}
/**
* Adds a new state onto the state stack.
- *
+ *
* @param integer $state State to add onto the state stack.
* @return integer The index of the added state in the state stacks
*/
@@ -1733,37 +1733,37 @@ public function pushState($state)
}
/**
* Sets/restores the buffer.
- *
+ *
* @param string $buffer Buffer to set
* @return void
- */
+ */
public function setBuffer($buffer)
{
$this->buffer = $buffer;
}
/**
* Set the exclusive state.
- *
+ *
* @param string $exclusive Exclusive state
* @return void
- */
+ */
public function setExclusive($exclusive)
{
- $this->stateExclusive = $exclusive;
+ $this->stateExclusive = $exclusive;
}
/**
* Set the media types state.
- *
+ *
* @param array $mediaTypes Media types state
* @return void
- */
+ */
public function setMediaTypes(array $mediaTypes)
{
- $this->stateMediaTypes = $mediaTypes;
+ $this->stateMediaTypes = $mediaTypes;
}
/**
* Sets the current state in the state stack; equals to {@link CssParser::popState()} + {@link CssParser::pushState()}.
- *
+ *
* @param integer $state State to set
* @return integer
*/
@@ -1776,7 +1776,7 @@ public function setState($state)
}
/**
* Removes the exclusive state.
- *
+ *
* @return void
*/
public function unsetExclusive()
@@ -1785,7 +1785,7 @@ public function unsetExclusive()
}
/**
* Removes the media types state.
- *
+ *
* @return void
*/
public function unsetMediaTypes()
@@ -1796,7 +1796,7 @@ public function unsetMediaTypes()
/**
* {@link aCssFromatter Formatter} returning the CSS source in {@link http://goo.gl/j4XdU OTBS indent style} (The One True Brace Style).
- *
+ *
* @package CssMin/Formatter
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -1808,7 +1808,7 @@ class CssOtbsFormatter extends aCssFormatter
{
/**
* Implements {@link aCssFormatter::__toString()}.
- *
+ *
* @return string
*/
public function __toString()
@@ -1911,7 +1911,7 @@ class CssNullToken extends aCssToken
{
/**
* Implements {@link aCssToken::__toString()}.
- *
+ *
* @return string
*/
public function __toString()
@@ -1922,7 +1922,7 @@ public function __toString()
/**
* CSS Minifier.
- *
+ *
* @package CssMin/Minifier
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -1934,27 +1934,27 @@ class CssMinifier
{
/**
* {@link aCssMinifierFilter Filters}.
- *
+ *
* @var array
*/
private $filters = array();
/**
* {@link aCssMinifierPlugin Plugins}.
- *
+ *
* @var array
*/
private $plugins = array();
/**
* Minified source.
- *
+ *
* @var string
*/
private $minified = "";
/**
* Constructer.
- *
+ *
* Creates instances of {@link aCssMinifierFilter filters} and {@link aCssMinifierPlugin plugins}.
- *
+ *
* @param string $source CSS source [optional]
* @param array $filters Filter configuration [optional]
* @param array $plugins Plugin configuration [optional]
@@ -1965,7 +1965,7 @@ public function __construct($source = null, array $filters = null, array $plugin
$filters = array_merge(array
(
"ImportImports" => false,
- "RemoveComments" => true,
+ "RemoveComments" => true,
"RemoveEmptyRulesets" => true,
"RemoveEmptyAtBlocks" => true,
"ConvertLevel3Properties" => false,
@@ -2026,7 +2026,7 @@ public function __construct($source = null, array $filters = null, array $plugin
}
/**
* Returns the minified Source.
- *
+ *
* @return string
*/
public function getMinified()
@@ -2035,7 +2035,7 @@ public function getMinified()
}
/**
* Returns a plugin by class name.
- *
+ *
* @param string $name Class name of the plugin
* @return aCssMinifierPlugin
*/
@@ -2054,7 +2054,7 @@ public function getPlugin($class)
}
/**
* Minifies the CSS source.
- *
+ *
* @param string $source CSS source
* @return string
*/
@@ -2132,7 +2132,7 @@ public function minify($source)
/**
* CssMin - A (simple) css minifier with benefits
- *
+ *
* --
* Copyright (c) 2011 Joe Scylla
*
@@ -2142,10 +2142,10 @@ public function minify($source)
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -2154,7 +2154,7 @@ public function minify($source)
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
* --
- *
+ *
* @package CssMin
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -2166,25 +2166,25 @@ class CssMin
{
/**
* Index of classes
- *
+ *
* @var array
*/
private static $classIndex = array();
/**
* Parse/minify errors
- *
+ *
* @var array
*/
private static $errors = array();
/**
* Verbose output.
- *
+ *
* @var boolean
*/
private static $isVerbose = false;
/**
* {@link http://goo.gl/JrW54 Autoload} function of CssMin.
- *
+ *
* @param string $class Name of the class
* @return void
*/
@@ -2197,7 +2197,7 @@ public static function autoload($class)
}
/**
* Return errors
- *
+ *
* @return array of {CssError}.
*/
public static function getErrors()
@@ -2206,7 +2206,7 @@ public static function getErrors()
}
/**
* Returns if there were errors.
- *
+ *
* @return boolean
*/
public static function hasErrors()
@@ -2215,7 +2215,7 @@ public static function hasErrors()
}
/**
* Initialises CssMin.
- *
+ *
* @return void
*/
public static function initialise()
@@ -2243,8 +2243,8 @@ public static function initialise()
}
}
krsort(self::$classIndex);
- // Only use autoloading if spl_autoload_register() is available and no __autoload() is defined (because
- // __autoload() breaks if spl_autoload_register() is used.
+ // Only use autoloading if spl_autoload_register() is available and no __autoload() is defined (because
+ // __autoload() breaks if spl_autoload_register() is used.
if (function_exists("spl_autoload_register") && !is_callable("__autoload"))
{
spl_autoload_register(array(__CLASS__, "autoload"));
@@ -2263,7 +2263,7 @@ public static function initialise()
}
/**
* Minifies CSS source.
- *
+ *
* @param string $source CSS source
* @param array $filters Filter configuration [optional]
* @param array $plugins Plugin configuration [optional]
@@ -2277,7 +2277,7 @@ public static function minify($source, array $filters = null, array $plugins = n
}
/**
* Parse the CSS source.
- *
+ *
* @param string $source CSS source
* @param array $plugins Plugin configuration [optional]
* @return array Array of aCssToken
@@ -2290,7 +2290,7 @@ public static function parse($source, array $plugins = null)
}
/**
* --
- *
+ *
* @param boolean $to
* @return boolean
*/
@@ -2301,7 +2301,7 @@ public static function setVerbose($to)
}
/**
* --
- *
+ *
* @param CssError $error
* @return void
*/
@@ -2318,9 +2318,9 @@ public static function triggerError(CssError $error)
CssMin::initialise();
/**
- * This {@link aCssMinifierFilter minifier filter} import external css files defined with the @import at-rule into the
- * current stylesheet.
- *
+ * This {@link aCssMinifierFilter minifier filter} import external css files defined with the @import at-rule into the
+ * current stylesheet.
+ *
* @package CssMin/Minifier/Filters
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -2332,13 +2332,13 @@ class CssImportImportsMinifierFilter extends aCssMinifierFilter
{
/**
* Array with already imported external stylesheets.
- *
+ *
* @var array
*/
private $imported = array();
/**
* Implements {@link aCssMinifierFilter::filter()}.
- *
+ *
* @param array $tokens Array of objects of type aCssToken
* @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array
*/
@@ -2447,9 +2447,9 @@ public function apply(array &$tokens)
}
}
/*
- * If the media types of the @media at-rule equals the media types defined in the @import
+ * If the media types of the @media at-rule equals the media types defined in the @import
* at-rule remove the CssAtMediaStartToken and CssAtMediaEndToken token
- */
+ */
for($ii = 0, $ll = count($import); $ii < $ll; $ii++)
{
if (get_class($import[$ii]) === "CssAtMediaStartToken" && count(array_diff($tokens[$i]->MediaTypes, $import[$ii]->MediaTypes)) === 0)
@@ -2522,10 +2522,10 @@ public function apply(array &$tokens)
/**
* {@link aCssParserPlugin Parser plugin} for preserve parsing expression() declaration values.
- *
- * This plugin return no {@link aCssToken CssToken} but ensures that expression() declaration values will get parsed
+ *
+ * This plugin return no {@link aCssToken CssToken} but ensures that expression() declaration values will get parsed
* properly.
- *
+ *
* @package CssMin/Parser/Plugins
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -2537,19 +2537,19 @@ class CssExpressionParserPlugin extends aCssParserPlugin
{
/**
* Count of left braces.
- *
+ *
* @var integer
*/
private $leftBraces = 0;
/**
* Count of right braces.
- *
+ *
* @var integer
*/
private $rightBraces = 0;
/**
* Implements {@link aCssParserPlugin::getTriggerChars()}.
- *
+ *
* @return array
*/
public function getTriggerChars()
@@ -2558,7 +2558,7 @@ public function getTriggerChars()
}
/**
* Implements {@link aCssParserPlugin::getTriggerStates()}.
- *
+ *
* @return array
*/
public function getTriggerStates()
@@ -2567,7 +2567,7 @@ public function getTriggerStates()
}
/**
* Implements {@link aCssParserPlugin::parse()}.
- *
+ *
* @param integer $index Current index
* @param string $char Current char
* @param string $previousChar Previous char
@@ -2608,7 +2608,7 @@ public function parse($index, $char, $previousChar, $state)
/**
* CSS Error.
- *
+ *
* @package CssMin
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -2620,31 +2620,31 @@ class CssError
{
/**
* File.
- *
+ *
* @var string
*/
public $File = "";
/**
* Line.
- *
+ *
* @var integer
*/
public $Line = 0;
/**
* Error message.
- *
+ *
* @var string
*/
public $Message = "";
/**
* Source.
- *
+ *
* @var string
*/
public $Source = "";
/**
* Constructor triggering the error.
- *
+ *
* @param string $message Error message
* @param string $source Corresponding line [optional]
* @return void
@@ -2658,9 +2658,9 @@ public function __construct($file, $line, $message, $source = "")
}
/**
* Returns the error as formatted string.
- *
+ *
* @return string
- */
+ */
public function __toString()
{
return $this->Message . ($this->Source ? ":
" . $this->Source . "
": "") . "
in file " . $this->File . " at line " . $this->Line;
@@ -2669,12 +2669,12 @@ public function __toString()
/**
* This {@link aCssMinifierPlugin} will convert a color value in rgb notation to hexadecimal notation.
- *
+ *
* Example:
*
* color: rgb(200,60%,5);
*
- *
+ *
* Will get converted to:
*
* color:#c89905;
@@ -2691,13 +2691,13 @@ class CssConvertRgbColorsMinifierPlugin extends aCssMinifierPlugin
{
/**
* Regular expression matching the value.
- *
+ *
* @var string
*/
private $reMatch = "/rgb\s*\(\s*([0-9%]+)\s*,\s*([0-9%]+)\s*,\s*([0-9%]+)\s*\)/iS";
/**
* Implements {@link aCssMinifierPlugin::minify()}.
- *
+ *
* @param aCssToken $token Token to process
* @return boolean Return TRUE to break the processing of this token; FALSE to continue
*/
@@ -2720,7 +2720,7 @@ public function apply(aCssToken &$token)
}
/**
* Implements {@link aMinifierPlugin::getTriggerTokens()}
- *
+ *
* @return array
*/
public function getTriggerTokens()
@@ -2736,19 +2736,19 @@ public function getTriggerTokens()
/**
* This {@link aCssMinifierPlugin} will convert named color values to hexadecimal notation.
- *
+ *
* Example:
*
* color: black;
* border: 1px solid indigo;
*
- *
+ *
* Will get converted to:
*
* color:#000;
* border:1px solid #4b0082;
*
- *
+ *
* @package CssMin/Minifier/Plugins
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -2758,26 +2758,26 @@ public function getTriggerTokens()
*/
class CssConvertNamedColorsMinifierPlugin extends aCssMinifierPlugin
{
-
+
/**
* Regular expression matching the value.
- *
+ *
* @var string
*/
private $reMatch = null;
/**
* Regular expression replacing the value.
- *
+ *
* @var string
*/
private $reReplace = "\"\${1}\" . \$this->transformation[strtolower(\"\${2}\")] . \"\${3}\"";
/**
* Transformation table used by the {@link CssConvertNamedColorsMinifierPlugin::$reReplace replace regular expression}.
- *
+ *
* @var array
*/
private $transformation = array
- (
+ (
"aliceblue" => "#f0f8ff",
"antiquewhite" => "#faebd7",
"aqua" => "#0ff",
@@ -2917,10 +2917,10 @@ class CssConvertNamedColorsMinifierPlugin extends aCssMinifierPlugin
);
/**
* Overwrites {@link aCssMinifierPlugin::__construct()}.
- *
+ *
* The constructor will create the {@link CssConvertNamedColorsMinifierPlugin::$reReplace replace regular expression}
* based on the {@link CssConvertNamedColorsMinifierPlugin::$transformation transformation table}.
- *
+ *
* @param CssMinifier $minifier The CssMinifier object of this plugin.
* @param array $configuration Plugin configuration [optional]
* @return void
@@ -2932,7 +2932,7 @@ public function __construct(CssMinifier $minifier, array $configuration = array(
}
/**
* Implements {@link aCssMinifierPlugin::minify()}.
- *
+ *
* @param aCssToken $token Token to process
* @return boolean Return TRUE to break the processing of this token; FALSE to continue
*/
@@ -2953,7 +2953,7 @@ public function apply(aCssToken &$token)
}
/**
* Implements {@link aMinifierPlugin::getTriggerTokens()}
- *
+ *
* @return array
*/
public function getTriggerTokens()
@@ -2970,7 +2970,7 @@ public function getTriggerTokens()
/**
* This {@link aCssMinifierFilter minifier filter} triggers on CSS Level 3 properties and will add declaration tokens
* with browser-specific properties.
- *
+ *
* @package CssMin/Minifier/Filters
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -2981,9 +2981,9 @@ public function getTriggerTokens()
class CssConvertLevel3PropertiesMinifierFilter extends aCssMinifierFilter
{
/**
- * Css property transformations table. Used to convert CSS3 and proprietary properties to the browser-specific
+ * Css property transformations table. Used to convert CSS3 and proprietary properties to the browser-specific
* counterparts.
- *
+ *
* @var array
*/
private $transformations = array
@@ -3193,7 +3193,7 @@ class CssConvertLevel3PropertiesMinifierFilter extends aCssMinifierFilter
);
/**
* Implements {@link aCssMinifierFilter::filter()}.
- *
+ *
* @param array $tokens Array of objects of type aCssToken
* @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array
*/
@@ -3241,9 +3241,9 @@ public function apply(array &$tokens)
return $r;
}
/**
- * Transforms the Internet Explorer specific declaration property "filter" to Internet Explorer 8+ compatible
- * declaratiopn property "-ms-filter".
- *
+ * Transforms the Internet Explorer specific declaration property "filter" to Internet Explorer 8+ compatible
+ * declaratiopn property "-ms-filter".
+ *
* @param aCssToken $token
* @return array
*/
@@ -3257,7 +3257,7 @@ private static function filter($token)
}
/**
* Transforms "opacity: {value}" into browser specific counterparts.
- *
+ *
* @param aCssToken $token
* @return array
*/
@@ -3277,7 +3277,7 @@ private static function opacity($token)
}
/**
* Transforms "white-space: pre-wrap" into browser specific counterparts.
- *
+ *
* @param aCssToken $token
* @return array
*/
@@ -3309,7 +3309,7 @@ private static function whiteSpace($token)
/**
* This {@link aCssMinifierFilter minifier filter} will convert @keyframes at-rule block to browser specific counterparts.
- *
+ *
* @package CssMin/Minifier/Filters
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -3321,7 +3321,7 @@ class CssConvertLevel3AtKeyframesMinifierFilter extends aCssMinifierFilter
{
/**
* Implements {@link aCssMinifierFilter::filter()}.
- *
+ *
* @param array $tokens Array of objects of type aCssToken
* @return integer Count of added, changed or removed tokens; a return value larger than 0 will rebuild the array
*/
@@ -3378,17 +3378,17 @@ public function apply(array &$tokens)
/**
* This {@link aCssMinifierPlugin} will convert a color value in hsl notation to hexadecimal notation.
- *
+ *
* Example:
*
* color: hsl(232,36%,48%);
*
- *
+ *
* Will get converted to:
*
* color:#4e5aa7;
*
- *
+ *
* @package CssMin/Minifier/Plugins
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -3400,13 +3400,13 @@ class CssConvertHslColorsMinifierPlugin extends aCssMinifierPlugin
{
/**
* Regular expression matching the value.
- *
+ *
* @var string
*/
private $reMatch = "/^hsl\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*%\s*,\s*([0-9]+)\s*%\s*\)/iS";
/**
* Implements {@link aCssMinifierPlugin::minify()}.
- *
+ *
* @param aCssToken $token Token to process
* @return boolean Return TRUE to break the processing of this token; FALSE to continue
*/
@@ -3420,7 +3420,7 @@ public function apply(aCssToken &$token)
}
/**
* Implements {@link aMinifierPlugin::getTriggerTokens()}
- *
+ *
* @return array
*/
public function getTriggerTokens()
@@ -3434,9 +3434,9 @@ public function getTriggerTokens()
}
/**
* Convert a HSL value to hexadecimal notation.
- *
+ *
* Based on: {@link http://www.easyrgb.com/index.php?X=MATH&H=19#text19}.
- *
+ *
* @param integer $hue Hue
* @param integer $saturation Saturation
* @param integer $lightness Lightnesss
@@ -3472,7 +3472,7 @@ private function hsl2hex($hue, $saturation, $lightness)
}
/**
* Apply hue to a rgb color value.
- *
+ *
* @param integer $v1 Value 1
* @param integer $v2 Value 2
* @param integer $hue Hue
@@ -3506,13 +3506,13 @@ private function hue2rgb($v1, $v2, $hue)
/**
* This {@link aCssMinifierPlugin} will convert the font-weight values normal and bold to their numeric notation.
- *
+ *
* Example:
*
* font-weight: normal;
* font: bold 11px monospace;
*
- *
+ *
* Will get converted to:
*
* font-weight:400;
@@ -3530,8 +3530,8 @@ class CssConvertFontWeightMinifierPlugin extends aCssMinifierPlugin
{
/**
* Array of included declaration properties this plugin will process; others declaration properties will get
- * ignored.
- *
+ * ignored.
+ *
* @var array
*/
private $include = array
@@ -3541,19 +3541,19 @@ class CssConvertFontWeightMinifierPlugin extends aCssMinifierPlugin
);
/**
* Regular expression matching the value.
- *
+ *
* @var string
*/
private $reMatch = null;
/**
* Regular expression replace the value.
- *
+ *
* @var string
*/
private $reReplace = "\"\${1}\" . \$this->transformation[\"\${2}\"] . \"\${3}\"";
/**
* Transformation table used by the {@link CssConvertFontWeightMinifierPlugin::$reReplace replace regular expression}.
- *
+ *
* @var array
*/
private $transformation = array
@@ -3563,10 +3563,10 @@ class CssConvertFontWeightMinifierPlugin extends aCssMinifierPlugin
);
/**
* Overwrites {@link aCssMinifierPlugin::__construct()}.
- *
+ *
* The constructor will create the {@link CssConvertFontWeightMinifierPlugin::$reReplace replace regular expression}
* based on the {@link CssConvertFontWeightMinifierPlugin::$transformation transformation table}.
- *
+ *
* @param CssMinifier $minifier The CssMinifier object of this plugin.
* @return void
*/
@@ -3577,7 +3577,7 @@ public function __construct(CssMinifier $minifier)
}
/**
* Implements {@link aCssMinifierPlugin::minify()}.
- *
+ *
* @param aCssToken $token Token to process
* @return boolean Return TRUE to break the processing of this token; FALSE to continue
*/
@@ -3591,7 +3591,7 @@ public function apply(aCssToken &$token)
}
/**
* Implements {@link aMinifierPlugin::getTriggerTokens()}
- *
+ *
* @return array
*/
public function getTriggerTokens()
@@ -3607,21 +3607,21 @@ public function getTriggerTokens()
/**
* This {@link aCssMinifierPlugin} will compress several unit values to their short notations. Examples:
- *
+ *
*
* padding: 0.5em;
* border: 0px;
* margin: 0 0 0 0;
*
- *
+ *
* Will get compressed to:
- *
+ *
*
* padding:.5px;
* border:0;
* margin:0;
*
- *
+ *
* --
*
* @package CssMin/Minifier/Plugins
@@ -3635,7 +3635,7 @@ class CssCompressUnitValuesMinifierPlugin extends aCssMinifierPlugin
{
/**
* Regular expression used for matching and replacing unit values.
- *
+ *
* @var array
*/
private $re = array
@@ -3646,13 +3646,13 @@ class CssCompressUnitValuesMinifierPlugin extends aCssMinifierPlugin
);
/**
* Regular expression matching the value.
- *
+ *
* @var string
*/
private $reMatch = "/(^| |-)0\.([0-9]+?)(0+)?(%|em|ex|px|in|cm|mm|pt|pc)|(^| )-?(\.?)0(%|em|ex|px|in|cm|mm|pt|pc)|(^0\s0\s0\s0$)|(^0\s0\s0$)|(^0\s0$)/iS";
/**
* Implements {@link aCssMinifierPlugin::minify()}.
- *
+ *
* @param aCssToken $token Token to process
* @return boolean Return TRUE to break the processing of this token; FALSE to continue
*/
@@ -3669,7 +3669,7 @@ public function apply(aCssToken &$token)
}
/**
* Implements {@link aMinifierPlugin::getTriggerTokens()}
- *
+ *
* @return array
*/
public function getTriggerTokens()
@@ -3685,10 +3685,10 @@ public function getTriggerTokens()
/**
* This {@link aCssMinifierPlugin} compress the content of expresssion() declaration values.
- *
- * For compression of expressions {@link https://github.com/rgrove/jsmin-php/ JSMin} will get used. JSMin have to be
- * already included or loadable via {@link http://goo.gl/JrW54 PHP autoloading}.
- *
+ *
+ * For compression of expressions {@link https://github.com/rgrove/jsmin-php/ JSMin} will get used. JSMin have to be
+ * already included or loadable via {@link http://goo.gl/JrW54 PHP autoloading}.
+ *
* @package CssMin/Minifier/Plugins
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -3700,7 +3700,7 @@ class CssCompressExpressionValuesMinifierPlugin extends aCssMinifierPlugin
{
/**
* Implements {@link aCssMinifierPlugin::minify()}.
- *
+ *
* @param aCssToken $token Token to process
* @return boolean Return TRUE to break the processing of this token; FALSE to continue
*/
@@ -3717,7 +3717,7 @@ public function apply(aCssToken &$token)
}
/**
* Implements {@link aMinifierPlugin::getTriggerTokens()}
- *
+ *
* @return array
*/
public function getTriggerTokens()
@@ -3732,19 +3732,19 @@ public function getTriggerTokens()
}
/**
- * This {@link aCssMinifierPlugin} will convert hexadecimal color value with 6 chars to their 3 char hexadecimal
- * notation (if possible).
- *
+ * This {@link aCssMinifierPlugin} will convert hexadecimal color value with 6 chars to their 3 char hexadecimal
+ * notation (if possible).
+ *
* Example:
*
* color: #aabbcc;
*
- *
+ *
* Will get converted to:
*
* color:#abc;
*
- *
+ *
* @package CssMin/Minifier/Plugins
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -3756,13 +3756,13 @@ class CssCompressColorValuesMinifierPlugin extends aCssMinifierPlugin
{
/**
* Regular expression matching 6 char hexadecimal color values.
- *
+ *
* @var string
*/
private $reMatch = "/\#([0-9a-f]{6})/iS";
/**
* Implements {@link aCssMinifierPlugin::minify()}.
- *
+ *
* @param aCssToken $token Token to process
* @return boolean Return TRUE to break the processing of this token; FALSE to continue
*/
@@ -3780,7 +3780,7 @@ public function apply(aCssToken &$token)
}
/**
* Implements {@link aMinifierPlugin::getTriggerTokens()}
- *
+ *
* @return array
*/
public function getTriggerTokens()
@@ -3796,7 +3796,7 @@ public function getTriggerTokens()
/**
* This {@link aCssToken CSS token} represents a CSS comment.
- *
+ *
* @package CssMin/Tokens
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -3808,14 +3808,14 @@ class CssCommentToken extends aCssToken
{
/**
* Comment as Text.
- *
+ *
* @var string
*/
public $Comment = "";
/**
* Set the properties of a comment token.
- *
- * @param string $comment Comment including comment delimiters
+ *
+ * @param string $comment Comment including comment delimiters
* @return void
*/
public function __construct($comment)
@@ -3824,7 +3824,7 @@ public function __construct($comment)
}
/**
* Implements {@link aCssToken::__toString()}.
- *
+ *
* @return string
*/
public function __toString()
@@ -3835,9 +3835,9 @@ public function __toString()
/**
* {@link aCssParserPlugin Parser plugin} for parsing comments.
- *
+ *
* Adds a {@link CssCommentToken} to the parser if a comment was found.
- *
+ *
* @package CssMin/Parser/Plugins
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -3849,7 +3849,7 @@ class CssCommentParserPlugin extends aCssParserPlugin
{
/**
* Implements {@link aCssParserPlugin::getTriggerChars()}.
- *
+ *
* @return array
*/
public function getTriggerChars()
@@ -3858,7 +3858,7 @@ public function getTriggerChars()
}
/**
* Implements {@link aCssParserPlugin::getTriggerStates()}.
- *
+ *
* @return array
*/
public function getTriggerStates()
@@ -3867,13 +3867,13 @@ public function getTriggerStates()
}
/**
* Stored buffer for restore.
- *
+ *
* @var string
*/
private $restoreBuffer = "";
/**
* Implements {@link aCssParserPlugin::parse()}.
- *
+ *
* @param integer $index Current index
* @param string $char Current char
* @param string $previousChar Previous char
@@ -3916,13 +3916,13 @@ class CssAtVariablesStartToken extends aCssAtBlockStartToken
{
/**
* Media types of the @variables at-rule block.
- *
+ *
* @var array
*/
public $MediaTypes = array();
/**
* Set the properties of a @variables at-rule token.
- *
+ *
* @param array $mediaTypes Media types
* @return void
*/
@@ -3932,7 +3932,7 @@ public function __construct($mediaTypes = null)
}
/**
* Implements {@link aCssToken::__toString()}.
- *
+ *
* @return string
*/
public function __toString()
@@ -3943,10 +3943,10 @@ public function __toString()
/**
* {@link aCssParserPlugin Parser plugin} for parsing @variables at-rule block with including declarations.
- *
- * Found @variables at-rule blocks will add a {@link CssAtVariablesStartToken} and {@link CssAtVariablesEndToken} to the
+ *
+ * Found @variables at-rule blocks will add a {@link CssAtVariablesStartToken} and {@link CssAtVariablesEndToken} to the
* parser; including declarations as {@link CssAtVariablesDeclarationToken}.
- *
+ *
* @package CssMin/Parser/Plugins
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -3958,7 +3958,7 @@ class CssAtVariablesParserPlugin extends aCssParserPlugin
{
/**
* Implements {@link aCssParserPlugin::getTriggerChars()}.
- *
+ *
* @return array
*/
public function getTriggerChars()
@@ -3967,7 +3967,7 @@ public function getTriggerChars()
}
/**
* Implements {@link aCssParserPlugin::getTriggerStates()}.
- *
+ *
* @return array
*/
public function getTriggerStates()
@@ -3976,7 +3976,7 @@ public function getTriggerStates()
}
/**
* Implements {@link aCssParserPlugin::parse()}.
- *
+ *
* @param integer $index Current index
* @param string $char Current char
* @param string $previousChar Previous char
@@ -4060,7 +4060,7 @@ class CssAtVariablesEndToken extends aCssAtBlockEndToken
{
/**
* Implements {@link aCssToken::__toString()}.
- *
+ *
* @return string
*/
public function __toString()
@@ -4071,7 +4071,7 @@ public function __toString()
/**
* This {@link aCssToken CSS token} represents a declaration of a @variables at-rule block.
- *
+ *
* @package CssMin/Tokens
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -4083,7 +4083,7 @@ class CssAtVariablesDeclarationToken extends aCssDeclarationToken
{
/**
* Implements {@link aCssToken::__toString()}.
- *
+ *
* @return string
*/
public function __toString()
@@ -4106,13 +4106,13 @@ class CssAtPageStartToken extends aCssAtBlockStartToken
{
/**
* Selector.
- *
+ *
* @var string
*/
public $Selector = "";
/**
* Sets the properties of the @page at-rule.
- *
+ *
* @param string $selector Selector
* @return void
*/
@@ -4122,7 +4122,7 @@ public function __construct($selector = "")
}
/**
* Implements {@link aCssToken::__toString()}.
- *
+ *
* @return string
*/
public function __toString()
@@ -4133,10 +4133,10 @@ public function __toString()
/**
* {@link aCssParserPlugin Parser plugin} for parsing @page at-rule block with including declarations.
- *
- * Found @page at-rule blocks will add a {@link CssAtPageStartToken} and {@link CssAtPageEndToken} to the
+ *
+ * Found @page at-rule blocks will add a {@link CssAtPageStartToken} and {@link CssAtPageEndToken} to the
* parser; including declarations as {@link CssAtPageDeclarationToken}.
- *
+ *
* @package CssMin/Parser/Plugins
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -4148,7 +4148,7 @@ class CssAtPageParserPlugin extends aCssParserPlugin
{
/**
* Implements {@link aCssParserPlugin::getTriggerChars()}.
- *
+ *
* @return array
*/
public function getTriggerChars()
@@ -4157,7 +4157,7 @@ public function getTriggerChars()
}
/**
* Implements {@link aCssParserPlugin::getTriggerStates()}.
- *
+ *
* @return array
*/
public function getTriggerStates()
@@ -4166,7 +4166,7 @@ public function getTriggerStates()
}
/**
* Implements {@link aCssParserPlugin::parse()}.
- *
+ *
* @param integer $index Current index
* @param string $char Current char
* @param string $previousChar Previous char
@@ -4255,12 +4255,12 @@ public function parse($index, $char, $previousChar, $state)
*/
class CssAtPageEndToken extends aCssAtBlockEndToken
{
-
+
}
/**
* This {@link aCssToken CSS token} represents a declaration of a @page at-rule block.
- *
+ *
* @package CssMin/Tokens
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -4270,7 +4270,7 @@ class CssAtPageEndToken extends aCssAtBlockEndToken
*/
class CssAtPageDeclarationToken extends aCssDeclarationToken
{
-
+
}
/**
@@ -4287,7 +4287,7 @@ class CssAtMediaStartToken extends aCssAtBlockStartToken
{
/**
* Sets the properties of the @media at-rule.
- *
+ *
* @param array $mediaTypes Media types
* @return void
*/
@@ -4297,7 +4297,7 @@ public function __construct(array $mediaTypes = array())
}
/**
* Implements {@link aCssToken::__toString()}.
- *
+ *
* @return string
*/
public function __toString()
@@ -4308,8 +4308,8 @@ public function __toString()
/**
* {@link aCssParserPlugin Parser plugin} for parsing @media at-rule block.
- *
- * Found @media at-rule blocks will add a {@link CssAtMediaStartToken} and {@link CssAtMediaEndToken} to the parser.
+ *
+ * Found @media at-rule blocks will add a {@link CssAtMediaStartToken} and {@link CssAtMediaEndToken} to the parser.
* This plugin will also set the the current media types using {@link CssParser::setMediaTypes()} and
* {@link CssParser::unsetMediaTypes()}.
*
@@ -4324,7 +4324,7 @@ class CssAtMediaParserPlugin extends aCssParserPlugin
{
/**
* Implements {@link aCssParserPlugin::getTriggerChars()}.
- *
+ *
* @return array
*/
public function getTriggerChars()
@@ -4333,7 +4333,7 @@ public function getTriggerChars()
}
/**
* Implements {@link aCssParserPlugin::getTriggerStates()}.
- *
+ *
* @return array
*/
public function getTriggerStates()
@@ -4342,7 +4342,7 @@ public function getTriggerStates()
}
/**
* Implements {@link aCssParserPlugin::parse()}.
- *
+ *
* @param integer $index Current index
* @param string $char Current char
* @param string $previousChar Previous char
@@ -4390,7 +4390,7 @@ public function parse($index, $char, $previousChar, $state)
*/
class CssAtMediaEndToken extends aCssAtBlockEndToken
{
-
+
}
/**
@@ -4407,19 +4407,19 @@ class CssAtKeyframesStartToken extends aCssAtBlockStartToken
{
/**
* Name of the at-rule.
- *
+ *
* @var string
*/
public $AtRuleName = "keyframes";
/**
* Name
- *
+ *
* @var string
*/
public $Name = "";
/**
* Sets the properties of the @page at-rule.
- *
+ *
* @param string $selector Selector
* @return void
*/
@@ -4433,7 +4433,7 @@ public function __construct($name, $atRuleName = null)
}
/**
* Implements {@link aCssToken::__toString()}.
- *
+ *
* @return string
*/
public function __toString()
@@ -4444,7 +4444,7 @@ public function __toString()
/**
* This {@link aCssToken CSS token} represents the start of a ruleset of a @keyframes at-rule block.
- *
+ *
* @package CssMin/Tokens
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -4456,14 +4456,14 @@ class CssAtKeyframesRulesetStartToken extends aCssRulesetStartToken
{
/**
* Array of selectors.
- *
+ *
* @var array
*/
public $Selectors = array();
/**
* Set the properties of a ruleset token.
- *
- * @param array $selectors Selectors of the ruleset
+ *
+ * @param array $selectors Selectors of the ruleset
* @return void
*/
public function __construct(array $selectors = array())
@@ -4472,7 +4472,7 @@ public function __construct(array $selectors = array())
}
/**
* Implements {@link aCssToken::__toString()}.
- *
+ *
* @return string
*/
public function __toString()
@@ -4483,7 +4483,7 @@ public function __toString()
/**
* This {@link aCssToken CSS token} represents the end of a ruleset of a @keyframes at-rule block.
- *
+ *
* @package CssMin/Tokens
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -4493,7 +4493,7 @@ public function __toString()
*/
class CssAtKeyframesRulesetEndToken extends aCssRulesetEndToken
{
-
+
}
/**
@@ -4508,12 +4508,12 @@ class CssAtKeyframesRulesetEndToken extends aCssRulesetEndToken
*/
class CssAtKeyframesRulesetDeclarationToken extends aCssDeclarationToken
{
-
+
}
/**
* {@link aCssParserPlugin Parser plugin} for parsing @keyframes at-rule blocks, rulesets and declarations.
- *
+ *
* @package CssMin/Parser/Plugins
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -4529,13 +4529,13 @@ class CssAtKeyframesParserPlugin extends aCssParserPlugin
private $atRuleName = "";
/**
* Selectors.
- *
+ *
* @var array
*/
private $selectors = array();
/**
* Implements {@link aCssParserPlugin::getTriggerChars()}.
- *
+ *
* @return array
*/
public function getTriggerChars()
@@ -4544,7 +4544,7 @@ public function getTriggerChars()
}
/**
* Implements {@link aCssParserPlugin::getTriggerStates()}.
- *
+ *
* @return array
*/
public function getTriggerStates()
@@ -4553,7 +4553,7 @@ public function getTriggerStates()
}
/**
* Implements {@link aCssParserPlugin::parse()}.
- *
+ *
* @param integer $index Current index
* @param string $char Current char
* @param string $previousChar Previous char
@@ -4562,7 +4562,7 @@ public function getTriggerStates()
public function parse($index, $char, $previousChar, $state)
{
// Start of @keyframes at-rule block
- if ($char === "@" && $state === "T_DOCUMENT" && strtolower(substr($this->parser->getSource(), $index, 10)) === "@keyframes")
+ if ($char === "@" && $state === "T_DOCUMENT" && strtolower(substr($this->parser->getSource(), $index, 10)) === "@keyframes")
{
$this->atRuleName = "keyframes";
$this->parser->pushState("T_AT_KEYFRAMES::NAME");
@@ -4652,7 +4652,7 @@ public function parse($index, $char, $previousChar, $state)
elseif ($char === "}" && $state === "T_AT_KEYFRAMES_RULESET")
{
$this->parser->clearBuffer();
-
+
$this->parser->popState();
$this->parser->appendToken(new CssAtKeyframesRulesetEndToken());
}
@@ -4683,12 +4683,12 @@ public function parse($index, $char, $previousChar, $state)
*/
class CssAtKeyframesEndToken extends aCssAtBlockEndToken
{
-
+
}
/**
* This {@link aCssToken CSS token} represents a @import at-rule.
- *
+ *
* @package CssMin/Tokens
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -4700,19 +4700,19 @@ class CssAtImportToken extends aCssToken
{
/**
* Import path of the @import at-rule.
- *
+ *
* @var string
*/
public $Import = "";
/**
* Media types of the @import at-rule.
- *
+ *
* @var array
*/
public $MediaTypes = array();
/**
* Set the properties of a @import at-rule token.
- *
+ *
* @param string $import Import path
* @param array $mediaTypes Media types
* @return void
@@ -4724,7 +4724,7 @@ public function __construct($import, $mediaTypes)
}
/**
* Implements {@link aCssToken::__toString()}.
- *
+ *
* @return string
*/
public function __toString()
@@ -4735,9 +4735,9 @@ public function __toString()
/**
* {@link aCssParserPlugin Parser plugin} for parsing @import at-rule.
- *
+ *
* If a @import at-rule was found this plugin will add a {@link CssAtImportToken} to the parser.
- *
+ *
* @package CssMin/Parser/Plugins
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -4749,7 +4749,7 @@ class CssAtImportParserPlugin extends aCssParserPlugin
{
/**
* Implements {@link aCssParserPlugin::getTriggerChars()}.
- *
+ *
* @return array
*/
public function getTriggerChars()
@@ -4758,7 +4758,7 @@ public function getTriggerChars()
}
/**
* Implements {@link aCssParserPlugin::getTriggerStates()}.
- *
+ *
* @return array
*/
public function getTriggerStates()
@@ -4767,7 +4767,7 @@ public function getTriggerStates()
}
/**
* Implements {@link aCssParserPlugin::parse()}.
- *
+ *
* @param integer $index Current index
* @param string $char Current char
* @param string $previousChar Previous char
@@ -4831,7 +4831,7 @@ class CssAtFontFaceStartToken extends aCssAtBlockStartToken
{
/**
* Implements {@link aCssToken::__toString()}.
- *
+ *
* @return string
*/
public function __toString()
@@ -4842,10 +4842,10 @@ public function __toString()
/**
* {@link aCssParserPlugin Parser plugin} for parsing @font-face at-rule block with including declarations.
- *
- * Found @font-face at-rule blocks will add a {@link CssAtFontFaceStartToken} and {@link CssAtFontFaceEndToken} to the
+ *
+ * Found @font-face at-rule blocks will add a {@link CssAtFontFaceStartToken} and {@link CssAtFontFaceEndToken} to the
* parser; including declarations as {@link CssAtFontFaceDeclarationToken}.
- *
+ *
* @package CssMin/Parser/Plugins
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -4857,7 +4857,7 @@ class CssAtFontFaceParserPlugin extends aCssParserPlugin
{
/**
* Implements {@link aCssParserPlugin::getTriggerChars()}.
- *
+ *
* @return array
*/
public function getTriggerChars()
@@ -4866,7 +4866,7 @@ public function getTriggerChars()
}
/**
* Implements {@link aCssParserPlugin::getTriggerStates()}.
- *
+ *
* @return array
*/
public function getTriggerStates()
@@ -4875,7 +4875,7 @@ public function getTriggerStates()
}
/**
* Implements {@link aCssParserPlugin::parse()}.
- *
+ *
* @param integer $index Current index
* @param string $char Current char
* @param string $previousChar Previous char
@@ -4963,7 +4963,7 @@ public function parse($index, $char, $previousChar, $state)
*/
class CssAtFontFaceEndToken extends aCssAtBlockEndToken
{
-
+
}
/**
@@ -4978,12 +4978,12 @@ class CssAtFontFaceEndToken extends aCssAtBlockEndToken
*/
class CssAtFontFaceDeclarationToken extends aCssDeclarationToken
{
-
+
}
/**
* This {@link aCssToken CSS token} represents a @charset at-rule.
- *
+ *
* @package CssMin/Tokens
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla
@@ -4995,13 +4995,13 @@ class CssAtCharsetToken extends aCssToken
{
/**
* Charset of the @charset at-rule.
- *
+ *
* @var string
*/
public $Charset = "";
/**
- * Set the properties of @charset at-rule token.
- *
+ * Set the properties of @charset at-rule token.
+ *
* @param string $charset Charset of the @charset at-rule token
* @return void
*/
@@ -5011,7 +5011,7 @@ public function __construct($charset)
}
/**
* Implements {@link aCssToken::__toString()}.
- *
+ *
* @return string
*/
public function __toString()
@@ -5022,7 +5022,7 @@ public function __toString()
/**
* {@link aCssParserPlugin Parser plugin} for parsing @charset at-rule.
- *
+ *
* If a @charset at-rule was found this plugin will add a {@link CssAtCharsetToken} to the parser.
*
* @package CssMin/Parser/Plugins
@@ -5036,7 +5036,7 @@ class CssAtCharsetParserPlugin extends aCssParserPlugin
{
/**
* Implements {@link aCssParserPlugin::getTriggerChars()}.
- *
+ *
* @return array
*/
public function getTriggerChars()
@@ -5045,7 +5045,7 @@ public function getTriggerChars()
}
/**
* Implements {@link aCssParserPlugin::getTriggerStates()}.
- *
+ *
* @return array
*/
public function getTriggerStates()
@@ -5054,7 +5054,7 @@ public function getTriggerStates()
}
/**
* Implements {@link aCssParserPlugin::parse()}.
- *
+ *
* @param integer $index Current index
* @param string $char Current char
* @param string $previousChar Previous char
diff --git a/admin/includes/class-wc-csv-exporter.php b/admin/includes/class-wc-csv-exporter.php
index d97f050777861..8a974c0b1a1f4 100644
--- a/admin/includes/class-wc-csv-exporter.php
+++ b/admin/includes/class-wc-csv-exporter.php
@@ -10,23 +10,23 @@
* @package WooCommerce/Classes
* @author WooThemes
*/
-
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
class WC_CSV_Exporter {
-
+
/**
* @var mixed
* @access private
*/
private $_csv = '';
-
+
/**
* @var string
* @access private
*/
private $_filename = '';
-
+
/**
* @var string
* @access private
@@ -35,80 +35,80 @@ class WC_CSV_Exporter {
/**
* __construct function.
- *
+ *
* @access public
* @param bool $output (default: true)
- * @param mixed $filename
+ * @param mixed $filename
* @return void
*/
function __construct( $columns = array(), $output = true, $filename = '' ) {
$this->_csv = '';
$this->_filename = $filename ? $filename : 'export.csv';
-
+
if ( $this->_output = $output )
$this->start();
-
+
if ( $columns )
$this->set_columns( $columns );
}
-
+
function set_filename( $filename ) {
$this->_filename = $filename ? $filename : 'export.csv';
}
-
+
/**
* set_columns function.
- *
+ *
* @access public
* @return void
*/
function set_columns( $columns = array() ) {
- $this->add_row( $columns );
+ $this->add_row( $columns );
unset( $columns );
}
-
+
/**
* add_row function.
- *
+ *
* @access public
* @return void
*/
function add_row( $row ) {
-
+
$row = implode( ',', array_map( array( &$this, 'wrap_column' ), $row ) ) . "\n";
-
- if ( $this->_output )
+
+ if ( $this->_output )
fwrite( $this->_csv, $row );
else
$this->_csv += $row;
-
+
unset( $row );
}
-
+
/**
* start function.
- *
+ *
* @access public
* @return void
*/
function start() {
if ( headers_sent() )
wp_die( 'Headers already sent' );
-
+
@set_time_limit(0);
@ob_clean();
-
+
header( "Content-Type: text/csv; charset=UTF-8" );
header( "Content-Disposition: attachment; filename={$this->_filename}" );
header( "Pragma: no-cache" );
header( "Expires: 0" );
-
+
$this->_csv = fopen( 'php://output', 'w') ;
}
-
+
/**
* end function.
- *
+ *
* @access public
* @return void
*/
@@ -116,10 +116,10 @@ function end() {
fclose( $this->_csv );
exit;
}
-
+
/**
* wrap_column function.
- *
+ *
* @access public
* @param mixed $data
* @return void
@@ -127,5 +127,5 @@ function end() {
function wrap_column( $data ) {
return '"' . str_replace( '"', '""', $data ) . '"';
}
-
+
}
\ No newline at end of file
diff --git a/admin/includes/notice-install.php b/admin/includes/notice-install.php
index ec5a25afb7989..41989954d386c 100644
--- a/admin/includes/notice-install.php
+++ b/admin/includes/notice-install.php
@@ -1,5 +1,5 @@
-