PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.3.8
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.3.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 4.2.1 All 138 releases
learnpress / inc / ExternalPlugin / Elementor / Widgets / LoginUserFormElementor.php

LoginUserFormElementor.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.3.8, at inc/ExternalPlugin/Elementor/Widgets/LoginUserFormElementor.php

49 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Class SingleInstructorElementor
4 *
5 * @sicne 4.2.3
6 * @version 1.0.0
7 */
8
9 namespace LearnPress\ExternalPlugin\Elementor\Widgets;
10
11 use LearnPress\ExternalPlugin\Elementor\LPElementorWidgetBase;
12 use LearnPress\Helpers\Config;
13
14 class LoginUserFormElementor extends LPElementorWidgetBase {
15 public function __construct( $data = [], $args = null ) {
16 $this->title = esc_html__( 'Login Form', 'learnpress' );
17 $this->name = 'login_form';
18 $this->keywords = [ 'login' ];
19 $this->icon = 'eicon-lock-user';
20 parent::__construct( $data, $args );
21 }
22
23 protected function register_controls() {
24 $this->controls = Config::instance()->get( 'login-user-form', 'elementor' );
25 parent::register_controls();
26 }
27
28 public function render() {
29 try {
30 learn_press_show_message();
31 $settings = $this->get_settings_for_display();
32
33 if ( class_exists( '\Elementor\Plugin' ) && \Elementor\Plugin::$instance->editor->is_edit_mode() ) {
34 learn_press_get_template( 'global/form-login.php' );
35 } else {
36 \LearnPress::instance()->template( 'profile' )->login_form();
37 }
38 } catch ( \Throwable $e ) {
39 error_log( __METHOD__ . ' ' . $e->getMessage() );
40 }
41 }
42
43 public function get_style_depends() {
44 wp_register_style( 'learnpress', LP_PLUGIN_URL . 'assets/css/learnpress.css', array(), uniqid() );
45
46 return array( 'learnpress' );
47 }
48 }
49