WordPress at Your Fingertips
function is not described

Pelago\Emogrifier\HtmlProcessor

CssToAttributeConverter::mapBorderProperty() private WC 1.0

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

No Hooks.

Return

null. Nothing.

Usage

// private - for code of main (parent) class only
$result = $this->mapBorderProperty( $node, $value );
$node(DOMElement) (required)
node to apply styles to
$value(string) (required)
the value of the style rule to map

Code of CssToAttributeConverter::mapBorderProperty() WC 5.5.2

<?php
private function mapBorderProperty(\DOMElement $node, $value)
{
    if (!$this->isTableOrImageNode($node)) {
        return;
    }

    if ($value === 'none' || $value === '0') {
        $node->setAttribute('border', '0');
    }
}