| 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 BecomeATeacherElementor extends LPElementorWidgetBase { |
| 15 |
public function __construct( $data = [], $args = null ) { |
| 16 |
$this->title = esc_html__( 'Become a teacher', 'learnpress' ); |
| 17 |
$this->name = 'become_a_teacher'; |
| 18 |
$this->keywords = [ 'teacher', 'become' ]; |
| 19 |
$this->icon = 'eicon-site-logo'; |
| 20 |
parent::__construct( $data, $args ); |
| 21 |
} |
| 22 |
|
| 23 |
protected function register_controls() { |
| 24 |
$this->controls = Config::instance()->get( 'become-a-teacher', 'elementor/instructor' ); |
| 25 |
parent::register_controls(); |
| 26 |
} |
| 27 |
|
| 28 |
public function render() { |
| 29 |
$settings = $this->get_settings_for_display(); |
| 30 |
|
| 31 |
echo do_shortcode( '[learn_press_become_teacher_form title="' . $settings['title'] . '" description="' . $settings['description'] . '" submit_button_text="' . esc_html( $settings['submit_button_text'] ) . '" submit_button_process_text="' . $settings['submit_button_process_text'] . '"]' ); |
| 32 |
} |
| 33 |
|
| 34 |
public function get_style_depends() { |
| 35 |
wp_register_style( 'learnpress', LP_PLUGIN_URL . 'assets/css/learnpress.css', array(), uniqid() ); |
| 36 |
|
| 37 |
return array( 'learnpress' ); |
| 38 |
} |
| 39 |
} |
| 40 |
|