WordPress at a glance
function is not described

Symfony\Component\CssSelector\XPath\Extension

NodeExtension::translateHash() public WC 1.0

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

No Hooks.

Return

XPathExpr. Nothing.

Usage

$NodeExtension = new NodeExtension();
$NodeExtension->translateHash( Node\HashNode $node, $translator );
Node\HashNode $node (required)
-
$translator(Translator) (required)
-

Code of NodeExtension::translateHash() WC 5.4.1

<?php
public function translateHash(Node\HashNode $node, Translator $translator)
{
    $xpath = $translator->nodeToXPath($node->getSelector());

    return $translator->addAttributeMatching($xpath, '=', '@id', $node->getId());
}