PluginProbe
Themify Builder / 7.6.2
Themify Builder v7.6.2
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-login.php

module-login.php in Themify Builder 7.6.2, at modules/module-login.php

55 lines 1.6 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: Login
6 * Description: Displays login form
7 */
8 class TB_Login_Module extends Themify_Builder_Component_Module {
9
10 public static function get_module_name():string {
11 return __('Login', 'themify');
12 }
13
14 public static function get_module_icon():string {
15 return 'unlock';
16 }
17
18 public static function get_js_css():array {
19 $_arr = array(
20 'css' => 1
21 );
22 if (!Themify_Builder_Model::is_front_builder_activate()) {
23 $_arr['js'] = 1;
24 }
25 return $_arr;
26 }
27
28 /**
29 * Render plain content for static content.
30 *
31 * @param array $module
32 * @return string
33 */
34 public static function get_static_content(array $module):string {
35 return sprintf( __( '<a href="%s" target="_blank">Click here to Login</a>', 'themify' ), esc_url( wp_login_url() ) );
36 }
37
38 public static function get_styling_image_fields() : array {
39 return [
40 'b_i' => ''
41 ];
42 }
43
44 public static function get_translatable_text_fields( $module ) : array {
45 return [ 'mod_title', 'label_username', 'label_password', 'label_remember', 'label_log_in', 'label_forgotten_password', 'lostpasswordform_label_username', 'lostpasswordform_label_reset' ];
46 }
47
48 public static function get_translatable_textarea_fields( $module ) : array {
49 return [ 'content_text', 'msg_fail' ];
50 }
51
52 public static function get_translatable_link_fields( $module ) : array {
53 return [ 'redirect_to', 'redirect_fail', 'lostpasswordform_redirect_to' ];
54 }
55 }