PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.1.7.3.2
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.1.7.3.2
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
learnpress / inc / external-plugin / elementor / widgets / login-form.php

login-form.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.1.7.3.2, at inc/external-plugin/elementor/widgets/login-form.php

41 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Elementor;
3
4 class LP_Elementor_Widget_Login_Form extends LP_Elementor_Widget_Base {
5
6 public function get_name() {
7 return 'learnpress_login_form';
8 }
9
10 public function get_title() {
11 return esc_html__( 'Login Form', 'learnpress' );
12 }
13
14 public function get_keywords() {
15 return array( 'learnpress', 'login' );
16 }
17
18 public function get_icon() {
19 return 'eicon-lock-user';
20 }
21
22 protected function register_controls() {
23 $this->register_control_style_form_title( '.learn-press-form-login h3' );
24 $this->register_control_style_form_field( '.learn-press-form-login', '.form-field' );
25 $this->register_control_style_form_button( '.learn-press-form-login button[type="submit"]' );
26 $this->register_control_style_message();
27 }
28
29 public function render() {
30 if ( 'yes' !== \LP_Settings::get_option( 'enable_login_profile', 'no' ) ) {
31 learn_press_display_message( __( 'The login form is disabled', 'learnpress' ), 'error' );
32 }
33
34 if ( class_exists( '\Elementor\Plugin' ) && \Elementor\Plugin::$instance->editor->is_edit_mode() ) {
35 learn_press_get_template( 'global/form-login.php' );
36 } else {
37 echo LearnPress::instance()->template( 'profile' )->login_form();
38 }
39 }
40 }
41