WP User Avatar - Version 3.2.12

Version Description

  • Fixed user roles not recognized during member directory search.
  • Fixed fatal error caused by empty member directory search field.
  • Fixed bug with shortcodes not working in custom html.
  • Fixed conflict where media uploader was not working for other plugins.
  • Fixed Buddypress signup page override not working.
  • Fixed My Account page visitor redirect bug.
  • Improvement: scroll to member directory section after search.
  • Improved ajax login process.
  • Added Slim SEO compatibility.
Download this release

Release Info

Developer Collizo4sky
Plugin Icon 128x128 WP User Avatar
Version 3.2.12
Comparing to
See all releases

Code changes from version 3.2.11 to 3.2.12

changelog.txt CHANGED
@@ -1,5 +1,16 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 3.2.11 =
4
  * Fixed PHP Fatal error: Uncaught Error: Call to a member function wpua_get_default_avatar_url() on null
5
  * Upgrade jbox and flatpickr libs.
1
  == Changelog ==
2
 
3
+ = 3.2.12 =
4
+ * Fixed user roles not recognized during member directory search.
5
+ * Fixed fatal error caused by empty member directory search field.
6
+ * Fixed bug with shortcodes not working in custom html.
7
+ * Fixed conflict where media uploader was not working for other plugins.
8
+ * Fixed Buddypress signup page override not working.
9
+ * Fixed My Account page visitor redirect bug.
10
+ * Improvement: scroll to member directory section after search.
11
+ * Improved ajax login process.
12
+ * Added Slim SEO compatibility.
13
+
14
  = 3.2.11 =
15
  * Fixed PHP Fatal error: Uncaught Error: Call to a member function wpua_get_default_avatar_url() on null
16
  * Upgrade jbox and flatpickr libs.
deprecated/wp-user-avatar/includes/class-wp-user-avatar.php CHANGED
@@ -94,9 +94,10 @@ class WP_User_Avatar
94
  {
95
  global $post, $wpua_is_profile;
96
  // Get post ID so not to interfere with media uploads
97
- $post_id = is_object($post) ? $post->ID : 0;
98
  // Don't use post ID on front pages if there's a WPUA uploader
99
- $settings['post']['id'] = ( ! is_admin() && $wpua_is_profile == 1) ? 0 : $post_id;
 
 
100
 
101
  return $settings;
102
  }
94
  {
95
  global $post, $wpua_is_profile;
96
  // Get post ID so not to interfere with media uploads
 
97
  // Don't use post ID on front pages if there's a WPUA uploader
98
+ if ( ! is_admin() && $wpua_is_profile == 1) {
99
+ $settings['post']['id'] = 0;
100
+ }
101
 
102
  return $settings;
103
  }
languages/wp-user-avatar.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the ProfilePress package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: ProfilePress 3.2.11\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-user-avatar\n"
7
- "POT-Creation-Date: 2022-05-03 09:31:19+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -75,7 +75,7 @@ msgid "Default Profile Picture"
75
  msgstr ""
76
 
77
  #: deprecated/wp-user-avatar/includes/class-wp-user-avatar-admin.php:242
78
- #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:179
79
  msgid "Choose Image"
80
  msgstr ""
81
 
@@ -88,7 +88,7 @@ msgid "Remove"
88
  msgstr ""
89
 
90
  #: deprecated/wp-user-avatar/includes/class-wp-user-avatar-admin.php:243
91
- #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:205
92
  msgid "Undo"
93
  msgstr ""
94
 
@@ -134,64 +134,64 @@ msgid "Cover Photo"
134
  msgstr ""
135
 
136
  #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:73
137
- #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:185
138
  #: deprecated/wp-user-avatar/includes/tinymce/window.php:192
139
  msgid "Upload"
140
  msgstr ""
141
 
142
- #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:145
143
  #: src/RegisterScripts.php:73 src/RegisterScripts.php:128
144
  msgid "Are you sure?"
145
  msgstr ""
146
 
147
- #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:146
148
  #: src/RegisterScripts.php:74
149
  msgid "Deleting..."
150
  msgstr ""
151
 
152
- #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:147
153
  #: src/RegisterScripts.php:75
154
  msgid "An error occurred. Please try again."
155
  msgstr ""
156
 
157
- #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:188
158
  #: deprecated/wp-user-avatar/includes/wpua-options-page.php:38
159
  #: deprecated/wp-user-avatar/includes/wpua-options-page.php:70
160
  msgid "Maximum upload file size: %d%s."
161
  msgstr ""
162
 
