PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.3.7
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.3.7
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 / templates / global / become-teacher-form.php

become-teacher-form.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.3.7, at templates/global/become-teacher-form.php

62 lines 2.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Template for displaying the form let user fill out their information to become a teacher.
4 *
5 * This template can be overridden by copying it to yourtheme/learnpress/global/become-teacher-form.php.
6 *
7 * @author ThimPress
8 * @package Learnpress/Templates
9 * @version 4.1.5.1
10 */
11
12 defined( 'ABSPATH' ) || exit();
13
14 $user = learn_press_get_current_user();
15 $bat_name = LP_Helper::sanitize_params_submitted( $_POST['bat_name'] ?? $user->get_display_name() );
16 $bat_email = LP_Helper::sanitize_params_submitted( $_POST['bat_email'] ?? $user->get_email() );
17 $bat_phone = LP_Helper::sanitize_params_submitted( $_POST['bat_phone'] ?? '' );
18 $bat_message = LP_Helper::sanitize_params_submitted( $_POST['bat_message'] ?? '' );
19 ?>
20
21 <div id="learn-press-become-teacher-form" class="become-teacher-form learn-press-form">
22 <?php if ( ! empty( $title ) ) : ?>
23 <h3><?php echo esc_html( $title ); ?></h3>
24 <?php endif ?>
25
26 <form name="become-teacher-form" method="post" enctype="multipart/form-data" action="">
27 <?php if ( ! empty( $description ) ) : ?>
28 <p class="become-teacher-form__description"><?php echo wp_kses_post( $description ); ?></p>
29 <?php endif ?>
30
31 <ul class="become-teacher-fields form-fields">
32 <?php do_action( 'learnpress/become-a-teacher/before-form' ); ?>
33
34 <li class="form-field">
35 <label for="bat_name"><?php esc_html_e( 'Name', 'learnpress' ); ?></label>
36 <input type="text" name="bat_name" required placeholder="<?php esc_attr_e( 'Your name', 'learnpress' ); ?>" value="<?php echo esc_attr( $bat_name ); ?>">
37 </li>
38 <li class="form-field">
39 <label for="bat_email"><?php esc_html_e( 'Email', 'learnpress' ); ?></label>
40 <input type="email" name="bat_email" required placeholder="<?php esc_attr_e( 'Your email address', 'learnpress' ); ?>" value="<?php echo esc_attr( $bat_email ); ?>">
41 </li>
42 <li class="form-field">
43 <label for="bat_phone"><?php esc_html_e( 'Phone', 'learnpress' ); ?></label>
44 <input type="text" name="bat_phone" placeholder="<?php esc_attr_e( 'Your phone number', 'learnpress' ); ?>" value="<?php echo esc_attr( $bat_phone ); ?>">
45 </li>
46 <li class="form-field">
47 <label for="bat_message"><?php esc_html_e( 'Message', 'learnpress' ); ?></label>
48 <textarea name="bat_message" placeholder="<?php esc_attr_e( 'Your message', 'learnpress' ); ?>"><?php echo esc_attr( $bat_message ); ?></textarea>
49 </li>
50
51 <?php do_action( 'learnpress/become-a-teacher/after-form' ); ?>
52
53 </ul>
54
55 <input type="hidden" name="request-become-a-teacher-nonce" value="<?php echo wp_create_nonce( 'request-become-a-teacher' ); ?>">
56
57 <button type="submit" data-text="<?php echo ! empty( $submit_button_process_text ) ? esc_attr( $submit_button_process_text ) : esc_attr__( 'Submitting', 'learnpress' ); ?>">
58 <?php echo ! empty( $submit_button_text ) ? esc_html( $submit_button_text ) : esc_html__( 'Submit', 'learnpress' ); ?>
59 </button>
60 </form>
61 </div>
62