| 1 |
<?php |
| 2 |
defined('ABSPATH') || exit; |
| 3 |
|
| 4 |
/** |
| 5 |
* Module Name: Copyright |
| 6 |
* Description: Display copyright text |
| 7 |
*/ |
| 8 |
class TB_Copyright_Module extends Themify_Builder_Component_Module { |
| 9 |
|
| 10 |
|
| 11 |
public static function get_module_name():string { |
| 12 |
add_filter('themify_builder_active_vars',array(__CLASS__,'set_active_vars')); |
| 13 |
return __('Copyright', 'themify'); |
| 14 |
} |
| 15 |
|
| 16 |
public static function get_module_icon():string { |
| 17 |
return '-1'; |
| 18 |
} |
| 19 |
|
| 20 |
|
| 21 |
public static function set_active_vars(array $arr){ |
| 22 |
if(!is_admin()){ |
| 23 |
$arr['modules']['copyright']['site_data']=array( |
| 24 |
'site_name'=>get_bloginfo('name'), |
| 25 |
'site_description'=>get_bloginfo('description'), |
| 26 |
'site_url'=>home_url(), |
| 27 |
'year'=>wp_date('Y') |
| 28 |
); |
| 29 |
} |
| 30 |
return $arr; |
| 31 |
} |
| 32 |
|
| 33 |
public static function get_translatable_text_fields( $module ) : array { |
| 34 |
return [ 'title' ]; |
| 35 |
} |
| 36 |
|
| 37 |
public static function get_translatable_textarea_fields( $module ) : array { |
| 38 |
return [ 'text' ]; |
| 39 |
} |
| 40 |
} |