| 1 |
<?php |
| 2 |
|
| 3 |
defined('ABSPATH') || exit; |
| 4 |
|
| 5 |
/** |
| 6 |
* Module Name: Post |
| 7 |
* Description: Display Posts |
| 8 |
*/ |
| 9 |
class TB_Post_Module extends Themify_Builder_Component_Module { |
| 10 |
|
| 11 |
public static function get_module_name():string { |
| 12 |
return __('Post', 'themify'); |
| 13 |
} |
| 14 |
|
| 15 |
public static function get_module_icon():string { |
| 16 |
return 'layers'; |
| 17 |
} |
| 18 |
|
| 19 |
public static function get_js_css():array { |
| 20 |
return array( |
| 21 |
'css' => 1 |
| 22 |
); |
| 23 |
} |
| 24 |
/** |
| 25 |
* Render plain content for static content. |
| 26 |
* |
| 27 |
* @param array $module |
| 28 |
* @return string |
| 29 |
*/ |
| 30 |
public static function get_static_content(array $module):string { |
| 31 |
return ''; // no static content for dynamic content |
| 32 |
} |
| 33 |
|
| 34 |
public static function get_translatable_text_fields( $module ) : array { |
| 35 |
return [ 'mod_title_post' ]; |
| 36 |
} |
| 37 |
|
| 38 |
public static function get_translatable_textarea_fields( $module ) : array { |
| 39 |
return [ 'no_posts_msg' ]; |
| 40 |
} |
| 41 |
} |
| 42 |
|
| 43 |
|