163
- #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:189
164
  msgid "Allowed Files"
165
  msgstr ""
166
 
167
- #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:189
168
  msgid "<code>jpg jpeg png gif</code>"
169
  msgstr ""
170
 
171
- #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:195
172
  #: deprecated/wp-user-avatar/includes/tinymce/window.php:139
173
  msgid "Original Size"
174
  msgstr ""
175
 
176
- #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:199
177
  #: deprecated/wp-user-avatar/includes/tinymce/window.php:142
178
  msgid "Thumbnail"
179
  msgstr ""
180
 
181
- #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:202
182
  msgid "Remove Image"
183
  msgstr ""
184
 
185
- #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:252
186
  msgid "This file is not an image. Please try another."
187
  msgstr ""
188
 
189
- #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:256
190
- #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:283
191
  msgid "Memory exceeded. Please try another smaller file."
192
  msgstr ""
193
 
194
- #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:260
195
  msgid "Unable to create directory %s. Is its parent directory writable by the server?"
196
  msgstr ""
197
 
@@ -687,7 +687,7 @@ msgstr ""
687
  #: src/Admin/SettingsPages/DragDropBuilder/FieldBase.php:232
688
  #: src/Admin/SettingsPages/GeneralSettings.php:38
689
  #: src/Admin/SettingsPages/GeneralSettings.php:39
690
- #: src/Classes/Miscellaneous.php:17
691
  msgid "Settings"
692
  msgstr ""
693
 
@@ -982,7 +982,7 @@ msgstr ""
982
  #: src/Functions/GlobalFunctions.php:1279
983
  #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:318
984
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:208
985
- #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:460
986
  #: src/Themes/DragDrop/AbstractTheme.php:180
987
  #: src/Themes/DragDrop/MemberDirectory/DefaultTemplate.php:115
988
  #: src/Themes/DragDrop/UserProfile/DefaultTemplate.php:106
@@ -1017,7 +1017,7 @@ msgstr ""
1017
  #: src/Functions/GlobalFunctions.php:1276
1018
  #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:350
1019
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:209
1020
- #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:461
1021
  #: src/Themes/DragDrop/AbstractTheme.php:183
1022
  #: src/Themes/DragDrop/AbstractTheme.php:224
1023
  msgid "First Name"
@@ -1037,7 +1037,7 @@ msgstr ""
1037
  #: src/Functions/GlobalFunctions.php:1277
1038
  #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:383
1039
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:210
1040
- #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:462
1041
  #: src/Themes/DragDrop/AbstractTheme.php:186
1042
  #: src/Themes/DragDrop/AbstractTheme.php:227
1043
  msgid "Last Name"
@@ -1223,7 +1223,7 @@ msgstr ""
1223
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/Username.php:22
1224
  #: src/Functions/GlobalFunctions.php:1275
1225
  #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:135
1226
- #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:463
1227
  #: src/Themes/DragDrop/AbstractTheme.php:159
1228
  #: src/Themes/DragDrop/AbstractTheme.php:218
1229
  #: src/Themes/DragDrop/UserProfile/DefaultTemplate.php:105
@@ -4446,11 +4446,11 @@ msgstr ""
4446
  msgid "You are already logged in."
4447
  msgstr ""
4448
 
4449
- #: src/ShortcodeParser/MemberDirectoryTag.php:46
4450
  msgid "No member directory ID specified."
4451
  msgstr ""
4452
 
4453
- #: src/ShortcodeParser/MemberDirectoryTag.php:67
4454
  msgid "Member directory class not found. Please check it actually exist in ProfilePress."
4455
  msgstr ""
4456
 
@@ -4917,7 +4917,7 @@ msgid "Fields to show in sorting dropdown menu"
4917
  msgstr ""
4918
 
4919
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:244
4920
- #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:825
4921
  msgid "Search"
4922
  msgstr ""
4923
 
@@ -4981,19 +4981,19 @@ msgstr ""
4981
  msgid "No Result Text"
4982
  msgstr ""
4983
 
4984
- #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:458
4985
  msgid "Newest Users First"
4986
  msgstr ""
4987
 
4988
- #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:459
4989
  msgid "Oldest Users First"
4990
  msgstr ""
4991
 
4992
- #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:692
4993
  msgid "Sort by"
4994
  msgstr ""
4995
 
4996
- #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:729
4997
  msgid "More Filters"
4998
  msgstr ""
4999
 
2
  # This file is distributed under the same license as the ProfilePress package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: ProfilePress 3.2.12\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-user-avatar\n"
