firstChild ) { return $content; } /** @var DOMElement $first_child */ $first_child = $dom->firstChild; $original = $first_child->getAttribute( 'style' ); if ( $border_color ) { $first_child->setAttribute( 'style', $original . ( $original ? ';' : '' ) . '--wp--custom--border--color:' . $border_color ); } $img = $first_child->getElementsByTagName( 'img' )->item( 0 ); if ( $img ) { $first_child->removeChild( $img ); } return $dom->saveHTML(); } return $content; }