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.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 / ExternalPlugin / Elementor / Widgets / RegisterUserFormElementor.php

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

50 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 Elementor\Plugin;
12 use LearnPress\ExternalPlugin\Elementor\LPElementorWidgetBase;
13 use LearnPress\Helpers\Config;
14
15 class RegisterUserFormElementor extends LPElementorWidgetBase {
16 public function __construct( $data = [], $args = null ) {
17 $this->title = esc_html__( 'Register Form', 'learnpress' );
18 $this->name = 'register_form';
19 $this->keywords = [ 'register' ];
20 $this->icon = 'eicon-lock-user';
21 parent::__construct( $data, $args );
22 }
23
24 protected function register_controls() {
25 $this->controls = Config::instance()->get( 'register-user-form', 'elementor' );
26 parent::register_controls();
27 }
28
29 public function render() {
30 try {
31 learn_press_show_message();
32 $settings = $this->get_settings_for_display();
33
34 if ( class_exists( '\Elementor\Plugin' ) && Plugin::$instance->editor->is_edit_mode() ) {
35 learn_press_get_template( 'global/form-register.php' );
36 } else {
37 \LearnPress::instance()->template( 'profile' )->register_form();
38 }
39 } catch ( \Throwable $e ) {
40 error_log( __METHOD__ . ' ' . $e->getMessage() );
41 }
42 }
43
44 public function get_style_depends() {
45 wp_register_style( 'learnpress', LP_PLUGIN_URL . 'assets/css/learnpress.css', array(), uniqid() );
46
47 return array( 'learnpress' );
48 }
49 }
50