false,
'FoundPropertyForDeprecatedSniff' => false,
);
/**
* A list of tokenizers this sniff supports.
*
* @since 0.11.0
*
* @var array
*/
public $supportedTokenizers = array( 'PHP', 'CSS' );
/**
* Whether or not the sniff only checks for removal of the admin bar
* or any manipulation to the visibility of the admin bar.
*
* Defaults to true: only check for removal of the admin bar.
* Set to false to check for any form of manipulation of the visibility
* of the admin bar.
*
* @since 0.11.0
*
* @var bool
*/
public $remove_only = true;
/**
* Functions this sniff is looking for.
*
* @since 0.11.0
*
* @var array
*/
protected $target_functions = array(
'show_admin_bar' => true,
'add_filter' => true,
);
/**
* CSS properties this sniff is looking for.
*
* @since 0.11.0
*
* @var array
*/
protected $target_css_properties = array(
'visibility' => array(
'type' => '!=',
'value' => 'hidden',
),
'display' => array(
'type' => '!=',
'value' => 'none',
),
'opacity' => array(
'type' => '>',
'value' => 0.3,
),
);
/**
* CSS selectors this sniff is looking for.
*
* @since 0.11.0
*
* @var array
*/
protected $target_css_selectors = array(
'.show-admin-bar',
'#wpadminbar',
);
/**
* String tokens within PHP files we want to deal with.
*
* Set from the register() method.
*
* @since 0.11.0
*
* @var array
*/
private $string_tokens = array();
/**
* Regex template for use with the CSS selectors in combination with PHP text strings.
*
* @since 0.11.0
*
* @var string
*/
private $target_css_selectors_regex = '`(?:%s).*?\{(.*)$`';
/**
* Property to keep track of whether a ' ) ) {
// Make sure we check any content on this line before the closing style tag.
$this->in_style[ $file_name ] = false;
$content = trim( substr( $content, 0, strpos( $content, '' ) ) );
}
} elseif ( true === $this->has_html_open_tag( 'style', $stackPtr, $content ) ) {
// Ok, found a ' ) ) {
// Make sure we check any content on this line after the opening style tag.
$this->in_style[ $file_name ] = true;
$content = trim( substr( $content, ( strpos( $content, '