7
+ "POT-Creation-Date: 2022-05-20 13:26:57+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
75
  msgstr ""
76
 
77
  #: deprecated/wp-user-avatar/includes/class-wp-user-avatar-admin.php:242
78
+ #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:180
79
  msgid "Choose Image"
80
  msgstr ""
81
 
88
  msgstr ""
89
 
90
  #: deprecated/wp-user-avatar/includes/class-wp-user-avatar-admin.php:243
91
+ #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:206
92
  msgid "Undo"
93
  msgstr ""
94
 
134
  msgstr ""
135
 
136
  #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:73
137
+ #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:186
138
  #: deprecated/wp-user-avatar/includes/tinymce/window.php:192
139
  msgid "Upload"
140
  msgstr ""
141
 
142
+ #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:146
143
  #: src/RegisterScripts.php:73 src/RegisterScripts.php:128
144
  msgid "Are you sure?"
145
  msgstr ""
146
 
147
+ #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:147
148
  #: src/RegisterScripts.php:74
149
  msgid "Deleting..."
150
  msgstr ""
151
 
152
+ #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:148
153
  #: src/RegisterScripts.php:75
154
  msgid "An error occurred. Please try again."
155
  msgstr ""
156
 
157
+ #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:189
158
  #: deprecated/wp-user-avatar/includes/wpua-options-page.php:38
159
  #: deprecated/wp-user-avatar/includes/wpua-options-page.php:70
160
  msgid "Maximum upload file size: %d%s."
161
  msgstr ""
162
 
163
+ #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:190
164
  msgid "Allowed Files"
165
  msgstr ""
166
 
167
+ #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:190
168
  msgid "<code>jpg jpeg png gif</code>"
169
  msgstr ""
170
 
171
+ #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:196
172
  #: deprecated/wp-user-avatar/includes/tinymce/window.php:139
173
  msgid "Original Size"
174
  msgstr ""
175
 
176
+ #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:200
177
  #: deprecated/wp-user-avatar/includes/tinymce/window.php:142
178
  msgid "Thumbnail"
179
  msgstr ""
180
 
181
+ #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:203
182
  msgid "Remove Image"
183
  msgstr ""
184
 
185
+ #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:253
186
  msgid "This file is not an image. Please try another."
187
  msgstr ""
188
 
189
+ #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:257
190
+ #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:284
191
  msgid "Memory exceeded. Please try another smaller file."
192
  msgstr ""
193
 
194
+ #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:261
195
  msgid "Unable to create directory %s. Is its parent directory writable by the server?"
196
  msgstr ""
197
 
687
  #: src/Admin/SettingsPages/DragDropBuilder/FieldBase.php:232
688
  #: src/Admin/SettingsPages/GeneralSettings.php:38
689
  #: src/Admin/SettingsPages/GeneralSettings.php:39
690
+ #: src/Classes/Miscellaneous.php:20
691
  msgid "Settings"
692
  msgstr ""
693
 
982
  #: src/Functions/GlobalFunctions.php:1279
983
  #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:318
984
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:208
985
+ #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:477
986
  #: src/Themes/DragDrop/AbstractTheme.php:180
987
  #: src/Themes/DragDrop/MemberDirectory/DefaultTemplate.php:115
988
  #: src/Themes/DragDrop/UserProfile/DefaultTemplate.php:106
1017
  #: src/Functions/GlobalFunctions.php:1276
1018
  #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:350
1019
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:209
1020
+ #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:478
1021
  #: src/Themes/DragDrop/AbstractTheme.php:183
1022
  #: src/Themes/DragDrop/AbstractTheme.php:224
1023
  msgid "First Name"
1037
  #: src/Functions/GlobalFunctions.php:1277
1038
  #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:383
1039
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:210
1040
+ #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:479
1041
  #: src/Themes/DragDrop/AbstractTheme.php:186
1042
  #: src/Themes/DragDrop/AbstractTheme.php:227
1043
  msgid "Last Name"
1223
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/Username.php:22
1224
  #: src/Functions/GlobalFunctions.php:1275
1225
  #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:135
1226
+ #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:480
1227
  #: src/Themes/DragDrop/AbstractTheme.php:159
1228
  #: src/Themes/DragDrop/AbstractTheme.php:218
1229
  #: src/Themes/DragDrop/UserProfile/DefaultTemplate.php:105
4446
  msgid "You are already logged in."
4447
  msgstr ""
4448
 
4449
+ #: src/ShortcodeParser/MemberDirectoryTag.php:50
4450
  msgid "No member directory ID specified."
