| 1 |
<?php if (! defined('ABSPATH')) exit; // Exit if accessed directly |
| 2 |
class HC3_Ui_Filter_SubHeader |
| 3 |
{ |
| 4 |
protected $htmlFactory = NULL; |
| 5 |
|
| 6 |
public function __construct( HC3_Ui $htmlFactory ) |
| 7 |
{ |
| 8 |
$this->htmlFactory = $htmlFactory; |
| 9 |
} |
| 10 |
|
| 11 |
public function process( $element ) |
| 12 |
{ |
| 13 |
$tags = $element->getTags(); |
| 14 |
if( ! in_array('sub-header', $tags) ){ |
| 15 |
return $element; |
| 16 |
} |
| 17 |
|
| 18 |
$element = $this->htmlFactory->makeBlock( $element ) |
| 19 |
->addAttr('class', 'hc-py1') |
| 20 |
->addAttr('class', 'hc-border-bottom') |
| 21 |
->addAttr('class', 'hc-border-gray') |
| 22 |
->addAttr('class', 'hc-border-bottom-dotted') |
| 23 |
; |
| 24 |
|
| 25 |
return $element; |
| 26 |
} |
| 27 |
} |