PluginProbe ʕ •ᴥ•ʔ
Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress / 4.0.3
Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress v4.0.3
4.16.19 4.16.18 4.16.17 4.16.16 trunk 1.0 1.0.1 1.0.2 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.5a 1.1.6 1.1.7 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.4 1.4.1 1.4.2 1.5 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.7 1.7.1 1.7.2 1.8 1.8.1 1.8.10 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9 1.9.1 1.9.10 1.9.11 1.9.12 1.9.13 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.1.9 2.2.10 2.2.11 2.2.12 2.2.13 2.2.14 2.2.15 2.2.16 2.2.2 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 3.0 3.1 3.1.1 3.1.10 3.1.11 3.1.12 3.1.13 3.1.14 3.1.15 3.1.16 3.1.17 3.1.18 3.1.19 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.10 3.2.11 3.2.12 3.2.13 3.2.14 3.2.15 3.2.16 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 4.0.0 4.0.1 4.0.2 4.0.3 4.1.0 4.1.1 4.1.2 4.1.3 4.1.4 4.10.0 4.10.1 4.10.2 4.10.3 4.11.0 4.12.0 4.13.0 4.13.1 4.13.2 4.13.3 4.13.4 4.14.0 4.14.1 4.14.2 4.14.3 4.14.4 4.15.0 4.15.1 4.15.10 4.15.11 4.15.12 4.15.13 4.15.14 4.15.15 4.15.16 4.15.17 4.15.18 4.15.19 4.15.2 4.15.20 4.15.20.1 4.15.21 4.15.22 4.15.23 4.15.24 4.15.25 4.15.3 4.15.4 4.15.5 4.15.6 4.15.7 4.15.8 4.15.9 4.16.0 4.16.1 4.16.10 4.16.11 4.16.12 4.16.13 4.16.14 4.16.15 4.16.2 4.16.3 4.16.4 4.16.5 4.16.6 4.16.7 4.16.8 4.16.9 4.2.0 4.3.0 4.3.1 4.3.2 4.4.0 4.4.1 4.5.0 4.5.1 4.5.2 4.5.3 4.5.4 4.5.5 4.6.0 4.7.0 4.8.0 4.9.0
wp-user-avatar / src / ShortcodeParser / MyAccount / edit-profile.tmpl.php
wp-user-avatar / src / ShortcodeParser / MyAccount Last commit date
MyAccountTag.php 3 years ago account-settings.tmpl.php 3 years ago billing-details.tmpl.php 3 years ago change-password.tmpl.php 3 years ago dashboard.tmpl.php 5 years ago edit-profile.tmpl.php 3 years ago email-notifications.tmpl.php 3 years ago index.php 5 years ago orders.tmpl.php 3 years ago subscriptions.tmpl.php 3 years ago view-order.tmpl.php 3 years ago view-subscription.tmpl.php 3 years ago
edit-profile.tmpl.php
209 lines
1 <?php
2
3 use ProfilePress\Core\Admin\ProfileCustomFields;
4 use ProfilePress\Core\Classes\EditUserProfile;
5 use ProfilePress\Core\Classes\ExtensionManager;
6 use ProfilePress\Core\Classes\PROFILEPRESS_sql;
7 use ProfilePress\Core\Classes\UserAvatar;
8 use ProfilePress\Core\Membership\CheckoutFields;
9
10 if ( ! defined('ABSPATH')) {
11 exit; // Exit if accessed directly
12 }
13
14 $current_user_id = get_current_user_id();
15
16 $contact_infos = [];
17 $custom_fields = [];
18
19 if (ExtensionManager::is_enabled(ExtensionManager::CUSTOM_FIELDS)) {
20
21 $contact_infos = PROFILEPRESS_sql::get_contact_info_fields();
22
23 $custom_fields = PROFILEPRESS_sql::get_profile_custom_fields();
24 }
25
26 $success_message = EditUserProfile::get_success_message();
27
28 $custom_edit_profile = ppress_settings_by_key('myac_account_details_form', 'default', true);
29
30 $sub_menus = apply_filters('ppress_my_account_settings_sub_menus', ['general' => esc_html__('General', 'wp-user-avatar')]);
31 ?>
32 <div class="profilepress-myaccount-edit-profile">
33
34 <h2><?= esc_html__('Account Settings', 'wp-user-avatar') ?></h2>
35
36 <?php if (is_array($sub_menus) && count($sub_menus) > 1) : ?>
37 <div class="profilepress-myaccount-submenus-wrap">
38
39 <?php foreach ($sub_menus as $menu_id => $sub_menu) : ?>
40
41 <?php $is_active = ( ! isset($_GET['epview']) && $menu_id == 'general') || (isset($_GET['epview']) && $_GET['epview'] == $menu_id) ? ' ppsubmenu-active' : ''; ?>
42
43 <div class="profilepress-myaccount-submenu-wrap">
44 <a href="<?= esc_url(remove_query_arg('edit', add_query_arg('epview', $menu_id))) ?>" class="profilepress-myaccount-submenu-item<?= $is_active ?>">
45 <?= $sub_menu ?>
46 </a>
47 </div>
48
49 <?php endforeach; ?>
50
51 </div>
52 <?php endif; ?>
53
54 <?php if (isset($_GET['edit']) && $_GET['edit'] == 'true') : ?>
55 <?= $success_message ?>
56 <?php endif; ?>
57
58 <?php if ( ! empty($this->edit_profile_form_error)) : ?>
59
60 <?php if (strpos($this->edit_profile_form_error, 'profilepress-edit-profile-status') !== false) : ?>
61 <?= $this->edit_profile_form_error ?>
62 <?php else : ?>
63 <div class="profilepress-edit-profile-status">
64 <?= $this->edit_profile_form_error ?>
65 </div>
66 <?php endif; ?>
67
68 <?php endif; ?>
69
70 <?php
71
72 if ('default' !== $custom_edit_profile) {
73 echo do_shortcode(sprintf('[profilepress-edit-profile id="%s"]', absint($custom_edit_profile)), true);
74 } elseif ( ! empty($_GET['epview']) && $_GET['epview'] != 'general') {
75 do_action('ppress_myaccount_edit_profile_submenu_content', sanitize_text_field($_GET['epview']));
76 } else {
77
78 $cover_image_url = ppress_get_cover_image_url();
79
80 ob_start(); ?>
81 [pp-edit-profile-form]
82
83 <div class="profilepress-myaccount-form-wrap">
84
85 <div class="profilepress-myaccount-form-field pp-cover-image">
86 <div class="ppmyac-custom-file">
87 <?= '[edit-profile-cover-image id="pp-cover-image" class="ppmyac-custom-file-input"]' ?>
88 <label for="pp-cover-image" class="ppmyac-custom-file-label" data-browse="<?= esc_html__('Browse', 'wp-user-avatar'); ?>">
89 <?= esc_html__('Cover photo (min. width: 1000px)', 'wp-user-avatar') ?>
90 </label>
91 </div>
92 </div>
93
94 <div class="profilepress-myaccount-form-field pp-user-cover-image">
95 <div class="profilepress-myaccount-delete-cover-image-wrap">
96 <div class="profilepress-myaccount-cover-image">
97 <div class="profilepress-myaccount-has-cover-image" style="<?= ! $cover_image_url ? 'display:none' : '' ?>">
98 <?= '[pp-user-cover-image]'; ?>
99 </div>
100 <?= sprintf('[pp-remove-cover-image-button label="%s" class="ppmyac-remove-avatar"]', __('Remove', 'wp-user-avatar')); ?>
101 <div class="profilepress-myaccount-cover-image-empty" style="<?= $cover_image_url ? 'display:none' : '' ?>"></div>
102 </div>
103 </div>
104 </div>
105
106 <div class="profilepress-myaccount-form-field edit-profile-avatar">
107 <div class="ppmyac-custom-file">
108 <?= '[edit-profile-avatar id="pp-avatar" class="ppmyac-custom-file-input"]' ?>
109 <label for="pp-avatar" class="ppmyac-custom-file-label" data-browse="<?= esc_html__('Browse', 'wp-user-avatar'); ?>">
110 <?= esc_html__('Profile picture', 'wp-user-avatar') ?>
111 </label>
112 </div>
113 </div>
114
115 <div class="profilepress-myaccount-form-field delete-avatar">
116 <div class="profilepress-myaccount-delete-avatar-wrap">
117 <div class="profilepress-myaccount-delete-avatar">
118 <?= UserAvatar::get_avatar_img($current_user_id); ?>
119 <?= sprintf('[pp-remove-avatar-button label="%s" class="ppmyac-remove-avatar"]', __('Remove', 'wp-user-avatar')); ?>
120 </div>
121 </div>
122 </div>
123
124 <div class="profilepress-myaccount-form-field edit-profile-email">
125 <label for="edit-profile-email"><?= esc_html__('Email address', 'wp-user-avatar') ?></label>
126 <?= '[edit-profile-email id="edit-profile-email" class="profilepress-myaccount-form-control"]'; ?>
127 </div>
128
129 <div class="profilepress-myaccount-form-field edit-profile-first-name">
130 <label for="edit-profile-first-name"><?= esc_html__('First name', 'wp-user-avatar') ?></label>
131 <?= '[edit-profile-first-name id="edit-profile-first-name" class="profilepress-myaccount-form-control"]'; ?>
132 </div>
133
134 <div class="profilepress-myaccount-form-field edit-profile-last-name">
135 <label for="edit-profile-last-name"><?= esc_html__('Last name', 'wp-user-avatar') ?></label>
136 <?= '[edit-profile-last-name id="edit-profile-last-name" class="profilepress-myaccount-form-control"]'; ?>
137 </div>
138
139 <div class="profilepress-myaccount-form-field edit-profile-nickname">
140 <label for="edit-profile-nickname"><?= esc_html__('Nickname', 'wp-user-avatar') ?></label>
141 <?= '[edit-profile-nickname id="edit-profile-nickname" class="profilepress-myaccount-form-control"]'; ?>
142 </div>
143
144 <div class="profilepress-myaccount-form-field eup_display_name">
145 <label for="eup_display_name"><?= esc_html__('Display name publicly as', 'wp-user-avatar') ?></label>
146 <?php $this->display_name_select_dropdown(); ?>
147 </div>
148
149 <div class="profilepress-myaccount-form-field edit-profile-website">
150 <label for="edit-profile-website"><?= esc_html__('Website', 'wp-user-avatar') ?></label>
151 <?= '[edit-profile-website id="edit-profile-website" class="profilepress-myaccount-form-control"]'; ?>
152 </div>
153
154 <div class="profilepress-myaccount-form-field edit-profile-bio">
155 <label for="edit-profile-bio"><?= esc_html__('About yourself', 'wp-user-avatar') ?></label>
156 <?= '[edit-profile-bio id="edit-profile-bio" class="profilepress-myaccount-form-control"]'; ?>
157 </div>
158
159 <?php $billing_fields = CheckoutFields::standard_billing_fields() ?>
160
161 <?php if (is_array($contact_infos) && ! empty($contact_infos)) : ?>
162
163 <?php foreach ($contact_infos as $field_key => $label) : ?>
164 <?php if (in_array($field_key, array_keys($billing_fields))) continue; ?>
165 <div class="profilepress-myaccount-form-field <?= $field_key ?>">
166 <label for="<?= $field_key ?>"><?= $label ?></label>
167 <?= sprintf('[edit-profile-cpf key="%1$s" id="%1$s" type="%2$s" class="profilepress-myaccount-form-control"]', $field_key, 'text'); ?>
168 </div>
169 <?php endforeach; ?>
170
171 <?php endif;
172
173 if (is_array($custom_fields) && ! empty($custom_fields)) : ?>
174
175 <?php foreach ($custom_fields as $custom_field) :
176
177 $field_key = $custom_field['field_key'];
178
179 if (in_array($field_key, array_keys($billing_fields))) continue;
180
181 // skip woocommerce core billing / shipping fields added to wordpress profile admin page.
182 if (in_array($field_key, ppress_woocommerce_billing_shipping_fields())) continue;
183 ?>
184 <div class="profilepress-myaccount-form-field <?= $field_key ?>">
185 <?php if ($custom_field['type'] !== 'agreeable') : ?>
186 <label for="<?= $field_key ?>"><?= $custom_field['label_name'] ?></label>
187 <?php endif; ?>
188 <?= sprintf('[edit-profile-cpf id="%1$s" key="%1$s" type="%2$s" class="profilepress-myaccount-form-control"]', $field_key, $custom_field['type']) ?>
189 </div>
190 <?php endforeach; ?>
191
192 <?php endif; ?>
193
194 <div class="profilepress-myaccount-form-field edit-profile-submit">
195 <?= '[edit-profile-submit]'; ?>
196 </div>
197 </div>
198
199 <input type="hidden" name="ppmyac_form_action" value="updateProfile">
200
201 [/pp-edit-profile-form]
202
203 <?= do_shortcode(ob_get_clean(), true);
204 }
205 ?>
206 </div>
207 <?php
208
209 do_action('ppress_myaccount_edit_profile');