4451
  msgstr ""
4452
 
4453
+ #: src/ShortcodeParser/MemberDirectoryTag.php:71
4454
  msgid "Member directory class not found. Please check it actually exist in ProfilePress."
4455
  msgstr ""
4456
 
4917
  msgstr ""
4918
 
4919
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:244
4920
+ #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:844
4921
  msgid "Search"
4922
  msgstr ""
4923
 
4981
  msgid "No Result Text"
4982
  msgstr ""
4983
 
4984
+ #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:475
4985
  msgid "Newest Users First"
4986
  msgstr ""
4987
 
4988
+ #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:476
4989
  msgid "Oldest Users First"
4990
  msgstr ""
4991
 
4992
+ #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:711
4993
  msgid "Sort by"
4994
  msgstr ""
4995
 
4996
+ #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:748
4997
  msgid "More Filters"
4998
  msgstr ""
4999
 
readme.txt CHANGED
@@ -1,11 +1,11 @@
1
- === Membership, User Registration, Login Form & User Profile – ProfilePress (Formerly WP User Avatar) ===
2
  Contributors: properfraction, collizo4sky
3
  Donate link: https://profilepress.net/pricing/
4
  Tags: user registration, user profile, registration form, membership, login form, 2fa, two-factor authenticator, login, registration, password reset, members, users, profile, front-end profile, edit profile, avatar, profile picture
5
  Requires at least: 4.7
6
  Requires PHP: 7.1.0
7
- Tested up to: 5.9
8
- Stable tag: 3.2.11
9
  License: GPLv2 or later
10
 
11
  Modern membership plugin for user registration, login form, user profile, member directories & content restriction.
@@ -118,6 +118,17 @@ No. You can create and manage your forms, user profiles and member directories w
118
 
119
  == Changelog ==
120
 
 
 
 
 
 
 
 
 
 
 
 
121
  = 3.2.11 =
122
  * Fixed PHP Fatal error: Uncaught Error: Call to a member function wpua_get_default_avatar_url() on null
123
  * Upgrade jbox and flatpickr libs.
1
+ === Membership, User Registration, Login Form & User Profile – ProfilePress (Formerly WP User Avatar) ===
2
  Contributors: properfraction, collizo4sky
3
  Donate link: https://profilepress.net/pricing/
4
  Tags: user registration, user profile, registration form, membership, login form, 2fa, two-factor authenticator, login, registration, password reset, members, users, profile, front-end profile, edit profile, avatar, profile picture
5
  Requires at least: 4.7
6
  Requires PHP: 7.1.0
7
+ Tested up to: 6.0
8
+ Stable tag: 3.2.12
9
  License: GPLv2 or later
10
 
11
  Modern membership plugin for user registration, login form, user profile, member directories & content restriction.
118
 
119
  == Changelog ==
120
 
121
+ = 3.2.12 =
122
+ * Fixed user roles not recognized during member directory search.
123
+ * Fixed fatal error caused by empty member directory search field.
124
+ * Fixed bug with shortcodes not working in custom html.
125
+ * Fixed conflict where media uploader was not working for other plugins.
126
+ * Fixed Buddypress signup page override not working.
127
+ * Fixed My Account page visitor redirect bug.
128
+ * Improvement: scroll to member directory section after search.
129
+ * Improved ajax login process.
130
+ * Added Slim SEO compatibility.
131
+
132
  = 3.2.11 =
133
  * Fixed PHP Fatal error: Uncaught Error: Call to a member function wpua_get_default_avatar_url() on null
134
  * Upgrade jbox and flatpickr libs.
src/Classes/LoginAuth.php CHANGED
@@ -74,6 +74,7 @@ class LoginAuth
74
  }
75
 
76
  add_filter('wp_redirect', [__CLASS__, 'wp_redirect_intercept'], 999999999, 2);
 
77
 
78
  self::$redirect = $redirect;
79
  self::$secure_cookie = $secure_cookie;
74
  }
75
 
76
  add_filter('wp_redirect', [__CLASS__, 'wp_redirect_intercept'], 999999999, 2);
77
+ remove_all_actions('wp_login_failed');
78
 
79
  self::$redirect = $redirect;
80
  self::$secure_cookie = $secure_cookie;
src/Classes/Miscellaneous.php CHANGED
@@ -9,6 +9,9 @@ class Miscellaneous
9
  $basename = plugin_basename(PROFILEPRESS_SYSTEM_FILE_PATH);
10
  $prefix = is_network_admin() ? 'network_admin_' : '';
