WP User Avatar - Version 3.2.6

Version Description

  • New content restriction shortcode.
  • Added content restriction to specific users.
Download this release

Release Info

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

Code changes from version 3.2.5 to 3.2.6

assets/js/content-control.js CHANGED
@@ -54,7 +54,24 @@
54
  $(element2).select2(select2options);
55
  }
56
  })
57
- })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  };
59
 
60
  cr.generateUniqueID = function () {
54
  $(element2).select2(select2options);
55
  }
56
  })
57
+ });
58
+
59
+ $('#pp-cc-access-wp-users').select2({
60
+ ajax: {
61
+ url: ajaxurl,
62
+ delay: 250,
63
+ cache: true,
64
+ data: function (params) {
65
+ return {
66
+ search: params.term,
67
+ nonce: ppress_cr_nonce,
68
+ action: 'ppress_cr_object_search',
69
+ object_type: 'wp_users',
70
+ };
71
+ }
72
+ },
73
+ minimumInputLength: 2
74
+ });
75
  };
76
 
77
  cr.generateUniqueID = function () {
changelog.txt CHANGED
@@ -1,5 +1,9 @@
1
  == Changelog ==
2
 
 
 
 
 
3
  = 3.2.5 =
4
  * [Pro] [Two-Factor Authentication addon](https://profilepress.net/addons/2fa/?utm_source=wporg_listing&utm_medium=readme&utm_campaign=changelog).
5
  * Fixed bug where member directory custom sort wasn't working.
1
  == Changelog ==
2
 
3
+ = 3.2.6 =
4
+ * [New content restriction shortcode](https://profilepress.net/article/wordpress-content-restriction-shortcodes/?utm_source=wporg_listing&utm_medium=readme&utm_campaign=changelog).
5
+ * Added content restriction to specific users.
6
+
7
  = 3.2.5 =
8
  * [Pro] [Two-Factor Authentication addon](https://profilepress.net/addons/2fa/?utm_source=wporg_listing&utm_medium=readme&utm_campaign=changelog).
9
  * Fixed bug where member directory custom sort wasn't working.
languages/wp-user-avatar.pot CHANGED
@@ -1,14 +1,14 @@
1
- # Copyright (C) 2021 ProfilePress
2
  # This file is distributed under the same license as the ProfilePress package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: ProfilePress 3.2.5\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-user-avatar\n"
7
- "POT-Creation-Date: 2021-12-16 16:24:40+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2021-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
@@ -297,7 +297,7 @@ msgid "Image File"
297
  msgstr ""
298
 
299
  #: deprecated/wp-user-avatar/includes/tinymce/window.php:167
300
- #: src/ContentProtection/views/view.access-condition.php:109
301
  msgid "Custom URL"
302
  msgstr ""
303
 
@@ -736,7 +736,7 @@ msgstr ""
736
  #: src/Admin/SettingsPages/FormList.php:315
737
  #: src/Admin/SettingsPages/GeneralSettings.php:169
738
  #: src/ContentProtection/WPListTable.php:96
739
- #: src/ContentProtection/WPListTable.php:291
740
  #: src/ContentProtection/views/include.view-sidebar.php:12
741
  msgid "Delete"
742
  msgstr ""
@@ -2190,7 +2190,7 @@ msgid "Check to allow homepage to be accessible by everyone."
2190
  msgstr ""
2191
 
2192
  #: src/Admin/SettingsPages/GeneralSettings.php:376
2193
- #: src/ContentProtection/Frontend/PostContent.php:62
2194
  msgid "You are unauthorized to view this page."
2195
  msgstr ""
2196
 
@@ -3175,21 +3175,31 @@ msgstr ""
3175
  msgid "Deactivate"
3176
  msgstr ""
3177
 
3178
- #: src/ContentProtection/WPListTable.php:195
3179
- #: src/ContentProtection/views/view.access-condition.php:23
3180
  msgid "Everyone"
3181
  msgstr ""
3182
 
3183
- #: src/ContentProtection/WPListTable.php:198
3184
- #: src/ContentProtection/views/view.access-condition.php:24
3185
  msgid "Logged in users"
3186
  msgstr ""
3187
 
3188
- #: src/ContentProtection/WPListTable.php:201
3189
- #: src/ContentProtection/views/view.access-condition.php:25
3190
  msgid "Logged out users"
3191
  msgstr ""
3192
 
 
 
 
 
 
 
 
 
 
 
3193
  #: src/ContentProtection/views/include.view-sidebar.php:18
3194
  msgid "Save Rule"
3195
  msgstr ""
@@ -3206,71 +3216,79 @@ msgstr ""
3206
  msgid "Publish"
3207
  msgstr ""
3208
 
3209
- #: src/ContentProtection/views/include.view.php:67
 
 
 
 
3210
  msgid "Add title"
3211
  msgstr ""
3212
 
3213
- #: src/ContentProtection/views/view.access-condition.php:19
3214
  msgid "Who can access the content?"
3215
  msgstr ""
3216
 
3217
- #: src/ContentProtection/views/view.access-condition.php:31
3218
  msgid "Select roles that can access content"
3219
  msgstr ""
3220
 
3221
- #: src/ContentProtection/views/view.access-condition.php:46
 
 
 
 
3222
  msgid "What happens when users without access tries to view content?"
3223
  msgstr ""
3224
 
3225
- #: src/ContentProtection/views/view.access-condition.php:51
3226
  msgid "Show access restricted message"
3227
  msgstr ""
3228
 
3229
- #: src/ContentProtection/views/view.access-condition.php:52
3230
  msgid "Redirect user"
3231
  msgstr ""
3232
 
3233
- #: src/ContentProtection/views/view.access-condition.php:59
3234
  msgid "Message to show to unauthorized users"
3235
  msgstr ""
3236
 
3237
- #: src/ContentProtection/views/view.access-condition.php:64
3238
  msgid "Global Restrict Access Message"
3239
  msgstr ""
3240
 
3241
- #: src/ContentProtection/views/view.access-condition.php:65
3242
  msgid "Custom message"
3243
  msgstr ""
3244
 
3245
- #: src/ContentProtection/views/view.access-condition.php:66
3246
  msgid "Post Excerpt"
3247
  msgstr ""
3248
 
3249
- #: src/ContentProtection/views/view.access-condition.php:67
3250
  msgid "Post Excerpt + Global Restrict Access Message"
3251
  msgstr ""
3252
 
3253
- #: src/ContentProtection/views/view.access-condition.php:68
3254
  msgid "Post Excerpt + Custom Message"
3255
  msgstr ""
3256
 
3257
- #: src/ContentProtection/views/view.access-condition.php:72
3258
  msgid "Note that Global Restrict Access Message can be %scustomized here%s."
3259
  msgstr ""
3260
 
3261
- #: src/ContentProtection/views/view.access-condition.php:81
3262
  msgid "Custom Restricted Message"
3263
  msgstr ""
3264
 
3265
- #: src/ContentProtection/views/view.access-condition.php:103
3266
  msgid "Where should users be redirected to?"
3267
  msgstr ""
3268
 
3269
- #: src/ContentProtection/views/view.access-condition.php:108
3270
  msgid "Login page"
3271
  msgstr ""
3272
 
3273
- #: src/ContentProtection/views/view.access-condition.php:116
3274
  msgid "Redirect URL"
3275
  msgstr ""
3276
 
@@ -5520,9 +5538,9 @@ msgstr ""
5520
  msgid "ProfilePress"
5521
  msgstr ""
5522
 
5523
- #. #-#-#-#-# wp-user-avatar.pot (ProfilePress 3.2.5) #-#-#-#-#
5524
  #. Plugin URI of the plugin/theme
5525
- #. #-#-#-#-# wp-user-avatar.pot (ProfilePress 3.2.5) #-#-#-#-#
5526
  #. Author URI of the plugin/theme
5527
  msgid "https://profilepress.net"
5528
  msgstr ""
1
+ # Copyright (C) 2022 ProfilePress
2
  # This file is distributed under the same license as the ProfilePress package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: ProfilePress 3.2.6\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-user-avatar\n"
7
+ "POT-Creation-Date: 2022-01-06 13:10:18+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2022-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
297
  msgstr ""
298
 
299
  #: deprecated/wp-user-avatar/includes/tinymce/window.php:167
300
+ #: src/ContentProtection/views/view.access-condition.php:125
301
  msgid "Custom URL"
302
  msgstr ""
303
 
736
  #: src/Admin/SettingsPages/FormList.php:315
737
  #: src/Admin/SettingsPages/GeneralSettings.php:169
738
  #: src/ContentProtection/WPListTable.php:96
739
+ #: src/ContentProtection/WPListTable.php:305
740
  #: src/ContentProtection/views/include.view-sidebar.php:12
741
  msgid "Delete"
742
  msgstr ""
2190
  msgstr ""
2191
 
2192
  #: src/Admin/SettingsPages/GeneralSettings.php:376
2193
+ #: src/ContentProtection/Frontend/PostContent.php:64
2194
  msgid "You are unauthorized to view this page."
2195
  msgstr ""
2196
 
3175
  msgid "Deactivate"
3176
  msgstr ""
3177
 
3178
+ #: src/ContentProtection/WPListTable.php:196
3179
+ #: src/ContentProtection/views/view.access-condition.php:24
3180
  msgid "Everyone"
3181
  msgstr ""
3182
 
3183
+ #: src/ContentProtection/WPListTable.php:199
3184
+ #: src/ContentProtection/views/view.access-condition.php:25
3185
  msgid "Logged in users"
3186
  msgstr ""
3187
 
3188
+ #: src/ContentProtection/WPListTable.php:202
3189
+ #: src/ContentProtection/views/view.access-condition.php:26
3190
  msgid "Logged out users"
3191
  msgstr ""
3192
 
3193
+ #: src/ContentProtection/views/include.shortcode-doc-sidebar.php:5
3194
+ msgid ""
3195
+ "To restrict contents in a post or page, we provide the below shortcode. "
3196
+ "%sLearn more%s"
3197
+ msgstr ""
3198
+
3199
+ #: src/ContentProtection/views/include.shortcode-doc-sidebar.php:11
3200
+ msgid "Content to restrict will go here"
3201
+ msgstr ""
3202
+
3203
  #: src/ContentProtection/views/include.view-sidebar.php:18
3204
  msgid "Save Rule"
3205
  msgstr ""
3216
  msgid "Publish"
3217
  msgstr ""
3218
 
3219
+ #: src/ContentProtection/views/include.view.php:50
3220
+ msgid "Restrict Content Shortcode"
3221
+ msgstr ""
3222
+
3223
+ #: src/ContentProtection/views/include.view.php:79
3224
  msgid "Add title"
3225
  msgstr ""
3226
 
3227
+ #: src/ContentProtection/views/view.access-condition.php:20
3228
  msgid "Who can access the content?"
3229
  msgstr ""
3230
 
3231
+ #: src/ContentProtection/views/view.access-condition.php:32
3232
  msgid "Select roles that can access content"
3233
  msgstr ""
3234
 
3235
+ #: src/ContentProtection/views/view.access-condition.php:47
3236
+ msgid "Select specific users that can access content"
3237
+ msgstr ""
3238
+
3239
+ #: src/ContentProtection/views/view.access-condition.php:62
3240
  msgid "What happens when users without access tries to view content?"
3241
  msgstr ""
3242
 
3243
+ #: src/ContentProtection/views/view.access-condition.php:67
3244
  msgid "Show access restricted message"
3245
  msgstr ""
3246
 
3247
+ #: src/ContentProtection/views/view.access-condition.php:68
3248
  msgid "Redirect user"
3249
  msgstr ""
3250
 
3251
+ #: src/ContentProtection/views/view.access-condition.php:75
3252
  msgid "Message to show to unauthorized users"
3253
  msgstr ""
3254
 
3255
+ #: src/ContentProtection/views/view.access-condition.php:80
3256
  msgid "Global Restrict Access Message"
3257
  msgstr ""
3258
 
3259
+ #: src/ContentProtection/views/view.access-condition.php:81
3260
  msgid "Custom message"
3261
  msgstr ""
3262
 
3263
+ #: src/ContentProtection/views/view.access-condition.php:82
3264
  msgid "Post Excerpt"
3265
  msgstr ""
3266
 
3267
+ #: src/ContentProtection/views/view.access-condition.php:83
3268
  msgid "Post Excerpt + Global Restrict Access Message"
3269
  msgstr ""
3270
 
3271
+ #: src/ContentProtection/views/view.access-condition.php:84
3272
  msgid "Post Excerpt + Custom Message"
3273
  msgstr ""
3274
 
3275
+ #: src/ContentProtection/views/view.access-condition.php:88
3276
  msgid "Note that Global Restrict Access Message can be %scustomized here%s."
3277
  msgstr ""
3278
 
3279
+ #: src/ContentProtection/views/view.access-condition.php:97
3280
  msgid "Custom Restricted Message"
3281
  msgstr ""
3282
 
3283
+ #: src/ContentProtection/views/view.access-condition.php:119
3284
  msgid "Where should users be redirected to?"
3285
  msgstr ""
3286
 
3287
+ #: src/ContentProtection/views/view.access-condition.php:124
3288
  msgid "Login page"
3289
  msgstr ""
3290
 
3291
+ #: src/ContentProtection/views/view.access-condition.php:132
3292
  msgid "Redirect URL"
3293
  msgstr ""
3294
 
5538
  msgid "ProfilePress"
5539
  msgstr ""
5540
 
5541
+ #. #-#-#-#-# wp-user-avatar.pot (ProfilePress 3.2.6) #-#-#-#-#
5542
  #. Plugin URI of the plugin/theme
5543
+ #. #-#-#-#-# wp-user-avatar.pot (ProfilePress 3.2.6) #-#-#-#-#
5544
  #. Author URI of the plugin/theme
5545
  msgid "https://profilepress.net"
5546
  msgstr ""
readme.txt CHANGED
@@ -1,11 +1,11 @@
1
- === User Registration, Login Form, User Profile & Membership – 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.5
9
  License: GPLv2 or later
10
 
11
  Modern membership plugin for user registration, login form, user profile, member directories & content restriction.
@@ -50,7 +50,7 @@ Never start from scratch again. ProfilePress comes with several beautiful, custo
50
 
51
  = Access & Content Restriction =
52
 
53
- ProfilePress gives you fine-grained control over what content your users can see based on your protection rules. You can restrict access to pages, child pages, posts, custom post types, categories, tags and custom taxonomies based on their user roles and logged-in status.
54
 
55
  ProfilePress also lets you:
56
 
@@ -118,6 +118,10 @@ No. You can create and manage your forms, user profiles and member directories w
118
 
119
  == Changelog ==
120
 
 
 
 
 
121
  = 3.2.5 =
122
  * [Pro] [Two-Factor Authentication addon](https://profilepress.net/addons/2fa/?utm_source=wporg_listing&utm_medium=readme&utm_campaign=changelog).
123
  * Fixed bug where member directory custom sort wasn't working.
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.6
9
  License: GPLv2 or later
10
 
11
  Modern membership plugin for user registration, login form, user profile, member directories & content restriction.
50
 
51
  = Access & Content Restriction =
52
 
53
+ ProfilePress gives you fine-grained control over what content your users can see based on your [protection rules](https://profilepress.net/article/adding-content-protection-rules/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion) and [shortcodes](https://profilepress.net/article/wordpress-content-restriction-shortcodes/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion). You can restrict content including pages, child pages, posts, custom post types, categories, tags and custom taxonomies based on their user roles, usernames, email address, and logged-in status.
54
 
55
  ProfilePress also lets you:
56
 
118
 
119
  == Changelog ==
120
 
121
+ = 3.2.6 =
122
+ * [New content restriction shortcode](https://profilepress.net/article/wordpress-content-restriction-shortcodes/?utm_source=wporg_listing&utm_medium=readme&utm_campaign=changelog).
123
+ * Added content restriction to specific users.
124
+
125
  = 3.2.5 =
126
  * [Pro] [Two-Factor Authentication addon](https://profilepress.net/addons/2fa/?utm_source=wporg_listing&utm_medium=readme&utm_campaign=changelog).
127
  * Fixed bug where member directory custom sort wasn't working.
src/Admin/SettingsPages/ExtensionsSettingsPage.php CHANGED
@@ -126,7 +126,7 @@ class ExtensionsSettingsPage extends AbstractSettingsPage
126
  <?php $dependency_available = isset($extension['is_available']) && true !== ($callable_result = call_user_func($extension['is_available'])) ? $callable_result : true; ?>
127
  <div class="ppress-extension-item-wrap">
128
  <div class="ppress-extension-item-card">
129
- <div class="ppress-extension-card-body<?= EM::is_premium() && $extension_class::$instance_flag && (true !== $dependency_available) ? ' ppress-unavailable' : '' ?>">
130
  <div class="ppress-extension-card-header">
131
  <?= ppress_var($extension, 'icon', '') ?>
132
  <?= esc_html($extension['title']) ?>
@@ -141,7 +141,7 @@ class ExtensionsSettingsPage extends AbstractSettingsPage
141
  </div>
142
  <div class="ppress-extension-card-footer">
143
 
144
- <?php if (EM::is_premium() && $extension_class::$instance_flag) : ?>
145
 
146
  <?php if (true !== $dependency_available) : ?>
147
  <span class="ppress-extension-status">
126
  <?php $dependency_available = isset($extension['is_available']) && true !== ($callable_result = call_user_func($extension['is_available'])) ? $callable_result : true; ?>
127
  <div class="ppress-extension-item-wrap">
128
  <div class="ppress-extension-item-card">
129
+ <div class="ppress-extension-card-body<?= EM::is_premium() && class_exists($extension_class) && $extension_class::$instance_flag && (true !== $dependency_available) ? ' ppress-unavailable' : '' ?>">
130
  <div class="ppress-extension-card-header">
131
  <?= ppress_var($extension, 'icon', '') ?>
132
  <?= esc_html($extension['title']) ?>
141
  </div>
142
  <div class="ppress-extension-card-footer">
143
 
144
+ <?php if (EM::is_premium() && class_exists($extension_class) && $extension_class::$instance_flag) : ?>
145
 
146
  <?php if (true !== $dependency_available) : ?>
147
  <span class="ppress-extension-status">
src/ContentProtection/Frontend/Checker.php CHANGED
@@ -7,7 +7,7 @@ use ProfilePress\Core\ContentProtection\ContentConditions;
7
 
8
  class Checker
9
  {
10
- public static function is_blocked($who_can_access = 'everyone', $roles = [])
11
  {
12
  if ('login' == $who_can_access) {
13
 
@@ -17,8 +17,20 @@ class Checker
17
 
18
  $user_roles = wp_get_current_user()->roles;
19
 
20
- if (empty(array_intersect($roles, $user_roles))) return true;
21
  }
 
 
 
 
 
 
 
 
 
 
 
 
22
  }
23
 
24
  if ('logout' == $who_can_access) {
7
 
8
  class Checker
9
  {
10
+ public static function is_blocked($who_can_access = 'everyone', $roles = [], $wp_users = [])
11
  {
12
  if ('login' == $who_can_access) {
13
 
17
 
18
  $user_roles = wp_get_current_user()->roles;
19
 
20
+ if (!empty(array_intersect($roles, $user_roles))) return false;
21
  }
22
+
23
+ if ( ! empty($wp_users)) {
24
+
25
+ $users = array_map('absint', $wp_users);
26
+
27
+ if ( in_array(get_current_user_id(), $users)) return false;
28
+ }
29
+
30
+ if(empty($roles) && empty($wp_users)) return false;
31
+
32
+ // returning true to make users and user role combined rule OR instead of AND
33
+ return true;
34
  }
35
 
36
  if ('logout' == $who_can_access) {
src/ContentProtection/Frontend/PostContent.php CHANGED
@@ -35,13 +35,15 @@ class PostContent
35
 
36
  $access_roles = ppress_var($access_condition, 'access_roles', []);
37
 
 
 
38
  $noaccess_message_type = ppress_var($access_condition, 'noaccess_action_message_type', 'global');
39
 
40
  $custom_message = ppress_var($access_condition, 'noaccess_action_message_custom', 'global');
41
 
42
  if (Checker::content_match($meta['content'])) {
43
 
44
- if (Checker::is_blocked($who_can_access, $access_roles)) {
45
  $content = $this->get_restricted_message($noaccess_message_type, $custom_message);
46
  }
47
 
35
 
36
  $access_roles = ppress_var($access_condition, 'access_roles', []);
37
 
38
+ $access_wp_users = ppress_var($access_condition, 'access_wp_users', []);
39
+
40
  $noaccess_message_type = ppress_var($access_condition, 'noaccess_action_message_type', 'global');
41
 
42
  $custom_message = ppress_var($access_condition, 'noaccess_action_message_custom', 'global');
43
 
44
  if (Checker::content_match($meta['content'])) {
45
 
46
+ if (Checker::is_blocked($who_can_access, $access_roles, $access_wp_users)) {
47
  $content = $this->get_restricted_message($noaccess_message_type, $custom_message);
48
  }
49
 
src/ContentProtection/Frontend/Redirect.php CHANGED
@@ -59,11 +59,12 @@ class Redirect
59
 
60
  $who_can_access = ppress_var($access_condition, 'who_can_access', 'everyone');
61
 
62
- $access_roles = ppress_var($access_condition, 'access_roles', []);
 
63
 
64
  if (Checker::content_match($meta['content'], true)) {
65
 
66
- if (Checker::is_blocked($who_can_access, $access_roles)) {
67
  wp_safe_redirect(esc_url_raw($redirect_url));
68
  exit;
69
  }
59
 
60
  $who_can_access = ppress_var($access_condition, 'who_can_access', 'everyone');
61
 
62
+ $access_roles = ppress_var($access_condition, 'access_roles', []);
63
+ $access_wp_users = ppress_var($access_condition, 'access_wp_users', []);
64
 
65
  if (Checker::content_match($meta['content'], true)) {
66
 
67
+ if (Checker::is_blocked($who_can_access, $access_roles, $access_wp_users)) {
68
  wp_safe_redirect(esc_url_raw($redirect_url));
69
  exit;
70
  }
src/ContentProtection/Frontend/RestrictionShortcode.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace ProfilePress\Core\ContentProtection\Frontend;
4
+
5
+ class RestrictionShortcode
6
+ {
7
+ public function __construct()
8
+ {
9
+ add_shortcode('pp-restrict-content', [$this, 'shortcode_handler']);
10
+ }
11
+
12
+ public function shortcode_handler($atts, $content = null)
13
+ {
14
+ $atts = shortcode_atts(array(
15
+ 'roles' => '',
16
+ 'users' => '',
17
+ 'action' => 'show' // value can be "show" or "hide"
18
+ ), $atts);
19
+
20
+ if ($this->rule_matches($atts['roles'], $atts['users'])) {
21
+ return ($atts['action'] == 'hide') ? '' : \do_shortcode($content);
22
+ }
23
+
24
+ return '';
25
+ }
26
+
27
+ public function rule_matches($roles = [], $user_ids = [])
28
+ {
29
+ if (is_user_logged_in()) {
30
+
31
+ if ( ! empty($roles)) {
32
+
33
+ $roles = array_map('sanitize_text_field', explode(',', $roles));
34
+
35
+ $user_roles = wp_get_current_user()->roles;
36
+
37
+ if ( ! empty(array_intersect($roles, $user_roles))) return true;
38
+ }
39
+
40
+ if ( ! empty($user_ids)) {
41
+
42
+ $user_ids = array_map('sanitize_text_field', explode(',', $user_ids));
43
+
44
+ foreach ($user_ids as $user_id) {
45
+
46
+ if (is_numeric($user_id) && get_current_user_id() == absint($user_id)) {
47
+ return true;
48
+ } else {
49
+ $user = get_user_by('login', $user_id);
50
+ if ( ! $user) {
51
+ $user = get_user_by('email', $user_id);
52
+ }
53
+
54
+ if ($user instanceof \WP_User && get_current_user_id() == absint($user->ID)) {
55
+ return true;
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+
62
+ return false;
63
+ }
64
+
65
+ public static function get_instance()
66
+ {
67
+ static $instance = null;
68
+
69
+ if (is_null($instance)) {
70
+ $instance = new self();
71
+ }
72
+
73
+ return $instance;
74
+ }
75
+ }
src/ContentProtection/Init.php CHANGED
@@ -4,6 +4,7 @@ namespace ProfilePress\Core\ContentProtection;
4
 
5
  use ProfilePress\Core\ContentProtection\Frontend\PostContent;
6
  use ProfilePress\Core\ContentProtection\Frontend\Redirect;
 
7
 
8
  class Init
9
  {
@@ -18,6 +19,7 @@ class Init
18
 
19
  PostContent::get_instance();
20
  Redirect::get_instance();
 
21
  }
22
 
23
  public function get_content_condition_field()
@@ -44,6 +46,8 @@ class Init
44
 
45
  public function get_content_condition_search()
46
  {
 
 
47
  $results['results'] = [];
48
 
49
  $object_type = sanitize_text_field($_REQUEST['object_type']);
@@ -54,7 +58,7 @@ class Init
54
 
55
  $post_type = ! empty($_REQUEST['object_key']) ? sanitize_text_field($_REQUEST['object_key']) : 'post';
56
 
57
- $search = ! empty($_REQUEST['search']) ? sanitize_text_field($_REQUEST['search']) : false;
58
 
59
  $query = $this->post_type_query($post_type, ['s' => $search]);
60
 
@@ -80,6 +84,25 @@ class Init
80
  'text' => $term->name,
81
  );
82
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  }
84
 
85
  wp_send_json($results, 200);
4
 
5
  use ProfilePress\Core\ContentProtection\Frontend\PostContent;
6
  use ProfilePress\Core\ContentProtection\Frontend\Redirect;
7
+ use ProfilePress\Core\ContentProtection\Frontend\RestrictionShortcode;
8
 
9
  class Init
10
  {
19
 
20
  PostContent::get_instance();
21
  Redirect::get_instance();
22
+ RestrictionShortcode::get_instance();
23
  }
24
 
25
  public function get_content_condition_field()
46
 
47
  public function get_content_condition_search()
48
  {
49
+ check_ajax_referer('ppress_cr_nonce', 'nonce');
50
+
51
  $results['results'] = [];
52
 
53
  $object_type = sanitize_text_field($_REQUEST['object_type']);
58
 
59
  $post_type = ! empty($_REQUEST['object_key']) ? sanitize_text_field($_REQUEST['object_key']) : 'post';
60
 
61
+ $search = ! empty($_REQUEST['search']) ? esc_attr($_REQUEST['search']) : false;
62
 
63
  $query = $this->post_type_query($post_type, ['s' => $search]);
64
 
84
  'text' => $term->name,
85
  );
86
  }
87
+ break;
88
+ case 'wp_users':
89
+
90
+ $search = ! empty($_REQUEST['search']) ? sanitize_text_field($_REQUEST['search']) : '';
91
+
92
+ $query = get_users([
93
+ 'search' => '*' . $search . '*',
94
+ 'search_columns' => ['user_email', 'user_login', 'user_nicename', 'display_name'],
95
+ 'fields' => ['ID', 'user_email', 'user_login'],
96
+ 'number' => 1000
97
+ ]);
98
+
99
+ foreach ($query as $user) {
100
+ $results['results'][] = array(
101
+ 'id' => $user->ID,
102
+ 'text' => sprintf('%s (%s)', $user->user_login, $user->user_email),
103
+ );
104
+ }
105
+ break;
106
  }
107
 
108
  wp_send_json($results, 200);
src/ContentProtection/WPListTable.php CHANGED
@@ -184,9 +184,10 @@ class WPListTable extends \WP_List_Table
184
 
185
  public function column_access($item)
186
  {
187
- $html = '';
188
- $who_can_access = false;
189
- $access_roles = false;
 
190
  if (isset($item['meta_value']['access_condition']) && is_array($item['meta_value']['access_condition'])) {
191
 
192
  if (isset($item['meta_value']['access_condition']['who_can_access'])) {
@@ -206,20 +207,33 @@ class WPListTable extends \WP_List_Table
206
  if (
207
  isset($item['meta_value']['access_condition']['who_can_access']) &&
208
  $item['meta_value']['access_condition']['who_can_access'] == 'login' &&
209
- isset($item['meta_value']['access_condition']['access_roles']) &&
210
  is_array($item['meta_value']['access_condition']['access_roles'])
211
  ) {
212
- $access_roles = implode(', ', array_map(function ($role) {
213
  return ppress_var(ppress_wp_roles_key_value(false), $role);
214
  }, $item['meta_value']['access_condition']['access_roles']));
215
  }
 
 
 
 
 
 
 
 
 
 
 
216
  }
217
 
218
- if ( ! empty($who_can_access)) {
219
- $html = sprintf(
220
- '<p><strong>%s</strong>%s', $who_can_access,
221
- ! empty($access_roles) ? ': ' . $access_roles : ''
222
- );
 
 
223
  }
224
 
225
  return $html;
184
 
185
  public function column_access($item)
186
  {
187
+ $html = '';
188
+ $who_can_access = false;
189
+ $logged_in_users_rules = [];
190
+
191
  if (isset($item['meta_value']['access_condition']) && is_array($item['meta_value']['access_condition'])) {
192
 
193
  if (isset($item['meta_value']['access_condition']['who_can_access'])) {
207
  if (
208
  isset($item['meta_value']['access_condition']['who_can_access']) &&
209
  $item['meta_value']['access_condition']['who_can_access'] == 'login' &&
210
+ ! empty($item['meta_value']['access_condition']['access_roles']) &&
211
  is_array($item['meta_value']['access_condition']['access_roles'])
212
  ) {
213
+ $logged_in_users_rules[] = implode(', ', array_map(function ($role) {
214
  return ppress_var(ppress_wp_roles_key_value(false), $role);
215
  }, $item['meta_value']['access_condition']['access_roles']));
216
  }
217
+
218
+ if (
219
+ isset($item['meta_value']['access_condition']['who_can_access']) &&
220
+ $item['meta_value']['access_condition']['who_can_access'] == 'login' &&
221
+ ! empty($item['meta_value']['access_condition']['access_wp_users']) &&
222
+ is_array($item['meta_value']['access_condition']['access_wp_users'])
223
+ ) {
224
+ $logged_in_users_rules[] = implode(', ', array_map(function ($user_id) {
225
+ return get_userdata($user_id)->user_login;
226
+ }, $item['meta_value']['access_condition']['access_wp_users']));
227
+ }
228
  }
229
 
230
+ if ( ! empty($logged_in_users_rules)) {
231
+ foreach ($logged_in_users_rules as $rule) {
232
+ $html .= sprintf(
233
+ '<p><strong>%s</strong>%s', $who_can_access,
234
+ ! empty($rule) ? ': ' . $rule : ''
235
+ );
236
+ }
237
  }
238
 
239
  return $html;
src/ContentProtection/views/include.shortcode-doc-sidebar.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="ppress-content-restriction-shortcode-doc">
2
+ <p>
3
+ <?php
4
+ printf(
5
+ esc_html__('To restrict contents in a post or page, we provide the below shortcode. %sLearn more%s', 'wp-user-avatar'),
6
+ '<a target="_blank" href="https://profilepress.net/article/wordpress-content-restriction-shortcodes/">', '</a>'
7
+ ); ?>
8
+ </p>
9
+ <div style="padding:5px;margin: 0 1px;background: #f0f0f1;background: rgba(0,0,0,.07);">
10
+ [pp-restrict-content ...]
11
+ <br><?php esc_html_e('Content to restrict will go here', 'wp-user-avatar') ?><br>
12
+ [/pp-restrict-content]
13
+ </div>
14
+ </div>
src/ContentProtection/views/include.view.php CHANGED
@@ -44,6 +44,18 @@ add_action('add_meta_boxes', function () {
44
  );
45
  });
46
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  do_action('add_meta_boxes', 'ppcontentprotection', '');
48
  ?>
49
  <style type="text/css">
44
  );
45
  });
46
 
47
+ add_action('add_meta_boxes', function () {
48
+ add_meta_box(
49
+ 'shortcode-doc',
50
+ __('Restrict Content Shortcode', 'wp-user-avatar'),
51
+ function () {
52
+ require dirname(__FILE__) . '/include.shortcode-doc-sidebar.php';
53
+ },
54
+ 'ppcontentprotection',
55
+ 'sidebar'
56
+ );
57
+ });
58
+
59
  do_action('add_meta_boxes', 'ppcontentprotection', '');
60
  ?>
61
  <style type="text/css">
src/ContentProtection/views/view.access-condition.php CHANGED
@@ -4,6 +4,7 @@ $postedData = ppress_var(@$_POST['ppress_cc_data'], 'access_condition', []);
4
 
5
  $who_can_access = ppressPOST_var('who_can_access', ppress_var($accessConditionData, 'who_can_access'), false, $postedData);
6
  $access_roles = ppressPOST_var('access_roles', ppress_var($accessConditionData, 'access_roles', []), [], $postedData);
 
7
  $noaccess_action = ppressPOST_var('noaccess_action', ppress_var($accessConditionData, 'noaccess_action'), false, $postedData);
8
  $noaccess_action_message_type = ppressPOST_var('noaccess_action_message_type', ppress_var($accessConditionData, 'noaccess_action_message_type'), false, $postedData);
9
  $noaccess_action_message_custom = ppressPOST_var('noaccess_action_message_custom', ppress_var($accessConditionData, 'noaccess_action_message_custom'), false, $postedData);
@@ -38,6 +39,21 @@ $noaccess_action_redirect_custom_url = ppressPOST_var('noaccess_action_redirect_
38
  <span><?= $value ?></span>
39
  </label>
40
  <?php endforeach; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  </td>
42
  </tr>
43
  <tr id="pp-cc-access-noaccess-action-row">
@@ -134,6 +150,7 @@ $noaccess_action_redirect_custom_url = ppressPOST_var('noaccess_action_redirect_
134
  switch (val) {
135
  case 'everyone':
136
  $('#pp-cc-access-role-row').hide();
 
137
  $('#pp-cc-access-noaccess-action-row').hide();
138
  $('#pp-cc-access-noaccess-action-message-row').hide();
139
  $('#pp-cc-access-noaccess-action-message-custom-row').hide();
@@ -146,11 +163,13 @@ $noaccess_action_redirect_custom_url = ppressPOST_var('noaccess_action_redirect_
146
  $('#pp-cc-access-noaccess-action-redirect-custom-url-row').hide();
147
  $('#pp-cc-access-noaccess-action-message-row').hide();
148
  // all show code must be after hide()
149
- $('#pp-cc-access-role-row').show().find('select').change();
 
150
  $('#pp-cc-access-noaccess-action-row').show().find('select').change();
151
  break;
152
  case 'logout':
153
  $('#pp-cc-access-role-row').hide();
 
154
  $('#pp-cc-access-noaccess-action-message-custom-row').hide();
155
  $('#pp-cc-access-noaccess-action-redirect-row').hide();
156
  $('#pp-cc-access-noaccess-action-redirect-custom-url-row').hide();
4
 
5
  $who_can_access = ppressPOST_var('who_can_access', ppress_var($accessConditionData, 'who_can_access'), false, $postedData);
6
  $access_roles = ppressPOST_var('access_roles', ppress_var($accessConditionData, 'access_roles', []), [], $postedData);
7
+ $access_wp_users = ppressPOST_var('access_wp_users', ppress_var($accessConditionData, 'access_wp_users', []), [], $postedData);
8
  $noaccess_action = ppressPOST_var('noaccess_action', ppress_var($accessConditionData, 'noaccess_action'), false, $postedData);
9
  $noaccess_action_message_type = ppressPOST_var('noaccess_action_message_type', ppress_var($accessConditionData, 'noaccess_action_message_type'), false, $postedData);
10
  $noaccess_action_message_custom = ppressPOST_var('noaccess_action_message_custom', ppress_var($accessConditionData, 'noaccess_action_message_custom'), false, $postedData);
39
  <span><?= $value ?></span>
40
  </label>
41
  <?php endforeach; ?>
42
+ </span>
43
+ </td>
44
+ </tr>
45
+ <tr id="pp-cc-access-wp-users-row">
46
+ <th>
47
+ <label for="pp-cc-access-wp-users"><?= esc_html__('Select specific users that can access content', 'wp-user-avatar') ?></label>
48
+ </th>
49
+ <td>
50
+ <select id="pp-cc-access-wp-users" name="ppress_cc_data[access_condition][access_wp_users][]" multiple>
51
+ <?php foreach ($access_wp_users as $user_id): $user = get_userdata($user_id); ?>
52
+ <option value="<?= $user_id ?>" selected>
53
+ <?= $user->user_login ?> (<?= $user->user_email ?>)
54
+ </option>
55
+ <?php endforeach; ?>
56
+ </select>
57
  </td>
58
  </tr>
59
  <tr id="pp-cc-access-noaccess-action-row">
150
  switch (val) {
151
  case 'everyone':
152
  $('#pp-cc-access-role-row').hide();
153
+ $('#pp-cc-access-wp-users-row').hide();
154
  $('#pp-cc-access-noaccess-action-row').hide();
155
  $('#pp-cc-access-noaccess-action-message-row').hide();
156
  $('#pp-cc-access-noaccess-action-message-custom-row').hide();
163
  $('#pp-cc-access-noaccess-action-redirect-custom-url-row').hide();
164
  $('#pp-cc-access-noaccess-action-message-row').hide();
165
  // all show code must be after hide()
166
+ $('#pp-cc-access-role-row').show()
167
+ $('#pp-cc-access-wp-users-row').show();
168
  $('#pp-cc-access-noaccess-action-row').show().find('select').change();
169
  break;
170
  case 'logout':
171
  $('#pp-cc-access-role-row').hide();
172
+ $('#pp-cc-access-wp-users-row').hide();
173
  $('#pp-cc-access-noaccess-action-message-custom-row').hide();
174
  $('#pp-cc-access-noaccess-action-redirect-row').hide();
175
  $('#pp-cc-access-noaccess-action-redirect-custom-url-row').hide();
src/ShortcodeParser/Builder/GlobalShortcodes.php CHANGED
@@ -475,6 +475,8 @@ class GlobalShortcodes
475
  if (is_user_logged_in()) {
476
  return do_shortcode($content);
477
  }
 
 
478
  }
479
 
480
 
@@ -491,6 +493,8 @@ class GlobalShortcodes
491
  if ( ! is_user_logged_in()) {
492
  return do_shortcode($content);
493
  }
 
 
494
  }
495
 
496
 
475
  if (is_user_logged_in()) {
476
  return do_shortcode($content);
477
  }
478
+
479
+ return '';
480
  }
481
 
482
 
493
  if ( ! is_user_logged_in()) {
494
  return do_shortcode($content);
495
  }
496
+
497
+ return '';
498
  }
499
 
500
 
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitaa467e297763f43379c5fa14a61c1e4e::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitbee77dceba8d7209f0b1c122945e98ec::getLoader();
vendor/composer/autoload_classmap.php CHANGED
@@ -127,6 +127,7 @@ return array(
127
  'ProfilePress\\Core\\ContentProtection\\Frontend\\Checker' => $baseDir . '/src/ContentProtection/Frontend/Checker.php',
128
  'ProfilePress\\Core\\ContentProtection\\Frontend\\PostContent' => $baseDir . '/src/ContentProtection/Frontend/PostContent.php',
129
  'ProfilePress\\Core\\ContentProtection\\Frontend\\Redirect' => $baseDir . '/src/ContentProtection/Frontend/Redirect.php',
 
130
  'ProfilePress\\Core\\ContentProtection\\Init' => $baseDir . '/src/ContentProtection/Init.php',
131
  'ProfilePress\\Core\\ContentProtection\\SettingsPage' => $baseDir . '/src/ContentProtection/SettingsPage.php',
132
  'ProfilePress\\Core\\ContentProtection\\WPListTable' => $baseDir . '/src/ContentProtection/WPListTable.php',
127
  'ProfilePress\\Core\\ContentProtection\\Frontend\\Checker' => $baseDir . '/src/ContentProtection/Frontend/Checker.php',
128
  'ProfilePress\\Core\\ContentProtection\\Frontend\\PostContent' => $baseDir . '/src/ContentProtection/Frontend/PostContent.php',
129
  'ProfilePress\\Core\\ContentProtection\\Frontend\\Redirect' => $baseDir . '/src/ContentProtection/Frontend/Redirect.php',
130
+ 'ProfilePress\\Core\\ContentProtection\\Frontend\\RestrictionShortcode' => $baseDir . '/src/ContentProtection/Frontend/RestrictionShortcode.php',
131
  'ProfilePress\\Core\\ContentProtection\\Init' => $baseDir . '/src/ContentProtection/Init.php',
132
  'ProfilePress\\Core\\ContentProtection\\SettingsPage' => $baseDir . '/src/ContentProtection/SettingsPage.php',
133
  'ProfilePress\\Core\\ContentProtection\\WPListTable' => $baseDir . '/src/ContentProtection/WPListTable.php',
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitaa467e297763f43379c5fa14a61c1e4e
6
  {
7
  private static $loader;
8
 
@@ -24,15 +24,15 @@ class ComposerAutoloaderInitaa467e297763f43379c5fa14a61c1e4e
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
- spl_autoload_register(array('ComposerAutoloaderInitaa467e297763f43379c5fa14a61c1e4e', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
- spl_autoload_unregister(array('ComposerAutoloaderInitaa467e297763f43379c5fa14a61c1e4e', '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\ComposerStaticInitaa467e297763f43379c5fa14a61c1e4e::getInitializer($loader));
36
  } else {
37
  $map = require __DIR__ . '/autoload_namespaces.php';
38
  foreach ($map as $namespace => $path) {
@@ -53,19 +53,19 @@ class ComposerAutoloaderInitaa467e297763f43379c5fa14a61c1e4e
53
  $loader->register(true);
54
 
55
  if ($useStaticLoader) {
56
- $includeFiles = Composer\Autoload\ComposerStaticInitaa467e297763f43379c5fa14a61c1e4e::$files;
57
  } else {
58
  $includeFiles = require __DIR__ . '/autoload_files.php';
59
  }
60
  foreach ($includeFiles as $fileIdentifier => $file) {
61
- composerRequireaa467e297763f43379c5fa14a61c1e4e($fileIdentifier, $file);
62
  }
63
 
64
  return $loader;
65
  }
66
  }
67
 
68
- function composerRequireaa467e297763f43379c5fa14a61c1e4e($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 ComposerAutoloaderInitbee77dceba8d7209f0b1c122945e98ec
6
  {
7
  private static $loader;
8
 
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
+ spl_autoload_register(array('ComposerAutoloaderInitbee77dceba8d7209f0b1c122945e98ec', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
+ spl_autoload_unregister(array('ComposerAutoloaderInitbee77dceba8d7209f0b1c122945e98ec', '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\ComposerStaticInitbee77dceba8d7209f0b1c122945e98ec::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\ComposerStaticInitbee77dceba8d7209f0b1c122945e98ec::$files;
57
  } else {
58
  $includeFiles = require __DIR__ . '/autoload_files.php';
59
  }
60
  foreach ($includeFiles as $fileIdentifier => $file) {
61
+ composerRequirebee77dceba8d7209f0b1c122945e98ec($fileIdentifier, $file);
62
  }
63
 
64
  return $loader;
65
  }
66
  }
67
 
68
+ function composerRequirebee77dceba8d7209f0b1c122945e98ec($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 ComposerStaticInitaa467e297763f43379c5fa14a61c1e4e
8
  {
9
  public static $files = array (
10
  'fda73876e8be17735f680f484cec1679' => __DIR__ . '/../..' . '/src/Functions/custom-settings-api.php',
@@ -161,6 +161,7 @@ class ComposerStaticInitaa467e297763f43379c5fa14a61c1e4e
161
  'ProfilePress\\Core\\ContentProtection\\Frontend\\Checker' => __DIR__ . '/../..' . '/src/ContentProtection/Frontend/Checker.php',
162
  'ProfilePress\\Core\\ContentProtection\\Frontend\\PostContent' => __DIR__ . '/../..' . '/src/ContentProtection/Frontend/PostContent.php',
163
  'ProfilePress\\Core\\ContentProtection\\Frontend\\Redirect' => __DIR__ . '/../..' . '/src/ContentProtection/Frontend/Redirect.php',
 
164
  'ProfilePress\\Core\\ContentProtection\\Init' => __DIR__ . '/../..' . '/src/ContentProtection/Init.php',
165
  'ProfilePress\\Core\\ContentProtection\\SettingsPage' => __DIR__ . '/../..' . '/src/ContentProtection/SettingsPage.php',
166
  'ProfilePress\\Core\\ContentProtection\\WPListTable' => __DIR__ . '/../..' . '/src/ContentProtection/WPListTable.php',
@@ -287,9 +288,9 @@ class ComposerStaticInitaa467e297763f43379c5fa14a61c1e4e
287
  public static function getInitializer(ClassLoader $loader)
288
  {
289
  return \Closure::bind(function () use ($loader) {
290
- $loader->prefixLengthsPsr4 = ComposerStaticInitaa467e297763f43379c5fa14a61c1e4e::$prefixLengthsPsr4;
291
- $loader->prefixDirsPsr4 = ComposerStaticInitaa467e297763f43379c5fa14a61c1e4e::$prefixDirsPsr4;
292
- $loader->classMap = ComposerStaticInitaa467e297763f43379c5fa14a61c1e4e::$classMap;
293
 
294
  }, null, ClassLoader::class);
295
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitbee77dceba8d7209f0b1c122945e98ec
8
  {
9
  public static $files = array (
10
  'fda73876e8be17735f680f484cec1679' => __DIR__ . '/../..' . '/src/Functions/custom-settings-api.php',
161
  'ProfilePress\\Core\\ContentProtection\\Frontend\\Checker' => __DIR__ . '/../..' . '/src/ContentProtection/Frontend/Checker.php',
162
  'ProfilePress\\Core\\ContentProtection\\Frontend\\PostContent' => __DIR__ . '/../..' . '/src/ContentProtection/Frontend/PostContent.php',
163
  'ProfilePress\\Core\\ContentProtection\\Frontend\\Redirect' => __DIR__ . '/../..' . '/src/ContentProtection/Frontend/Redirect.php',
164
+ 'ProfilePress\\Core\\ContentProtection\\Frontend\\RestrictionShortcode' => __DIR__ . '/../..' . '/src/ContentProtection/Frontend/RestrictionShortcode.php',
165
  'ProfilePress\\Core\\ContentProtection\\Init' => __DIR__ . '/../..' . '/src/ContentProtection/Init.php',
166
  'ProfilePress\\Core\\ContentProtection\\SettingsPage' => __DIR__ . '/../..' . '/src/ContentProtection/SettingsPage.php',
167
  'ProfilePress\\Core\\ContentProtection\\WPListTable' => __DIR__ . '/../..' . '/src/ContentProtection/WPListTable.php',
288
  public static function getInitializer(ClassLoader $loader)
289
  {
290
  return \Closure::bind(function () use ($loader) {
291
+ $loader->prefixLengthsPsr4 = ComposerStaticInitbee77dceba8d7209f0b1c122945e98ec::$prefixLengthsPsr4;
292
+ $loader->prefixDirsPsr4 = ComposerStaticInitbee77dceba8d7209f0b1c122945e98ec::$prefixDirsPsr4;
293
+ $loader->classMap = ComposerStaticInitbee77dceba8d7209f0b1c122945e98ec::$classMap;
294
 
295
  }, null, ClassLoader::class);
296
  }
vendor/composer/installed.php CHANGED
@@ -5,7 +5,7 @@
5
  'type' => 'library',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
- 'reference' => '83f5f2e022486869d4be540aa769ba92ad8fab48',
9
  'name' => '__root__',
10
  'dev' => false,
11
  ),
@@ -16,7 +16,7 @@
16
  'type' => 'library',
17
  'install_path' => __DIR__ . '/../../',
18
  'aliases' => array(),
19
- 'reference' => '83f5f2e022486869d4be540aa769ba92ad8fab48',
20
  'dev_requirement' => false,
21
  ),
22
  'collizo4sky/persist-admin-notices-dismissal' => array(
5
  'type' => 'library',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
+ 'reference' => '43161305f87d49744303378f9b2d4fa96e71a4cf',
9
  'name' => '__root__',
10
  'dev' => false,
11
  ),
16
  'type' => 'library',
17
  'install_path' => __DIR__ . '/../../',
18
  'aliases' => array(),
19
+ 'reference' => '43161305f87d49744303378f9b2d4fa96e71a4cf',
20
  'dev_requirement' => false,
21
  ),
22
  'collizo4sky/persist-admin-notices-dismissal' => 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.5
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.5');
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.6
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.6');
18
 
19
  require __DIR__ . '/vendor/autoload.php';
20