Automattic\WooCommerce\Vendor\Symfony\Component\CssSelector\XPath\Extension

HtmlExtension::translateEnabledpublicWC 1.0

Method of the class: HtmlExtension{}

No Hooks.

Returns

null. Nothing (null).

Usage

$HtmlExtension = new HtmlExtension();
$HtmlExtension->translateEnabled( $xpath ): XPathExpr;
$xpath(XPathExpr) (required)
.

HtmlExtension::translateEnabled() code WC 10.7.0

public function translateEnabled(XPathExpr $xpath): XPathExpr
{
    return $xpath->addCondition(
        '('
            .'@href and ('
                ."name(.) = 'a'"
                ." or name(.) = 'link'"
                ." or name(.) = 'area'"
            .')'
        .') or ('
            .'('
                ."name(.) = 'command'"
                ." or name(.) = 'fieldset'"
                ." or name(.) = 'optgroup'"
            .')'
            .' and not(@disabled)'
        .') or ('
            .'('
                ."(name(.) = 'input' and @type != 'hidden')"
                ." or name(.) = 'button'"
                ." or name(.) = 'select'"
                ." or name(.) = 'textarea'"
                ." or name(.) = 'keygen'"
            .')'
            .' and not (@disabled or ancestor::fieldset[@disabled])'
        .') or ('
            ."name(.) = 'option' and not("
                .'@disabled or ancestor::optgroup[@disabled]'
            .')'
        .')'
    );
}