11
  add_filter("{$prefix}plugin_action_links_$basename", [$this, 'action_links'], 10, 4);
 
 
 
12
  }
13
 
14
  public function action_links($actions, $plugin_file, $plugin_data, $context)
@@ -21,6 +24,20 @@ class Miscellaneous
21
  return array_merge($custom_actions, $actions);
22
  }
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  public static function get_instance()
25
  {
26
  static $instance = null;
9
  $basename = plugin_basename(PROFILEPRESS_SYSTEM_FILE_PATH);
10
  $prefix = is_network_admin() ? 'network_admin_' : '';
11
  add_filter("{$prefix}plugin_action_links_$basename", [$this, 'action_links'], 10, 4);
12
+
13
+ // slim seo compatibility
14
+ add_filter('slim_seo_skipped_shortcodes', [$this, 'skip_ppress_shortcodes']);
15
  }
16
 
17
  public function action_links($actions, $plugin_file, $plugin_data, $context)
24
  return array_merge($custom_actions, $actions);
25
  }
26
 
27
+ public function skip_ppress_shortcodes($shortcodes)
28
+ {
29
+ $shortcodes[] = 'profilepress-registration';
30
+ $shortcodes[] = 'profilepress-login';
31
+ $shortcodes[] = 'profilepress-password-reset';
32
+ $shortcodes[] = 'profilepress-my-account';
33
+ $shortcodes[] = 'profilepress-member-directory';
34
+ $shortcodes[] = 'profilepress-melange';
35
+ $shortcodes[] = 'profilepress-user-profile';
36
+ $shortcodes[] = 'profilepress-edit-profile';
37
+
38
+ return $shortcodes;
39
+ }
40
+
41
  public static function get_instance()
