WordPress at a glance
function is not described

Symfony\Component\CssSelector\XPath\Extension

FunctionExtension::translateContains() public WC 1.0

{} It's a method of the class: FunctionExtension{}

No Hooks.

Return

XPathExpr.

Usage

$FunctionExtension = new FunctionExtension();
$FunctionExtension->translateContains( $xpath, $function );
$xpath(XPathExpr) (required)
-
$function(FunctionNode) (required)
-

Code of FunctionExtension::translateContains() WC 5.4.1

<?php
public function translateContains(XPathExpr $xpath, FunctionNode $function)
{
    $arguments = $function->getArguments();
    foreach ($arguments as $token) {
        if (!($token->isString() || $token->isIdentifier())) {
            throw new ExpressionErrorException(
                'Expected a single string or identifier for :contains(), got '
                .implode(', ', $arguments)
            );
        }
    }

    return $xpath->addCondition(sprintf(
        'contains(string(.), %s)',
        Translator::getXpathLiteral($arguments[0]->getValue())
    ));
}