| 1 |
<?php |
| 2 |
if (!defined('ABSPATH')) |
| 3 |
exit; // Exit if accessed directly |
| 4 |
|
| 5 |
/** |
| 6 |
* Module Name: Link |
| 7 |
* Description: Display Link |
| 8 |
*/ |
| 9 |
class TB_Link_Block_Module extends Themify_Builder_Component_Module { |
| 10 |
|
| 11 |
|
| 12 |
public static function get_module_name():string { |
| 13 |
return __('Link Block', 'themify'); |
| 14 |
} |
| 15 |
|
| 16 |
public static function get_module_icon():string { |
| 17 |
return 'link'; |
| 18 |
} |
| 19 |
|
| 20 |
public static function get_js_css():array { |
| 21 |
return array( |
| 22 |
'css' => 1 |
| 23 |
); |
| 24 |
} |
| 25 |
|
| 26 |
public static function get_styling_image_fields() : array { |
| 27 |
return [ |
| 28 |
'background_image' => ' .tb_link_block_container' |
| 29 |
]; |
| 30 |
} |
| 31 |
|
| 32 |
public static function get_static_content(array $module):string { |
| 33 |
return ''; // no static content for dynamic content |
| 34 |
} |
| 35 |
|
| 36 |
public static function get_translatable_text_fields( $module ) : array { |
| 37 |
return [ 'heading', 'title' ]; |
| 38 |
} |
| 39 |
|
| 40 |
public static function get_translatable_textarea_fields( $module ) : array { |
| 41 |
return [ 'blurb' ]; |
| 42 |
} |
| 43 |
|
| 44 |
public static function get_translatable_link_fields( $module ) : array { |
| 45 |
return [ 'image', 'link' ]; |
| 46 |
} |
| 47 |
} |