WordPress at a glance
function is not described

Symfony\Component\CssSelector\XPath

Translator::addFunction() public WC 1.0

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

No Hooks.

Return

XPathExpr. Nothing.

Usage

$Translator = new Translator();
$Translator->addFunction( $xpath, $function );
$xpath(XPathExpr) (required)
-
$function(FunctionNode) (required)
-

Code of Translator::addFunction() WC 5.4.1

<?php
public function addFunction(XPathExpr $xpath, FunctionNode $function)
{
    if (!isset($this->functionTranslators[$function->getName()])) {
        throw new ExpressionErrorException(sprintf('Function "%s" not supported.', $function->getName()));
    }

    return call_user_func($this->functionTranslators[$function->getName()], $xpath, $function);
}