Apple_Exporter\Components\Embed_Web_Video::is_embed_web_video PHP Method

is_embed_web_video() public static method

Test if this node is a match based on the node type and URL format.
public static is_embed_web_video ( DomNode $node, string $pattern ) : boolean
$node DomNode
$pattern string
return boolean
    public static function is_embed_web_video($node, $pattern)
    {
        return 'p' == $node->nodeName && preg_match($pattern, trim($node->nodeValue)) || 'iframe' == $node->nodeName && preg_match($pattern, trim($node->getAttribute('src')));
    }