| 1 |
<?php |
| 2 |
defined('ABSPATH') || exit; |
| 3 |
|
| 4 |
/** |
| 5 |
* Module Name: Star |
| 6 |
* Description: Display Rating Star |
| 7 |
*/ |
| 8 |
class TB_Star_Module extends Themify_Builder_Component_Module { |
| 9 |
|
| 10 |
|
| 11 |
public static function get_module_name():string { |
| 12 |
return __('Rating Star', 'themify'); |
| 13 |
} |
| 14 |
|
| 15 |
public static function get_module_icon():string { |
| 16 |
return 'star'; |
| 17 |
} |
| 18 |
|
| 19 |
public static function get_js_css():array { |
| 20 |
$_arr = array( |
| 21 |
'css' => 1 |
| 22 |
); |
| 23 |
if (!Themify_Builder_Model::is_front_builder_activate()) { |
| 24 |
$_arr['js'] = 1; |
| 25 |
} |
| 26 |
return $_arr; |
| 27 |
} |
| 28 |
|
| 29 |
public static function get_styling_image_fields() : array { |
| 30 |
return [ |
| 31 |
'background_image' => '' |
| 32 |
]; |
| 33 |
} |
| 34 |
|
| 35 |
public static function get_translatable_text_fields( $module ) : array { |
| 36 |
return [ 'm_t' ]; |
| 37 |
} |
| 38 |
|
| 39 |
public static function get_translatable_repeatable_fields( $module ) { |
| 40 |
return [ |
| 41 |
'rates' => [ |
| 42 |
'text_b' => 'LINE', |
| 43 |
'text_a' => 'LINE' |
| 44 |
] |
| 45 |
]; |
| 46 |
} |
| 47 |
} |