1: <?php
2:
3: 4: 5:
6: class Papi_Property_Divider extends Papi_Property {
7:
8: 9: 10:
11: public function html() {
12: $options = $this->get_options();
13:
14: papi_render_html_tag( 'div', [
15: 'class' => 'papi-property-divider',
16: 'data-papi-rule' => $this->html_name(),
17: sprintf( '<h3><span>%s</span></h3>', $options->title )
18: ] );
19:
20: if ( ! papi_is_empty( $options->description ) ) {
21: echo sprintf( '<p>%s</p>', $options->description );
22: }
23: }
24:
25: 26: 27:
28: protected function render_row_html() {
29: if ( $this->get_option( 'raw' ) ) {
30: parent::render_row_html();
31: } else {
32: ?>
33: <tr class="<?php echo $this->display ? '' : 'papi-hide'; ?>">
34: <td colspan="2">
35: <?php $this->render_property_html(); ?>
36: </td>
37: </tr>
38: <?php
39: }
40: }
41: }
42: