| 1 |
<?php |
| 2 |
defined('ABSPATH') || exit; |
| 3 |
|
| 4 |
/** |
| 5 |
* Module Name: Alert |
| 6 |
* Description: Display Alert content |
| 7 |
*/ |
| 8 |
class TB_Alert_Module extends Themify_Builder_Component_Module { |
| 9 |
|
| 10 |
public static function get_module_name():string { |
| 11 |
return __('Alert', 'themify'); |
| 12 |
} |
| 13 |
|
| 14 |
public static function get_js_css():array { |
| 15 |
$_arr = array( |
| 16 |
'css' => 1 |
| 17 |
); |
| 18 |
if (!Themify_Builder_Model::is_front_builder_activate()) { |
| 19 |
$_arr['js'] = 1; |
| 20 |
} |
| 21 |
return $_arr; |
| 22 |
} |
| 23 |
|
| 24 |
public static function get_styling_image_fields() : array { |
| 25 |
return [ |
| 26 |
'background_image' => '' |
| 27 |
]; |
| 28 |
} |
| 29 |
|
| 30 |
public static function get_translatable_text_fields( $module ) : array { |
| 31 |
return [ 'mod_title_alert', 'heading_alert', 'action_btn_text_alert' ]; |
| 32 |
} |
| 33 |
|
| 34 |
public static function get_translatable_textarea_fields( $module ) : array { |
| 35 |
return [ 'text_alert', 'alert_message_text' ]; |
| 36 |
} |
| 37 |
|
| 38 |
public static function get_translatable_link_fields( $module ) : array { |
| 39 |
return [ 'action_btn_link_alert' ]; |
| 40 |
} |
| 41 |
} |