| 1 |
<?php |
| 2 |
|
| 3 |
class MPHB_Divi_Accommodation_Type_Title_Module extends MPHB_Divi_Abstract_Accommodation_Module { |
| 4 |
|
| 5 |
public $slug = 'mphb-divi-accommodation-type-title'; |
| 6 |
|
| 7 |
public function init() { |
| 8 |
$this->name = esc_html__( 'HB Acc. Type Title', 'mphb-divi' ); |
| 9 |
} |
| 10 |
|
| 11 |
public function mphb_get_fields() { |
| 12 |
return array( |
| 13 |
'link_to_post' => array( |
| 14 |
'label' => esc_html__( 'Link to post', 'mphb-divi' ), |
| 15 |
'type' => 'yes_no_button', |
| 16 |
'options' => array( |
| 17 |
'on' => esc_html__( 'Yes', 'mphb-divi' ), |
| 18 |
'off' => esc_html__( 'No', 'mphb-divi' ), |
| 19 |
), |
| 20 |
'default' => 'off', |
| 21 |
'computed_affects' => array( |
| 22 |
'__html', |
| 23 |
), |
| 24 |
), |
| 25 |
); |
| 26 |
} |
| 27 |
|
| 28 |
public function mphb_render_depends_on() { |
| 29 |
return array( 'link_to_post' ); |
| 30 |
} |
| 31 |
|
| 32 |
public static function get_html( $attrs = array() ) { |
| 33 |
return MPHB_Divi_Renderers::accommodation_title( $attrs ); |
| 34 |
} |
| 35 |
} |
| 36 |
|
| 37 |
new MPHB_Divi_Accommodation_Type_Title_Module(); |
| 38 |
|