PluginProbe ʕ •ᴥ•ʔ
Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress / trunk
Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress vtrunk
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 1 month ago account-settings.tmpl.php 3 years ago billing-details.tmpl.php 1 year ago change-password.tmpl.php 1 year ago dashboard.tmpl.php 3 years ago delete-account.tmpl.php 1 year ago downloads.tmpl.php 1 year ago edit-profile.tmpl.php 1 year ago email-notifications.tmpl.php 3 years ago index.php 5 years ago orders.tmpl.php 3 years ago subscriptions.tmpl.php 1 year ago view-order.tmpl.php 1 year ago view-subscription.tmpl.php 1 year ago
edit-profile.tmpl.php
218 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 do_action('ppress_myaccount_edit_profile_before');
17
18 $contact_infos = [];
19 $custom_fields = [];
20
21 if (ExtensionManager::is_enabled(ExtensionManager::CUSTOM_FIELDS)) {
22
23 $contact_infos = PROFILEPRESS_sql::get_contact_info_fields();
24
25 $custom_fields = PROFILEPRESS_sql::get_profile_custom_fields();
26 }
27
28 $success_message = EditUserProfile::get_success_message();
29
30 $custom_edit_profile = ppress_settings_by_key('myac_account_details_form', 'default', true);
31
32 $sub_menus = apply_filters('ppress_my_account_settings_sub_menus', ['general' => esc_html__('General', 'wp-user-avatar')]);
33 ?>
34 <div class="profilepress-myaccount-edit-profile">
35
36 <h2><?= esc_html__('Account Settings', 'wp-user-avatar') ?></h2>
37
38 <?php if (is_array($sub_menus) && count($sub_menus) > 1) : ?>
39 <div class="profilepress-myaccount-submenus-wrap">
40
41 <?php foreach ($sub_menus as $menu_id => $sub_menu) : ?>
42
43 <?php $is_active = ( ! isset($_GET['epview']) && $menu_id == 'general') || (isset($_GET['epview']) && $_GET['epview'] == $menu_id) ? ' ppsubmenu-active' : ''; ?>
44
45 <div class="profilepress-myaccount-submenu-wrap">
46 <a href="<?= esc_url(remove_query_arg('edit', add_query_arg('epview', $menu_id))) ?>" class="profilepress-myaccount-submenu-item<?= $is_active ?>">
47 <?= $sub_menu ?>
48 </a>
49 </div>
50
51 <?php endforeach; ?>
52
53 </div>
54 <?php endif; ?>
55
56 <?php if (isset($_GET['edit']) && $_GET['edit'] == 'true') : ?>
57 <?= $success_message ?>
58 <?php endif; ?>
59
60 <?php if ( ! empty($this->edit_profile_form_error) && is_string($this->edit_profile_form_error)) : ?>
61
62 <?php if (strpos($this->edit_profile_form_error, 'profilepress-edit-profile-status') !== false) : ?>
63 <?= $this->edit_profile_form_error ?>
64 <?php else : ?>
65 <div class="profilepress-edit-profile-status">
66 <?= $this->edit_profile_form_error ?>
67 </div>
68 <?php endif; ?>
69
70 <?php endif; ?>
71
72 <?php
73
74 if ('default' !== $custom_edit_profile) {
75 echo apply_filters(
76 'ppress_myaccount_edit_profile_custom_form',
77 do_shortcode(sprintf('[profilepress-edit-profile id="%s"]', absint($custom_edit_profile)), true)
78 );
79 } elseif ( ! empty($_GET['epview']) && $_GET['epview'] != 'general') {
80 do_action('ppress_myaccount_edit_profile_submenu_content', sanitize_text_field($_GET['epview']));
81 } else {
82
83 $cover_image_url = ppress_get_cover_image_url();
84
85 ob_start(); ?>
86 [pp-edit-profile-form]
87
88 <div class="profilepress-myaccount-form-wrap">
89
90 <div class="profilepress-myaccount-form-field pp-cover-image">
91 <div class="ppmyac-custom-file">
92 <?= '[edit-profile-cover-image id="pp-cover-image" class="ppmyac-custom-file-input"]' ?>
93 <label for="pp-cover-image" class="ppmyac-custom-file-label" data-browse="<?= esc_html__('Browse', 'wp-user-avatar'); ?>">
94 <?= esc_html__('Cover photo (min. width: 1000px)', 'wp-user-avatar') ?>
95 </label>
96 </div>
97 </div>
98
99 <div class="profilepress-myaccount-form-field pp-user-cover-image">
100 <div class="profilepress-myaccount-delete-cover-image-wrap">
101 <div class="profilepress-myaccount-cover-image">
102 <div class="profilepress-myaccount-has-cover-image" style="<?= ! $cover_image_url ? 'display:none' : '' ?>">
103 <?= '[pp-user-cover-image]'; ?>
104 </div>
105 <?= sprintf('[pp-remove-cover-image-button label="%s" class="ppmyac-remove-avatar"]', __('Remove', 'wp-user-avatar')); ?>
106 <div class="profilepress-myaccount-cover-image-empty" style="<?= $cover_image_url ? 'display:none' : '' ?>"></div>
107 </div>
108 </div>
109 </div>
110
111 <div class="profilepress-myaccount-form-field edit-profile-avatar">
112 <div class="ppmyac-custom-file">
113 <?= '[edit-profile-avatar id="pp-avatar" class="ppmyac-custom-file-input"]' ?>
114 <label for="pp-avatar" class="ppmyac-custom-file-label" data-browse="<?= esc_html__('Browse', 'wp-user-avatar'); ?>">
115 <?= esc_html__('Profile picture', 'wp-user-avatar') ?>
116 </label>
117 </div>
118 </div>
119
120 <div class="profilepress-myaccount-form-field delete-avatar">
121 <div class="profilepress-myaccount-delete-avatar-wrap">
122 <div class="profilepress-myaccount-delete-avatar">
123 <?= UserAvatar::get_avatar_img($current_user_id); ?>
124 <?= sprintf('[pp-remove-avatar-button label="%s" class="ppmyac-remove-avatar"]', __('Remove', 'wp-user-avatar')); ?>
125 </div>
126 </div>
127 </div>
128
129 <div class="profilepress-myaccount-form-field edit-profile-email">
130 <label for="edit-profile-email"><?= esc_html__('Email address', 'wp-user-avatar') ?></label>
131 <?= '[edit-profile-email id="edit-profile-email" class="profilepress-myaccount-form-control"]'; ?>
132 </div>
133
134 <div class="profilepress-myaccount-form-field edit-profile-first-name">
135 <label for="edit-profile-first-name"><?= esc_html__('First name', 'wp-user-avatar') ?></label>
136 <?= '[edit-profile-first-name id="edit-profile-first-name" class="profilepress-myaccount-form-control"]'; ?>
137 </div>
138
139 <div class="profilepress-myaccount-form-field edit-profile-last-name">
140 <label for="edit-profile-last-name"><?= esc_html__('Last name', 'wp-user-avatar') ?></label>
141 <?= '[edit-profile-last-name id="edit-profile-last-name" class="profilepress-myaccount-form-control"]'; ?>
142 </div>
143
144 <div class="profilepress-myaccount-form-field edit-profile-nickname">
145 <label for="edit-profile-nickname"><?= esc_html__('Nickname', 'wp-user-avatar') ?></label>
146 <?= '[edit-profile-nickname id="edit-profile-nickname" class="profilepress-myaccount-form-control"]'; ?>
147 </div>
148
149 <div class="profilepress-myaccount-form-field eup_display_name">
150 <label for="eup_display_name"><?= esc_html__('Display name publicly as', 'wp-user-avatar') ?></label>
151 <?php $this->display_name_select_dropdown(); ?>
152 </div>
153
154 <div class="profilepress-myaccount-form-field edit-profile-website">
155 <label for="edit-profile-website"><?= esc_html__('Website', 'wp-user-avatar') ?></label>
156 <?= '[edit-profile-website id="edit-profile-website" class="profilepress-myaccount-form-control"]'; ?>
157 </div>
158
159 <div class="profilepress-myaccount-form-field edit-profile-bio">
160 <label for="edit-profile-bio"><?= esc_html__('About yourself', 'wp-user-avatar') ?></label>
161 <?= '[edit-profile-bio id="edit-profile-bio" class="profilepress-myaccount-form-control"]'; ?>
162 </div>
163
164 <?php $billing_fields = CheckoutFields::standard_billing_fields() ?>
165
166 <?php if (is_array($contact_infos) && ! empty($contact_infos)) : ?>
167
168 <?php foreach ($contact_infos as $field_key => $label) : ?>
169 <?php if (in_array($field_key, array_keys($billing_fields))) continue; ?>
170 <?php if (apply_filters('ppress_myaccount_edit_profile_disable_' . $field_key, false, $current_user_id)) continue; ?>
171 <div class="profilepress-myaccount-form-field <?= $field_key ?>">
172 <label for="<?= $field_key ?>"><?= $label ?></label>
173 <?= sprintf('[edit-profile-cpf key="%1$s" id="%1$s" type="%2$s" class="profilepress-myaccount-form-control"]', $field_key, 'text'); ?>
174 </div>
175 <?php endforeach; ?>
176
177 <?php endif;
178
179 if (is_array($custom_fields) && ! empty($custom_fields)) : ?>
180
181 <?php foreach ($custom_fields as $custom_field) :
182
183 $field_key = $custom_field['field_key'];
184
185 if (in_array($field_key, array_keys($billing_fields))) continue;
186
187 // skip woocommerce core billing / shipping fields added to wordpress profile admin page.
188 if (in_array($field_key, ppress_woocommerce_billing_shipping_fields())) continue;
189
190 if (apply_filters('ppress_myaccount_edit_profile_disable_' . $field_key, false, $current_user_id)) continue;
191 ?>
192 <div class="profilepress-myaccount-form-field <?= $field_key ?>">
193 <?php if ($custom_field['type'] !== 'agreeable') : ?>
194 <label for="<?= $field_key ?>"><?= $custom_field['label_name'] ?></label>
195 <?php endif; ?>
196 <?= sprintf('[edit-profile-cpf id="%1$s" key="%1$s" type="%2$s" class="profilepress-myaccount-form-control"]', $field_key, $custom_field['type']) ?>
197 </div>
198 <?php endforeach; ?>
199
200 <?php endif; ?>
201
202 <div class="profilepress-myaccount-form-field edit-profile-submit">
203 <?= '[edit-profile-submit]'; ?>
204 </div>
205 </div>
206
207 <input type="hidden" name="ppmyac_form_action" value="updateProfile">
208
209 [/pp-edit-profile-form]
210
211 <?= do_shortcode(ob_get_clean(), true);
212 }
213 ?>
214 </div>
215 <?php
216
217 do_action('ppress_myaccount_edit_profile');
218