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

HtmlExtension::translateDisabledpublicWC 1.0

Method of the class: HtmlExtension{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

HtmlExtension::translateDisabled() code WC 10.5.0

public function translateDisabled(XPathExpr $xpath): XPathExpr
{
    return $xpath->addCondition(
        '('
            .'@disabled and'
            .'('
                ."(name(.) = 'input' and @type != 'hidden')"
                ." or name(.) = 'button'"
                ." or name(.) = 'select'"
                ." or name(.) = 'textarea'"
                ." or name(.) = 'command'"
                ." or name(.) = 'fieldset'"
                ." or name(.) = 'optgroup'"
                ." or name(.) = 'option'"
            .')'
        .') or ('
            ."(name(.) = 'input' and @type != 'hidden')"
            ." or name(.) = 'button'"
            ." or name(.) = 'select'"
            ." or name(.) = 'textarea'"
        .')'
        .' and ancestor::fieldset[@disabled]'
    );
    // todo: in the second half, add "and is not a descendant of that fieldset element's first legend element child, if any."
}