42
  {
43
  static $instance = null;
src/Functions/GlobalFunctions.php CHANGED
@@ -369,12 +369,12 @@ function ppress_login_url($redirect = '')
369
  */
370
  function ppress_registration_url()
371
  {
372
- $reg_url = wp_registration_url();
373
-
374
  $page_id = ppress_get_setting('set_registration_url');
375
 
376
  if ( ! empty($page_id) && get_post_status($page_id)) {
377
  $reg_url = get_permalink($page_id);
 
 
378
  }
379
 
380
  return apply_filters('ppress_registration_url', $reg_url);
369
  */
370
  function ppress_registration_url()
371
  {
 
 
372
  $page_id = ppress_get_setting('set_registration_url');
373
 
374
  if ( ! empty($page_id) && get_post_status($page_id)) {
375
  $reg_url = get_permalink($page_id);
376
+ } else {
377
+ $reg_url = wp_registration_url();
378
  }
379
 
380
  return apply_filters('ppress_registration_url', $reg_url);
src/ShortcodeParser/Builder/GlobalShortcodes.php CHANGED
@@ -152,7 +152,7 @@ class GlobalShortcodes
152
  {
153
  $atts = shortcode_atts(['custom_html' => ''], $atts);
154
 
155
- return do_shortcode(stripslashes(wp_kses_post($atts['custom_html'])));
156
  }
157
 
158
  /**
152
  {
153
  $atts = shortcode_atts(['custom_html' => ''], $atts);
154
 
155
+ return do_shortcode(stripslashes(wp_kses_post(base64_decode($atts['custom_html']))));
156
  }
157
 
158
  /**
src/ShortcodeParser/MemberDirectoryTag.php CHANGED
@@ -22,12 +22,16 @@ class MemberDirectoryTag
22
  $url = ppress_get_current_url_raw();
23
 
24
  if ( ! empty($_GET['ppmd-search']) &&
25
- ( ! empty($_GET['search-' . $directory_id]) || ! empty(array_filter($_GET['filters'])))
 
 
26
  ) {
27
 
28
  $url = add_query_arg([
29
  sprintf('filter%s', absint($_GET['ppmd-search'])) => base64_encode(wp_json_encode($_GET))
30
  ], ppress_get_current_url_raw());
 
 
31
  }
32
 
33
  wp_safe_redirect($url);
22
  $url = ppress_get_current_url_raw();
23
 
24
  if ( ! empty($_GET['ppmd-search']) &&
25
+ (
26
+ ! empty($_GET['search-' . $directory_id]) || (is_array($_GET['filters']) && ! empty(array_filter($_GET['filters'])))
27
+ )
28
  ) {
29
 
30
  $url = add_query_arg([
31
  sprintf('filter%s', absint($_GET['ppmd-search'])) => base64_encode(wp_json_encode($_GET))
32
  ], ppress_get_current_url_raw());
33
+
34
+ $url .= '#pp-member-directory-' . $directory_id;
35
  }
36
 
37
  wp_safe_redirect($url);
src/ShortcodeParser/MyAccount/MyAccountTag.php CHANGED
@@ -32,7 +32,7 @@ class MyAccountTag extends FormProcessor
32
  global $post;
33
 
34
  // check if the page being viewed contains the "profilepress-my-account" shortcode. if true, redirect to login page
35
- if (isset($post->post_content) && has_shortcode($post->post_content, 'profilepress-my-account')) {
36
  if ( ! is_user_logged_in()) {
37
  nocache_headers();
38
  wp_safe_redirect(ppress_login_url());
32
  global $post;
33
 
34
  // check if the page being viewed contains the "profilepress-my-account" shortcode. if true, redirect to login page
35
+ if (is_singular() && isset($post->post_content) && has_shortcode($post->post_content, 'profilepress-my-account')) {
36
  if ( ! is_user_logged_in()) {
37
  nocache_headers();
38
  wp_safe_redirect(ppress_login_url());
src/Themes/DragDrop/AbstractMemberDirectoryTheme.php CHANGED
@@ -424,6 +424,23 @@ abstract class AbstractMemberDirectoryTheme extends AbstractTheme
424
 
425
  $total_users_found = $wp_user_query->get_total();
426
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
427
  $cache[$this->form_id] = [
428
  'users' => $users,
429
  'total_users_found' => $total_users_found
@@ -544,6 +561,8 @@ abstract class AbstractMemberDirectoryTheme extends AbstractTheme
544
 
545
  $filter_meta_fields = $parsed_args['filter_meta_fields'];
546
 
 
 
547
  $args['search'] = '*' . $search_term . '*';
548
 
549
  // we need to empty out the search column so wp user query doesn't restrict the search only
@@ -564,7 +583,7 @@ abstract class AbstractMemberDirectoryTheme extends AbstractTheme
564
  * Modifies the query so we can tactically include searching of $search_columns in wp_users table
565
  * @see https://wordpress.stackexchange.com/a/248674/59917
566
  */
567
- add_filter('get_meta_sql', function ($sql) use ($search_term, $search_columns, $filter_meta_fields) {
568
 
569
  global $wpdb;
570
 
424
 
425
  $total_users_found = $wp_user_query->get_total();
426
 
427
+ if ( ! empty($query_params['ppmd-search']) && is_array($users) && ! empty($users)) {
428
+
429
+ /**
430
+ * @var int $key
431
+ * @var \WP_User $user
432
+ */
433
+ foreach ($users as $key => $user) {
434
+
435
+ if (empty(array_intersect($user->roles, $roles))) {
436
+ unset($users[$key]);
437
+ }
438
+ }
439
+
440
+ $total_users_found = count($users);
441
+
442
+ }
443
+
444
  $cache[$this->form_id] = [
445
  'users' => $users,
446
  'total_users_found' => $total_users_found
561
 
562
  $filter_meta_fields = $parsed_args['filter_meta_fields'];
563
 
564
+ $roles = $parsed_args['roles'];
565
+
566
  $args['search'] = '*' . $search_term . '*';
567
 
568
  // we need to empty out the search column so wp user query doesn't restrict the search only
583
  * Modifies the query so we can tactically include searching of $search_columns in wp_users table
584
  * @see https://wordpress.stackexchange.com/a/248674/59917
585
  */
586
+ add_filter('get_meta_sql', function ($sql) use ($search_term, $search_columns, $filter_meta_fields, $roles) {
587
 
588
  global $wpdb;
589
 
src/Themes/DragDrop/AbstractTheme.php CHANGED
@@ -435,11 +435,13 @@ abstract class AbstractTheme implements ThemeInterface
435
  {
436
  static $instance = [];
437
 
438
- if ( ! isset($instance[$form_id])) {
439
- $class = get_called_class();
440
- $instance[$form_id] = new $class($form_id, $form_type);
 
 
441
  }
442
 
443
- return $instance[$form_id];
444
  }
445
  }
435
  {
436
  static $instance = [];
437
 
438
+ $cache_key = $form_id . '_' . $form_type;
439
+
440
+ if ( ! isset($instance[$cache_key])) {
441
+ $class = get_called_class();
442
+ $instance[$cache_key] = new $class($form_id, $form_type);
443
  }
444
 
445
+ return $instance[$cache_key];
446
  }
447
  }
src/Themes/DragDrop/MemberDirectoryListing.php CHANGED
@@ -83,7 +83,7 @@ class MemberDirectoryListing
83
 
84
  if ( ! empty($field_setting['custom_html'])) {
85
 
86
- $field_type = $field_type . ' custom_html="' . $field_setting['custom_html'] . '"';
87
  }
88
  }
89
 
83
 
84
  if ( ! empty($field_setting['custom_html'])) {
85
 
86
+ $field_type = $field_type . ' custom_html="' . base64_encode($field_setting['custom_html']) . '"';
87
  }
88
  }
89
 
src/Themes/DragDrop/ProfileFieldListing.php CHANGED
@@ -134,7 +134,7 @@ class ProfileFieldListing
134
 
135
  if ( ! empty($field_setting['custom_html'])) {
136
 
137
- $field_type = $field_type . ' custom_html="' . $field_setting['custom_html'] . '"';
138
  }
139
  }
140
 
134
 
135
  if ( ! empty($field_setting['custom_html'])) {
136
 
137
+ $field_type = $field_type . ' custom_html="' . base64_encode($field_setting['custom_html']) . '"';
138
  }
139
  }
140
 
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit166354795d0b84ff742e13a4ae116cbf::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit8a7cbbb4b5cc8c5d3591fc8ed901c822::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit166354795d0b84ff742e13a4ae116cbf
6
  {
7
  private static $loader;
8
 
@@ -24,15 +24,15 @@ class ComposerAutoloaderInit166354795d0b84ff742e13a4ae116cbf
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
- spl_autoload_register(array('ComposerAutoloaderInit166354795d0b84ff742e13a4ae116cbf', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
- spl_autoload_unregister(array('ComposerAutoloaderInit166354795d0b84ff742e13a4ae116cbf', 'loadClassLoader'));
30
 
31
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32
  if ($useStaticLoader) {
33
  require __DIR__ . '/autoload_static.php';
34
 
35
- call_user_func(\Composer\Autoload\ComposerStaticInit166354795d0b84ff742e13a4ae116cbf::getInitializer($loader));
36
  } else {
37
  $map = require __DIR__ . '/autoload_namespaces.php';
38
  foreach ($map as $namespace => $path) {
@@ -53,19 +53,19 @@ class ComposerAutoloaderInit166354795d0b84ff742e13a4ae116cbf
53
  $loader->register(true);
54
 
55
  if ($useStaticLoader) {
56
- $includeFiles = Composer\Autoload\ComposerStaticInit166354795d0b84ff742e13a4ae116cbf::$files;
57
  } else {
58
  $includeFiles = require __DIR__ . '/autoload_files.php';
59
  }
60
  foreach ($includeFiles as $fileIdentifier => $file) {
61
- composerRequire166354795d0b84ff742e13a4ae116cbf($fileIdentifier, $file);
62
  }
63
 
64
  return $loader;
65
  }
66
  }
67
 
68
- function composerRequire166354795d0b84ff742e13a4ae116cbf($fileIdentifier, $file)
69
  {
70
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
71
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit8a7cbbb4b5cc8c5d3591fc8ed901c822
6
  {
7
  private static $loader;
8
 
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
+ spl_autoload_register(array('ComposerAutoloaderInit8a7cbbb4b5cc8c5d3591fc8ed901c822', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
+ spl_autoload_unregister(array('ComposerAutoloaderInit8a7cbbb4b5cc8c5d3591fc8ed901c822', 'loadClassLoader'));
30
 
31
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32
  if ($useStaticLoader) {
33
  require __DIR__ . '/autoload_static.php';
34
 
35
+ call_user_func(\Composer\Autoload\ComposerStaticInit8a7cbbb4b5cc8c5d3591fc8ed901c822::getInitializer($loader));
36
  } else {
37
  $map = require __DIR__ . '/autoload_namespaces.php';
38
  foreach ($map as $namespace => $path) {
53
  $loader->register(true);
54
 
55
  if ($useStaticLoader) {
56
+ $includeFiles = Composer\Autoload\ComposerStaticInit8a7cbbb4b5cc8c5d3591fc8ed901c822::$files;
57
  } else {
58
  $includeFiles = require __DIR__ . '/autoload_files.php';
59
  }
60
  foreach ($includeFiles as $fileIdentifier => $file) {
61
+ composerRequire8a7cbbb4b5cc8c5d3591fc8ed901c822($fileIdentifier, $file);
62
  }
63
 
64
  return $loader;
65
  }
66
  }
67
 
68
+ function composerRequire8a7cbbb4b5cc8c5d3591fc8ed901c822($fileIdentifier, $file)
69
  {
70
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
71
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit166354795d0b84ff742e13a4ae116cbf
8
  {
9
  public static $files = array (
10
  'fda73876e8be17735f680f484cec1679' => __DIR__ . '/../..' . '/src/Functions/custom-settings-api.php',
@@ -298,9 +298,9 @@ class ComposerStaticInit166354795d0b84ff742e13a4ae116cbf
298
  public static function getInitializer(ClassLoader $loader)
299
  {
300
  return \Closure::bind(function () use ($loader) {
301
- $loader->prefixLengthsPsr4 = ComposerStaticInit166354795d0b84ff742e13a4ae116cbf::$prefixLengthsPsr4;
302
- $loader->prefixDirsPsr4 = ComposerStaticInit166354795d0b84ff742e13a4ae116cbf::$prefixDirsPsr4;
303
- $loader->classMap = ComposerStaticInit166354795d0b84ff742e13a4ae116cbf::$classMap;
304
 
305
  }, null, ClassLoader::class);
306
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit8a7cbbb4b5cc8c5d3591fc8ed901c822
8
  {
9
  public static $files = array (
10
  'fda73876e8be17735f680f484cec1679' => __DIR__ . '/../..' . '/src/Functions/custom-settings-api.php',
298
  public static function getInitializer(ClassLoader $loader)
299
  {
300
  return \Closure::bind(function () use ($loader) {
301
+ $loader->prefixLengthsPsr4 = ComposerStaticInit8a7cbbb4b5cc8c5d3591fc8ed901c822::$prefixLengthsPsr4;
302
+ $loader->prefixDirsPsr4 = ComposerStaticInit8a7cbbb4b5cc8c5d3591fc8ed901c822::$prefixDirsPsr4;
303
+ $loader->classMap = ComposerStaticInit8a7cbbb4b5cc8c5d3591fc8ed901c822::$classMap;
304
 
305
  }, null, ClassLoader::class);
306
  }
vendor/composer/installed.php CHANGED
@@ -5,7 +5,7 @@
5
  'type' => 'library',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
- 'reference' => '8b77d4d82b5af3681008d295c01b645b2462dc77',
9
  'name' => '__root__',
10
  'dev' => false,
11
  ),
@@ -16,7 +16,7 @@
16
  'type' => 'library',
17
  'install_path' => __DIR__ . '/../../',
18
  'aliases' => array(),
19
- 'reference' => '8b77d4d82b5af3681008d295c01b645b2462dc77',
20
  'dev_requirement' => false,
21
  ),
22
  'barryvdh/composer-cleanup-plugin' => array(
5
  'type' => 'library',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
+ 'reference' => 'ccdb463f0656414ee8708a79e1aaa65c1b6d605e',
9
  'name' => '__root__',
10
  'dev' => false,
11
  ),
16
  'type' => 'library',
17
  'install_path' => __DIR__ . '/../../',
18
  'aliases' => array(),
19
+ 'reference' => 'ccdb463f0656414ee8708a79e1aaa65c1b6d605e',
20
  'dev_requirement' => false,
21
  ),
22
  'barryvdh/composer-cleanup-plugin' => array(
wp-user-avatar.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: ProfilePress
4
  * Plugin URI: https://profilepress.net
5
  * Description: The modern WordPress membership and user profile plugin.
6
- * Version: 3.2.11
7
  * Author: ProfilePress Team
8
  * Author URI: https://profilepress.net
9
  * Text Domain: wp-user-avatar
@@ -14,7 +14,7 @@
14
  defined('ABSPATH') or die("No script kiddies please!");
15
 
16
  define('PROFILEPRESS_SYSTEM_FILE_PATH', __FILE__);
17
- define('PPRESS_VERSION_NUMBER', '3.2.11');
18
 
19
  require __DIR__ . '/vendor/autoload.php';
20
 
3
  * Plugin Name: ProfilePress
4
  * Plugin URI: https://profilepress.net
5
  * Description: The modern WordPress membership and user profile plugin.
6
+ * Version: 3.2.12
7
  * Author: ProfilePress Team
8
  * Author URI: https://profilepress.net
9
  * Text Domain: wp-user-avatar
14
  defined('ABSPATH') or die("No script kiddies please!");
15
 
16
  define('PROFILEPRESS_SYSTEM_FILE_PATH', __FILE__);
17
+ define('PPRESS_VERSION_NUMBER', '3.2.12');
18
 
19
  require __DIR__ . '/vendor/autoload.php';
20