Addons.php
7 years ago
Admin.php
7 years ago
Ajax.php
7 years ago
Assets.php
7 years ago
Course.php
7 years ago
Gutenberg.php
7 years ago
Instructor.php
7 years ago
Instructors_List.php
7 years ago
Lesson.php
7 years ago
Options.php
7 years ago
Post_types.php
7 years ago
Q_and_A.php
7 years ago
Question.php
7 years ago
Question_Answers_List.php
7 years ago
Quiz.php
7 years ago
Quiz_Attempts_List.php
7 years ago
Rewrite_Rules.php
7 years ago
Shortcode.php
7 years ago
Student.php
7 years ago
Students_List.php
7 years ago
Template.php
7 years ago
Theme_Compatibility.php
7 years ago
Tools.php
7 years ago
Tutor.php
7 years ago
TutorEDD.php
7 years ago
Tutor_Base.php
7 years ago
Tutor_List_Table.php
7 years ago
User.php
7 years ago
Utils.php
7 years ago
Video_Stream.php
7 years ago
Withdraw.php
7 years ago
Withdraw_Requests_List.php
7 years ago
WooCommerce.php
7 years ago
User.php
29 lines
| 1 | <?php |
| 2 | |
| 3 | namespace TUTOR; |
| 4 | |
| 5 | |
| 6 | class User { |
| 7 | |
| 8 | public function __construct() { |
| 9 | add_action('edit_user_profile', array($this, 'edit_user_profile')); |
| 10 | add_action('show_user_profile', array($this, 'edit_user_profile'), 10, 1); |
| 11 | |
| 12 | add_action('profile_update', array($this, 'profile_update')); |
| 13 | } |
| 14 | |
| 15 | public function edit_user_profile($user){ |
| 16 | include tutor()->path.'views/metabox/user-profile-fields.php'; |
| 17 | } |
| 18 | |
| 19 | public function profile_update($user_id){ |
| 20 | $_tutor_profile_job_title = sanitize_text_field(tutor_utils()->avalue_dot('_tutor_profile_job_title', $_POST)); |
| 21 | $_tutor_profile_bio = wp_kses_post(tutor_utils()->avalue_dot('_tutor_profile_bio', $_POST)); |
| 22 | $_tutor_profile_photo = sanitize_text_field(tutor_utils()->avalue_dot('_tutor_profile_photo', $_POST)); |
| 23 | |
| 24 | update_user_meta($user_id, '_tutor_profile_job_title', $_tutor_profile_job_title); |
| 25 | update_user_meta($user_id, '_tutor_profile_bio', $_tutor_profile_bio); |
| 26 | update_user_meta($user_id, '_tutor_profile_photo', $_tutor_profile_photo); |
| 27 | } |
| 28 | |
| 29 | } |