PluginProbe
Themify Builder / 7.7.7
Themify Builder v7.7.7
7.8.1 7.8.0 7.7.9 7.7.8 7.7.7 7.7.6 7.7.5 7.7.4 7.7.3 7.7.2 trunk 7.6.0 7.6.1 7.6.2 7.6.3 7.6.4 7.6.5 7.6.6 7.6.7 7.6.8 7.6.9 7.7.0 7.7.1
themify-builder / modules / module-copyright.php

module-copyright.php in Themify Builder 7.7.7, at modules/module-copyright.php

40 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 }