WP User Avatar - Version 3.1.4

Version Description

  • Security fix: Ensures only valid custom user meta are updated.
  • Security fix: validate files and images correctly before they are uploaded.
  • Fix: Avatar upload now respects resize settings when using frontend forms.
  • Fix: Added link to uploaded file when file custom field is displayed.
  • Enhancement: when a user profile doesn't exist, redirect to homepage.
  • Enhancement: Remember login by default.
Download this release

Release Info

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

Code changes from version 3.1.3 to 3.1.4

Files changed (38) hide show
  1. assets/images/profilepressxmailoptin.png +0 -0
  2. assets/images/step-1.svg +1 -0
  3. assets/images/step-2.svg +1 -0
  4. assets/images/step-complete.svg +1 -0
  5. assets/js/mailoptin.js +178 -0
  6. assets/js/mailoptin.min.js +1 -0
  7. changelog.txt +9 -1
  8. languages/wp-user-avatar.pot +284 -80
  9. readme.txt +9 -10
  10. src/Admin/SettingsPages/ExtensionsSettingsPage.php +1 -1
  11. src/Admin/SettingsPages/MailOptin.php +704 -0
  12. src/Base.php +2 -0
  13. src/Classes/AjaxHandler.php +1 -1
  14. src/Classes/EditUserProfile.php +4 -1
  15. src/Classes/FileUploader.php +5 -3
  16. src/Classes/ImageUploader.php +10 -12
  17. src/Classes/Installer/PPress_Install_Skin.php +26 -0
  18. src/Classes/Installer/PluginSilentUpgrader.php +592 -0
  19. src/Classes/Installer/PluginSilentUpgraderSkin.php +47 -0
  20. src/Classes/Installer/index.php +2 -0
  21. src/Classes/LoginAuth.php +2 -2
  22. src/Classes/PROFILEPRESS_sql.php +5 -12
  23. src/Classes/RegistrationAuth.php +15 -6
  24. src/ContentProtection/Init.php +1 -1
  25. src/Functions/GlobalFunctions.php +43 -1
  26. src/ShortcodeParser/Builder/FieldsShortcodeCallback.php +15 -1
  27. src/ShortcodeParser/Builder/LoginFormBuilder.php +4 -3
  28. src/ShortcodeParser/Builder/PasswordResetBuilder.php +2 -2
  29. src/ShortcodeParser/FrontendProfileTag.php +9 -5
  30. src/Widgets/TabbedWidget.php +1 -6
  31. src/Widgets/TabbedWidgetDependency.php +2 -3
  32. vendor/autoload.php +1 -1
  33. vendor/composer/InstalledVersions.php +2 -2
  34. vendor/composer/autoload_classmap.php +4 -0
  35. vendor/composer/autoload_real.php +7 -7
  36. vendor/composer/autoload_static.php +8 -4
  37. vendor/composer/installed.php +2 -2
  38. wp-user-avatar.php +2 -2
assets/images/profilepressxmailoptin.png ADDED
Binary file
assets/images/step-1.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 100 100"><circle cx="50" cy="50" r="50" fill="#ccc"/><path data-name="1" d="M47.48 67.35v-22.7h-8.8V39.3a16.779 16.779 0 003.57-.27 9.344 9.344 0 003.1-1.15 7.565 7.565 0 002.33-2.18 7.737 7.737 0 001.25-3.35h5.65v35h-7.1z" fill="#fff" fill-rule="evenodd"/></svg>
assets/images/step-2.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 100 100"><circle cx="50" cy="50" r="50" fill="#ccc"/><path data-name="2" d="M38.53 41.23a12.807 12.807 0 012.4-4.5 10.792 10.792 0 014.02-3 13.616 13.616 0 015.58-1.08 13.905 13.905 0 014.57.75 11.871 11.871 0 013.83 2.15A10.329 10.329 0 0161.55 39a10.589 10.589 0 01.98 4.6 11 11 0 01-.85 4.55 12.168 12.168 0 01-2.25 3.38 18.894 18.894 0 01-3.18 2.67c-1.18.8-2.37 1.59-3.57 2.38s-2.37 1.62-3.5 2.52a16.035 16.035 0 00-3 3.15h16.55v6.1h-25.7a14.681 14.681 0 01.87-5.3 14.2 14.2 0 012.38-4.02 20.5 20.5 0 013.52-3.28c1.35-1 2.78-2.01 4.28-3.05.77-.53 1.58-1.07 2.45-1.62a15.537 15.537 0 002.37-1.83A9.286 9.286 0 0054.7 47a5.5 5.5 0 00.73-2.85 5.006 5.006 0 00-5.25-5.4 4.569 4.569 0 00-2.63.73 5.345 5.345 0 00-1.72 1.9 9.023 9.023 0 00-.93 2.6 15.122 15.122 0 00-.27 2.82h-6.8a16.741 16.741 0 01.7-5.57z" fill="#fff" fill-rule="evenodd"/></svg>
assets/images/step-complete.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 56.18 56.18"><circle cx="28.09" cy="28.09" r="25" fill="#6fb05a" stroke="#6ab255" stroke-width="6"/><path d="M36.93 19.88L24.09 32.72 19.37 28a.6.6 0 00-.83 0l-1.38 1.39a.573.573 0 000 .82l6.52 6.52a.573.573 0 00.82 0l14.64-14.64a.585.585 0 000-.83l-1.38-1.38a.585.585 0 00-.83 0z" fill="#fff" fill-rule="evenodd"/></svg>
assets/js/mailoptin.js ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* global ppress_pluginlanding, ppress_admin_globals */
2
+
3
+ 'use strict';
4
+
5
+ var PPressPagesMailOptin = window.PPressPagesMailOptin || ( function( document, window, $ ) {
6
+
7
+ var el = {};
8
+
9
+ var app = {
10
+
11
+ init: function() {
12
+
13
+ $( document ).ready( app.ready );
14
+ },
15
+
16
+ ready: function() {
17
+
18
+ app.initVars();
19
+ app.events();
20
+ },
21
+
22
+ initVars: function() {
23
+
24
+ el = {
25
+ $stepInstall: $( 'section.step-install' ),
26
+ $stepInstallNum: $( 'section.step-install .num img' ),
27
+ $stepSetup: $( 'section.step-setup' ),
28
+ $stepSetupNum: $( 'section.step-setup .num img' ),
29
+ };
30
+ },
31
+
32
+ events: function() {
33
+
34
+ // Step 'Install' button click.
35
+ el.$stepInstall.on( 'click', 'button', app.stepInstallClick );
36
+
37
+ // Step 'Setup' button click.
38
+ el.$stepSetup.on( 'click', 'button', app.gotoURL );
39
+ },
40
+
41
+ stepInstallClick: function() {
42
+
43
+ var $btn = $( this ),
44
+ action = $btn.attr( 'data-action' ),
45
+ plugin = $btn.attr( 'data-plugin' ),
46
+ ajaxAction = '';
47
+
48
+ if ( $btn.hasClass( 'disabled' ) ) {
49
+ return;
50
+ }
51
+
52
+ switch ( action ) {
53
+ case 'activate':
54
+ ajaxAction = 'ppress_activate_plugin';
55
+ $btn.text( ppress_pluginlanding.activating );
56
+ break;
57
+
58
+ case 'install':
59
+ ajaxAction = 'ppress_install_plugin';
60
+ $btn.text( ppress_pluginlanding.installing );
61
+ break;
62
+
63
+ case 'goto-url':
64
+ window.location.href = $btn.attr( 'data-url' );
65
+ return;
66
+
67
+ default:
68
+ return;
69
+ }
70
+
71
+ $btn.addClass( 'disabled' );
72
+ app.showSpinner( el.$stepInstallNum );
73
+
74
+ var data = {
75
+ action: ajaxAction,
76
+ nonce : ppress_admin_globals.nonce,
77
+ plugin: plugin,
78
+ type : 'plugin',
79
+ };
80
+
81
+ $.post( ajaxurl, data )
82
+ .done( function( res ) {
83
+ app.stepInstallDone( res, $btn, action );
84
+ } )
85
+ .always( function() {
86
+ app.hideSpinner( el.$stepInstallNum );
87
+ } );
88
+ },
89
+
90
+ /**
91
+ * Done part of the 'Install' step.
92
+ */
93
+ stepInstallDone: function( res, $btn, action ) {
94
+
95
+ if ( res.success ) {
96
+ el.$stepInstallNum.attr( 'src', el.$stepInstallNum.attr( 'src' ).replace( 'step-1.', 'step-complete.' ) );
97
+ $btn.addClass( 'grey' ).text( ppress_pluginlanding.activated );
98
+ app.stepInstallPluginStatus();
99
+ } else {
100
+ var url = 'install' === action ? ppress_pluginlanding.manual_install_url : ppress_pluginlanding.manual_activate_url,
101
+ msg = 'install' === action ? ppress_pluginlanding.error_could_not_install : ppress_pluginlanding.error_could_not_activate,
102
+ btn = 'install' === action ? ppress_pluginlanding.download_now : ppress_pluginlanding.plugins_page;
103
+
104
+ $btn.removeClass( 'grey disabled' ).text( btn ).attr( 'data-action', 'goto-url' ).attr( 'data-url', url );
105
+ $btn.after( '<p class="error">' + msg + '</p>' );
106
+ }
107
+ },
108
+
109
+ /**
110
+ * Callback for step 'Install' completion.
111
+ */
112
+ stepInstallPluginStatus: function() {
113
+
114
+ var data = {
115
+ action: 'ppress_mailoptin_page_check_plugin_status',
116
+ nonce : ppress_admin_globals.nonce,
117
+ };
118
+ $.post( ajaxurl, data )
119
+ .done( app.stepInstallPluginStatusDone );
120
+ },
121
+
122
+ /**
123
+ * Done part of the callback for step 'Install' completion.
124
+ */
125
+ stepInstallPluginStatusDone: function( res ) {
126
+
127
+ if ( ! res.success ) {
128
+ return;
129
+ }
130
+
131
+ el.$stepSetup.removeClass( 'grey' );
132
+ el.$stepSetupBtn = el.$stepSetup.find( 'button' );
133
+ el.$stepSetupBtn.removeClass( 'grey disabled' );
134
+
135
+ if ( res.data.setup_status > 0 ) {
136
+ el.$stepSetupNum.attr( 'src', el.$stepSetupNum.attr( 'src' ).replace( 'step-2.svg', 'step-complete.svg' ) );
137
+ el.$stepSetupBtn.text( ppress_pluginlanding.smtp_settings_button );
138
+ }
139
+ },
140
+
141
+ /**
142
+ * Go to URL by click on the button.
143
+ */
144
+ gotoURL: function() {
145
+
146
+ var $btn = $( this );
147
+
148
+ if ( $btn.hasClass( 'disabled' ) ) {
149
+ return;
150
+ }
151
+
152
+ window.location.href = $btn.attr( 'data-url' );
153
+ },
154
+
155
+ /**
156
+ * Display spinner.
157
+ */
158
+ showSpinner: function( $el ) {
159
+
160
+ $el.siblings( '.loader' ).removeClass( 'hidden' );
161
+ },
162
+
163
+ /**
164
+ * Hide spinner.
165
+ */
166
+ hideSpinner: function( $el ) {
167
+
168
+ $el.siblings( '.loader' ).addClass( 'hidden' );
169
+ },
170
+ };
171
+
172
+ // Provide access to public functions/properties.
173
+ return app;
174
+
175
+ }( document, window, jQuery ) );
176
+
177
+ // Initialize.
178
+ PPressPagesMailOptin.init();
assets/js/mailoptin.min.js ADDED
@@ -0,0 +1 @@
 
1
+ "use strict";var PPressPagesMailOptin=window.PPressPagesMailOptin||function(t,s,n){var e={},a={init:function(){n(t).ready(a.ready)},ready:function(){a.initVars(),a.events()},initVars:function(){e={$stepInstall:n("section.step-install"),$stepInstallNum:n("section.step-install .num img"),$stepSetup:n("section.step-setup"),$stepSetupNum:n("section.step-setup .num img")}},events:function(){e.$stepInstall.on("click","button",a.stepInstallClick),e.$stepSetup.on("click","button",a.gotoURL)},stepInstallClick:function(){var t=n(this),l=t.attr("data-action"),i=t.attr("data-plugin"),p="";if(!t.hasClass("disabled")){switch(l){case"activate":p="ppress_activate_plugin",t.text(ppress_pluginlanding.activating);break;case"install":p="ppress_install_plugin",t.text(ppress_pluginlanding.installing);break;case"goto-url":return void(s.location.href=t.attr("data-url"));default:return}t.addClass("disabled"),a.showSpinner(e.$stepInstallNum);var r={action:p,nonce:ppress_admin_globals.nonce,plugin:i,type:"plugin"};n.post(ajaxurl,r).done((function(s){a.stepInstallDone(s,t,l)})).always((function(){a.hideSpinner(e.$stepInstallNum)}))}},stepInstallDone:function(t,s,n){if(t.success)e.$stepInstallNum.attr("src",e.$stepInstallNum.attr("src").replace("step-1.","step-complete.")),s.addClass("grey").text(ppress_pluginlanding.activated),a.stepInstallPluginStatus();else{var l="install"===n?ppress_pluginlanding.manual_install_url:ppress_pluginlanding.manual_activate_url,i="install"===n?ppress_pluginlanding.error_could_not_install:ppress_pluginlanding.error_could_not_activate,p="install"===n?ppress_pluginlanding.download_now:ppress_pluginlanding.plugins_page;s.removeClass("grey disabled").text(p).attr("data-action","goto-url").attr("data-url",l),s.after('<p class="error">'+i+"</p>")}},stepInstallPluginStatus:function(){var t={action:"ppress_mailoptin_page_check_plugin_status",nonce:ppress_admin_globals.nonce};n.post(ajaxurl,t).done(a.stepInstallPluginStatusDone)},stepInstallPluginStatusDone:function(t){t.success&&(e.$stepSetup.removeClass("grey"),e.$stepSetupBtn=e.$stepSetup.find("button"),e.$stepSetupBtn.removeClass("grey disabled"),t.data.setup_status>0&&(e.$stepSetupNum.attr("src",e.$stepSetupNum.attr("src").replace("step-2.svg","step-complete.svg")),e.$stepSetupBtn.text(ppress_pluginlanding.smtp_settings_button)))},gotoURL:function(){var t=n(this);t.hasClass("disabled")||(s.location.href=t.attr("data-url"))},showSpinner:function(t){t.siblings(".loader").removeClass("hidden")},hideSpinner:function(t){t.siblings(".loader").addClass("hidden")}};return a}(document,window,jQuery);PPressPagesMailOptin.init();
changelog.txt CHANGED
@@ -1,4 +1,12 @@
1
- = 3.1.3 =
 
 
 
 
 
 
 
 
2
  * Fixed edge cases where post content was overridden.
3
  * Fixed bug where buddypress avatar override wasn't working.
4
  * Removed the shortcode builder due to wp.org no longer accepting code inserters.
1
+ = 3.1.4 =
2
+ * Security fix: Ensures only valid custom user meta are updated.
3
+ * Security fix: validate files and images correctly before they are uploaded.
4
+ * Fix: Avatar upload now respects resize settings when using frontend forms.
5
+ * Fix: Added link to uploaded file when file custom field is displayed.
6
+ * Enhancement: when a user profile doesn't exist, redirect to homepage.
7
+ * Enhancement: Remember login by default.
8
+
9
+ = 3.1.3 =
10
  * Fixed edge cases where post content was overridden.
11
  * Fixed bug where buddypress avatar override wasn't working.
12
  * Removed the shortcode builder due to wp.org no longer accepting code inserters.
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.1.3\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-user-avatar\n"
7
- "POT-Creation-Date: 2021-05-26 15:39:50+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -125,7 +125,7 @@ msgid "ProfilePress Avatar Upload"
125
  msgstr ""
126
 
127
  #: deprecated/wp-user-avatar/includes/class-wp-user-avatar-widget.php:56
128
- #: src/Widgets/Form.php:65 src/Widgets/TabbedWidget.php:466
129
  #: src/Widgets/UserPanel.php:74
130
  msgid "Title:"
131
  msgstr ""
@@ -446,9 +446,9 @@ msgstr ""
446
  #: src/Admin/SettingsPages/DragDropBuilder/Metabox.php:162
447
  #: src/Admin/SettingsPages/DragDropBuilder/Metabox.php:223
448
  #: src/Admin/SettingsPages/GeneralSettings.php:234
449
- #: src/Functions/GlobalFunctions.php:1224
450
- #: src/Functions/GlobalFunctions.php:1250
451
- #: src/Functions/GlobalFunctions.php:1272
452
  msgid "Select..."
453
  msgstr ""
454
 
@@ -519,7 +519,7 @@ msgid "Select Icon"
519
  msgstr ""
520
 
521
  #: src/Admin/SettingsPages/DragDropBuilder/DragDropBuilder.php:1202
522
- #: src/Functions/GlobalFunctions.php:1275
523
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:202
524
  msgid "Standard Fields"
525
  msgstr ""
@@ -529,7 +529,7 @@ msgid "Extra Fields"
529
  msgstr ""
530
 
531
  #: src/Admin/SettingsPages/DragDropBuilder/DragDropBuilder.php:1205
532
- #: src/Classes/ExtensionManager.php:53 src/Functions/GlobalFunctions.php:1278
533
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:216
534
  msgid "Custom Fields"
535
  msgstr ""
@@ -555,7 +555,7 @@ msgstr ""
555
  #: src/Admin/SettingsPages/EmailSettings/CustomizerTrait.php:11
556
  #: src/AdminBarDashboardAccess/include.settings-page.php:54
557
  #: src/AdminBarDashboardAccess/include.settings-page.php:109
558
- #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:1004
559
  msgid "Save Changes"
560
  msgstr ""
561
 
@@ -703,7 +703,7 @@ msgstr ""
703
 
704
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/Bio.php:22
705
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/UserProfile/Bio.php:22
706
- #: src/Functions/GlobalFunctions.php:1262
707
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:211
708
  #: src/Themes/DragDrop/AbstractTheme.php:189
709
  msgid "Biography"
@@ -953,7 +953,7 @@ msgstr ""
953
 
954
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/DisplayName.php:22
955
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/UserProfile/DisplayName.php:22
956
- #: src/Functions/GlobalFunctions.php:1260
957
  #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:318
958
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:208
959
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:460
@@ -978,17 +978,17 @@ msgstr ""
978
 
979
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/Email.php:22
980
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/UserProfile/Email.php:22
981
- #: src/Functions/GlobalFunctions.php:1261
982
  #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:210
983
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:206
984
  #: src/Themes/DragDrop/AbstractTheme.php:162
985
- #: src/Themes/DragDrop/AbstractTheme.php:221 src/Widgets/TabbedWidget.php:131
986
  msgid "Email Address"
987
  msgstr ""
988
 
989
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/FirstName.php:22
990
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/UserProfile/FirstName.php:22
991
- #: src/Functions/GlobalFunctions.php:1257
992
  #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:350
993
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:209
994
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:461
@@ -1008,7 +1008,7 @@ msgstr ""
1008
 
1009
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/LastName.php:22
1010
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/UserProfile/LastName.php:22
1011
- #: src/Functions/GlobalFunctions.php:1258
1012
  #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:383
1013
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:210
1014
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:462
@@ -1022,7 +1022,7 @@ msgid "Remember Login"
1022
  msgstr ""
1023
 
1024
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/Login/RememberLogin.php:27
1025
- #: src/Themes/DragDrop/AbstractTheme.php:208 src/Widgets/TabbedWidget.php:142
1026
  msgid "Remember Me"
1027
  msgstr ""
1028
 
@@ -1030,7 +1030,7 @@ msgstr ""
1030
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/PasswordReset/Userlogin.php:22
1031
  #: src/ShortcodeParser/Builder/PasswordResetBuilder.php:33
1032
  #: src/Themes/DragDrop/AbstractTheme.php:202
1033
- #: src/Themes/DragDrop/AbstractTheme.php:213 src/Widgets/TabbedWidget.php:127
1034
  msgid "Username or Email"
1035
  msgstr ""
1036
 
@@ -1041,7 +1041,7 @@ msgstr ""
1041
 
1042
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/Nickname.php:22
1043
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/UserProfile/Nickname.php:22
1044
- #: src/Functions/GlobalFunctions.php:1259
1045
  #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:286
1046
  #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:300
1047
  #: src/ShortcodeParser/MyAccount/edit-profile.tmpl.php:138
@@ -1197,13 +1197,13 @@ msgstr ""
1197
 
1198
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/UserProfile/Username.php:22
1199
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/Username.php:22
1200
- #: src/Functions/GlobalFunctions.php:1256
1201
  #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:135
1202
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:463
1203
  #: src/Themes/DragDrop/AbstractTheme.php:159
1204
  #: src/Themes/DragDrop/AbstractTheme.php:218
1205
  #: src/Themes/DragDrop/UserProfile/DefaultTemplate.php:105
1206
- #: src/Widgets/TabbedWidget.php:124
1207
  msgid "Username"
1208
  msgstr ""
1209
 
@@ -1448,7 +1448,7 @@ msgid "New User Admin Notification"
1448
  msgstr ""
1449
 
1450
  #: src/Admin/SettingsPages/EmailSettings/EmailSettingsPage.php:80
1451
- #: src/Functions/GlobalFunctions.php:722 src/RegisterActivation/Base.php:89
1452
  msgid "[%s] New User Registration"
1453
  msgstr ""
1454
 
@@ -1708,7 +1708,7 @@ msgstr ""
1708
  #: src/Classes/AjaxHandler.php:53 src/NavigationMenuLinks/Backend.php:34
1709
  #: src/ShortcodeParser/Builder/GlobalShortcodes.php:235
1710
  #: src/Themes/DragDrop/AbstractBuildScratch.php:180
1711
- #: src/Widgets/TabbedWidget.php:107
1712
  msgid "Login"
1713
  msgstr ""
1714
 
@@ -1996,7 +1996,7 @@ msgid "Redirection Settings"
1996
  msgstr ""
1997
 
1998
  #: src/Admin/SettingsPages/GeneralSettings.php:231
1999
- #: src/Widgets/TabbedWidget.php:217
2000
  msgid "Log out"
2001
  msgstr ""
2002
 
@@ -2165,6 +2165,193 @@ msgstr ""
2165
  msgid "ID"
2166
  msgstr ""
2167
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2168
  #: src/Admin/SettingsPages/MemberDirectories.php:35
2169
  #: src/Admin/SettingsPages/MemberDirectories.php:53
2170
  #: src/Admin/SettingsPages/MemberDirectories.php:85
@@ -2530,41 +2717,41 @@ msgstr ""
2530
  msgid "Uploaded file is greater than the allowed sized of %s"
2531
  msgstr ""
2532
 
2533
- #: src/Classes/FileUploader.php:94
2534
  msgid "appears to be of an invalid file format. Please try again."
2535
  msgstr ""
2536
 
2537
- #: src/Classes/FileUploader.php:125
2538
  msgid "Unable to save %s, please try again."
2539
  msgstr ""
2540
 
2541
- #: src/Classes/FileUploader.php:152
2542
  msgid "The uploaded file exceeds the upload_max_filesize directive in php.ini"
2543
  msgstr ""
2544
 
2545
- #: src/Classes/FileUploader.php:155
2546
  msgid ""
2547
  "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in "
2548
  "the HTML form"
2549
  msgstr ""
2550
 
2551
- #: src/Classes/FileUploader.php:158
2552
  msgid "The uploaded file was only partially uploaded"
2553
  msgstr ""
2554
 
2555
- #: src/Classes/FileUploader.php:161
2556
  msgid "No file was uploaded"
2557
  msgstr ""
2558
 
2559
- #: src/Classes/FileUploader.php:164
2560
  msgid "Missing a temporary folder"
2561
  msgstr ""
2562
 
2563
- #: src/Classes/FileUploader.php:167
2564
  msgid "Failed to write file to disk"
2565
  msgstr ""
2566
 
2567
- #: src/Classes/FileUploader.php:170
2568
  msgid "File upload stopped by extension"
2569
  msgstr ""
2570
 
@@ -2573,7 +2760,7 @@ msgid "You must be logged in to preview a form."
2573
  msgstr ""
2574
 
2575
  #: src/Classes/FormRepository.php:166 src/Themes/DragDrop/AbstractTheme.php:124
2576
- #: src/Widgets/TabbedWidget.php:87
2577
  msgid "Processing"
2578
  msgstr ""
2579
 
@@ -2598,7 +2785,7 @@ msgid "%s is greater than the allowed sized of %s"
2598
  msgstr ""
2599
 
2600
  #: src/Classes/ImageUploader.php:83
2601
- msgid "Uploaded file not an image."
2602
  msgstr ""
2603
 
2604
  #: src/Classes/ImageUploader.php:119
@@ -2654,33 +2841,33 @@ msgstr ""
2654
  msgid "Log in"
2655
  msgstr ""
2656
 
2657
- #: src/Classes/RegistrationAuth.php:209
2658
  msgid "%s field is required"
2659
  msgstr ""
2660
 
2661
- #: src/Classes/RegistrationAuth.php:218
2662
  msgid ""
2663
  "<strong>ERROR</strong>: This username is invalid because it uses illegal "
2664
  "characters. Please enter a valid username."
2665
  msgstr ""
2666
 
2667
- #: src/Classes/RegistrationAuth.php:222
2668
  msgid "Email address is not valid"
2669
  msgstr ""
2670
 
2671
- #: src/Classes/RegistrationAuth.php:226
2672
  msgid "Passwords do not match"
2673
  msgstr ""
2674
 
2675
- #: src/Classes/RegistrationAuth.php:230
2676
  msgid "Email addresses do not match"
2677
  msgstr ""
2678
 
2679
- #: src/Classes/RegistrationAuth.php:234
2680
  msgid "Password is not strong"
2681
  msgstr ""
2682
 
2683
- #: src/Classes/RegistrationAuth.php:393
2684
  #: src/Themes/DragDrop/AbstractTheme.php:110
2685
  msgid "Registration successful."
2686
  msgstr ""
@@ -2984,45 +3171,62 @@ msgid "Redirect URL"
2984
  msgstr ""
2985
 
2986
  #. translators: %s: User login.
2987
- #: src/Functions/GlobalFunctions.php:792
2988
  msgid "Username: %s"
2989
  msgstr ""
2990
 
2991
- #: src/Functions/GlobalFunctions.php:793
2992
  msgid "To set your password, visit the following address:"
2993
  msgstr ""
2994
 
2995
  #. translators: Login details notification email subject. %s: Site title.
2996
- #: src/Functions/GlobalFunctions.php:801
2997
  msgid "[%s] Login Details"
2998
  msgstr ""
2999
 
3000
- #: src/Functions/GlobalFunctions.php:1087
3001
  msgid ""
3002
  "It must be unique for each field, not a reserve text, in lowercase letters "
3003
  "only with an underscore ( _ ) separating words e.g job_title"
3004
  msgstr ""
3005
 
3006
- #: src/Functions/GlobalFunctions.php:1208
3007
  msgid "%s (WooCommerce Billing Address)"
3008
  msgstr ""
3009
 
3010
- #: src/Functions/GlobalFunctions.php:1212
3011
  msgid "%s (WooCommerce Shipping Address)"
3012
  msgstr ""
3013
 
3014
- #: src/Functions/GlobalFunctions.php:1254
3015
  msgid "First and Last Names"
3016
  msgstr ""
3017
 
3018
- #: src/Functions/GlobalFunctions.php:1255
3019
  msgid "Last and First Names"
3020
  msgstr ""
3021
 
3022
- #: src/Functions/GlobalFunctions.php:1263
3023
  msgid "Registration Date"
3024
  msgstr ""
3025
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3026
  #: src/Functions/custom-settings-api.php:855
3027
  msgid "Code"
3028
  msgstr ""
@@ -4024,8 +4228,8 @@ msgid "Zimbabwe"
4024
  msgstr ""
4025
 
4026
  #: src/NavigationMenuLinks/Backend.php:29 src/RegisterActivation/Base.php:155
4027
- #: src/ShortcodeParser/Builder/LoginFormBuilder.php:165
4028
- #: src/Themes/DragDrop/AbstractTheme.php:104 src/Widgets/TabbedWidget.php:88
4029
  msgid "Log In"
4030
  msgstr ""
4031
 
@@ -4037,9 +4241,9 @@ msgid "Log Out"
4037
  msgstr ""
4038
 
4039
  #: src/NavigationMenuLinks/Backend.php:31 src/RegisterActivation/Base.php:159
4040
- #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:1001
4041
  #: src/ShortcodeParser/Builder/GlobalShortcodes.php:172
4042
- #: src/Widgets/TabbedWidget.php:89
4043
  msgid "Sign Up"
4044
  msgstr ""
4045
 
@@ -4220,11 +4424,11 @@ msgstr ""
4220
  msgid "custom field not defined"
4221
  msgstr ""
4222
 
4223
- #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:1071
4224
  msgid "Delete Avatar"
4225
  msgstr ""
4226
 
4227
- #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:1107
4228
  msgid "Delete Cover Image"
4229
  msgstr ""
4230
 
@@ -4250,7 +4454,7 @@ msgstr ""
4250
 
4251
  #: src/ShortcodeParser/Builder/PasswordResetBuilder.php:103
4252
  #: src/ShortcodeParser/Builder/PasswordResetBuilder.php:335
4253
- #: src/Widgets/TabbedWidget.php:90
4254
  msgid "Get New Password"
4255
  msgstr ""
4256
 
@@ -4270,23 +4474,23 @@ msgstr ""
4270
  msgid "Authentication failed. Please try again"
4271
  msgstr ""
4272
 
4273
- #: src/ShortcodeParser/FrontendProfileTag.php:83
4274
  msgid ""
4275
  "This content is available to members only. Please <a href=\"%1$s\">login</a> "
4276
  "or <a href=\"%2$s\">register</a> to view this area."
4277
  msgstr ""
4278
 
4279
- #: src/ShortcodeParser/FrontendProfileTag.php:90
4280
  msgid "You are not authorized to access this area."
4281
  msgstr ""
4282
 
4283
- #: src/ShortcodeParser/FrontendProfileTag.php:128
4284
  msgid ""
4285
  "Form class not found. Please check if this user profile actually exist in "
4286
  "ProfilePress."
4287
  msgstr ""
4288
 
4289
- #: src/ShortcodeParser/FrontendProfileTag.php:193
4290
  #: src/Themes/DragDrop/UserProfile/Dixon.php:121
4291
  msgid "Profile"
4292
  msgstr ""
@@ -4481,7 +4685,7 @@ msgid "Lost your password?"
4481
  msgstr ""
4482
 
4483
  #: src/Themes/DragDrop/AbstractBuildScratch.php:179
4484
- #: src/Themes/DragDrop/AbstractTheme.php:109 src/Widgets/TabbedWidget.php:110
4485
  msgid "Register"
4486
  msgstr ""
4487
 
@@ -5007,7 +5211,7 @@ msgid "See all Posts"
5007
  msgstr ""
5008
 
5009
  #: src/Themes/DragDrop/UserProfile/DefaultTemplate.php:378
5010
- #: src/Widgets/TabbedWidget.php:214
5011
  msgid "Edit your profile"
5012
  msgstr ""
5013
 
@@ -5095,63 +5299,63 @@ msgstr ""
5095
  msgid "A tabbed login, registration and lost password widget"
5096
  msgstr ""
5097
 
5098
- #: src/Widgets/TabbedWidget.php:113
5099
  msgid "Forgot?"
5100
  msgstr ""
5101
 
5102
- #: src/Widgets/TabbedWidget.php:211 src/Widgets/UserPanel.php:50
5103
  msgid "Welcome %s"
5104
  msgstr ""
5105
 
5106
- #: src/Widgets/TabbedWidget.php:231
5107
  msgid "Login / Sign up"
5108
  msgstr ""
5109
 
5110
- #: src/Widgets/TabbedWidget.php:237
5111
  msgid "Have an account?"
5112
  msgstr ""
5113
 
5114
- #: src/Widgets/TabbedWidget.php:243
5115
  msgid "Don't have an account?"
5116
  msgstr ""
5117
 
5118
- #: src/Widgets/TabbedWidget.php:249
5119
  msgid "Forgot Password?"
5120
  msgstr ""
5121
 
5122
- #: src/Widgets/TabbedWidget.php:472
5123
  msgid "Login text:"
5124
  msgstr ""
5125
 
5126
- #: src/Widgets/TabbedWidget.php:477
5127
  msgid "Registration text:"
5128
  msgstr ""
5129
 
5130
- #: src/Widgets/TabbedWidget.php:482
5131
  msgid "Lost-password text:"
5132
  msgstr ""
5133
 
5134
- #: src/Widgets/TabbedWidget.php:488
5135
  msgid "Automatically login user after successful registration"
5136
  msgstr ""
5137
 
5138
- #: src/Widgets/TabbedWidget.php:494
5139
  msgid "Widget CSS:"
5140
  msgstr ""
5141
 
5142
- #: src/Widgets/TabbedWidgetDependency.php:26
5143
  msgid "Unable to log in. Please try again"
5144
  msgstr ""
5145
 
5146
- #: src/Widgets/TabbedWidgetDependency.php:44
5147
  msgid "Check your email for further instructions."
5148
  msgstr ""
5149
 
5150
- #: src/Widgets/TabbedWidgetDependency.php:51
5151
  msgid "Unexpected error, please try again"
5152
  msgstr ""
5153
 
5154
- #: src/Widgets/TabbedWidgetDependency.php:106
5155
  msgid "Required form field is missing"
5156
  msgstr ""
5157
 
@@ -5189,9 +5393,9 @@ msgstr ""
5189
  msgid "ProfilePress"
5190
  msgstr ""
5191
 
5192
- #. #-#-#-#-# wp-user-avatar.pot (ProfilePress 3.1.3) #-#-#-#-#
5193
  #. Plugin URI of the plugin/theme
5194
- #. #-#-#-#-# wp-user-avatar.pot (ProfilePress 3.1.3) #-#-#-#-#
5195
  #. Author URI of the plugin/theme
5196
  msgid "https://profilepress.net"
5197
  msgstr ""
2
  # This file is distributed under the same license as the ProfilePress package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: ProfilePress 3.1.4\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-user-avatar\n"
7
+ "POT-Creation-Date: 2021-05-30 08:27:43+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
125
  msgstr ""
126
 
127
  #: deprecated/wp-user-avatar/includes/class-wp-user-avatar-widget.php:56
128
+ #: src/Widgets/Form.php:65 src/Widgets/TabbedWidget.php:461
129
  #: src/Widgets/UserPanel.php:74
130
  msgid "Title:"
131
  msgstr ""
446
  #: src/Admin/SettingsPages/DragDropBuilder/Metabox.php:162
447
  #: src/Admin/SettingsPages/DragDropBuilder/Metabox.php:223
448
  #: src/Admin/SettingsPages/GeneralSettings.php:234
449
+ #: src/Functions/GlobalFunctions.php:1226
450
+ #: src/Functions/GlobalFunctions.php:1252
451
+ #: src/Functions/GlobalFunctions.php:1274
452
  msgid "Select..."
453
  msgstr ""
454
 
519
  msgstr ""
520
 
521
  #: src/Admin/SettingsPages/DragDropBuilder/DragDropBuilder.php:1202
522
+ #: src/Functions/GlobalFunctions.php:1277
523
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:202
524
  msgid "Standard Fields"
525
  msgstr ""
529
  msgstr ""
530
 
531
  #: src/Admin/SettingsPages/DragDropBuilder/DragDropBuilder.php:1205
532
+ #: src/Classes/ExtensionManager.php:53 src/Functions/GlobalFunctions.php:1280
533
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:216
534
  msgid "Custom Fields"
535
  msgstr ""
555
  #: src/Admin/SettingsPages/EmailSettings/CustomizerTrait.php:11
556
  #: src/AdminBarDashboardAccess/include.settings-page.php:54
557
  #: src/AdminBarDashboardAccess/include.settings-page.php:109
558
+ #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:1018
559
  msgid "Save Changes"
560
  msgstr ""
561
 
703
 
704
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/Bio.php:22
705
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/UserProfile/Bio.php:22
706
+ #: src/Functions/GlobalFunctions.php:1264
707
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:211
708
  #: src/Themes/DragDrop/AbstractTheme.php:189
709
  msgid "Biography"
953
 
954
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/DisplayName.php:22
955
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/UserProfile/DisplayName.php:22
956
+ #: src/Functions/GlobalFunctions.php:1262
957
  #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:318
958
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:208
959
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:460
978
 
979
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/Email.php:22
980
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/UserProfile/Email.php:22
981
+ #: src/Functions/GlobalFunctions.php:1263
982
  #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:210
983
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:206
984
  #: src/Themes/DragDrop/AbstractTheme.php:162
985
+ #: src/Themes/DragDrop/AbstractTheme.php:221 src/Widgets/TabbedWidget.php:130
986
  msgid "Email Address"
987
  msgstr ""
988
 
989
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/FirstName.php:22
990
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/UserProfile/FirstName.php:22
991
+ #: src/Functions/GlobalFunctions.php:1259
992
  #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:350
993
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:209
994
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:461
1008
 
1009
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/LastName.php:22
1010
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/UserProfile/LastName.php:22
1011
+ #: src/Functions/GlobalFunctions.php:1260
1012
  #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:383
1013
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:210
1014
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:462
1022
  msgstr ""
1023
 
1024
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/Login/RememberLogin.php:27
1025
+ #: src/Themes/DragDrop/AbstractTheme.php:208
1026
  msgid "Remember Me"
1027
  msgstr ""
1028
 
1030
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/PasswordReset/Userlogin.php:22
1031
  #: src/ShortcodeParser/Builder/PasswordResetBuilder.php:33
1032
  #: src/Themes/DragDrop/AbstractTheme.php:202
1033
+ #: src/Themes/DragDrop/AbstractTheme.php:213 src/Widgets/TabbedWidget.php:126
1034
  msgid "Username or Email"
1035
  msgstr ""
1036
 
1041
 
1042
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/Nickname.php:22
1043
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/UserProfile/Nickname.php:22
1044
+ #: src/Functions/GlobalFunctions.php:1261
1045
  #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:286
1046
  #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:300
1047
  #: src/ShortcodeParser/MyAccount/edit-profile.tmpl.php:138
1197
 
1198
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/UserProfile/Username.php:22
1199
  #: src/Admin/SettingsPages/DragDropBuilder/Fields/Username.php:22
1200
+ #: src/Functions/GlobalFunctions.php:1258
1201
  #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:135
1202
  #: src/Themes/DragDrop/AbstractMemberDirectoryTheme.php:463
1203
  #: src/Themes/DragDrop/AbstractTheme.php:159
1204
  #: src/Themes/DragDrop/AbstractTheme.php:218
1205
  #: src/Themes/DragDrop/UserProfile/DefaultTemplate.php:105
1206
+ #: src/Widgets/TabbedWidget.php:123
1207
  msgid "Username"
1208
  msgstr ""
1209
 
1448
  msgstr ""
1449
 
1450
  #: src/Admin/SettingsPages/EmailSettings/EmailSettingsPage.php:80
1451
+ #: src/Functions/GlobalFunctions.php:724 src/RegisterActivation/Base.php:89
1452
  msgid "[%s] New User Registration"
1453
  msgstr ""
1454
 
1708
  #: src/Classes/AjaxHandler.php:53 src/NavigationMenuLinks/Backend.php:34
1709
  #: src/ShortcodeParser/Builder/GlobalShortcodes.php:235
1710
  #: src/Themes/DragDrop/AbstractBuildScratch.php:180
1711
+ #: src/Widgets/TabbedWidget.php:106
1712
  msgid "Login"
1713
  msgstr ""
1714
 
1996
  msgstr ""
1997
 
1998
  #: src/Admin/SettingsPages/GeneralSettings.php:231
1999
+ #: src/Widgets/TabbedWidget.php:212
2000
  msgid "Log out"
2001
  msgstr ""
2002
 
2165
  msgid "ID"
2166
  msgstr ""
2167
 
2168
+ #: src/Admin/SettingsPages/MailOptin.php:51
2169
+ msgid "There was an error while performing your request."
2170
+ msgstr ""
2171
+
2172
+ #: src/Admin/SettingsPages/MailOptin.php:63
2173
+ msgid "Could not install plugin. Please download and install manually."
2174
+ msgstr ""
2175
+
2176
+ #: src/Admin/SettingsPages/MailOptin.php:63
2177
+ msgid ""
2178
+ "Could not install addon. Please download from wpforms.com and install "
2179
+ "manually."
2180
+ msgstr ""
2181
+
2182
+ #: src/Admin/SettingsPages/MailOptin.php:131
2183
+ msgid "Plugin installed."
2184
+ msgstr ""
2185
+
2186
+ #: src/Admin/SettingsPages/MailOptin.php:131
2187
+ msgid "Addon installed."
2188
+ msgstr ""
2189
+
2190
+ #: src/Admin/SettingsPages/MailOptin.php:141
2191
+ msgid "Plugin installed & activated."
2192
+ msgstr ""
2193
+
2194
+ #: src/Admin/SettingsPages/MailOptin.php:141
2195
+ msgid "Addon installed & activated."
2196
+ msgstr ""
2197
+
2198
+ #: src/Admin/SettingsPages/MailOptin.php:157
2199
+ msgid "Plugin activation is disabled for you on this site."
2200
+ msgstr ""
2201
+
2202
+ #: src/Admin/SettingsPages/MailOptin.php:166
2203
+ msgid "Plugin activated."
2204
+ msgstr ""
2205
+
2206
+ #: src/Admin/SettingsPages/MailOptin.php:170
2207
+ msgid "Could not activate plugin. Please activate from the Plugins page."
2208
+ msgstr ""
2209
+
2210
+ #: src/Admin/SettingsPages/MailOptin.php:178
2211
+ msgid "Popups & Optins"
2212
+ msgstr ""
2213
+
2214
+ #. translators: %s - Lite plugin download URL.
2215
+ #: src/Admin/SettingsPages/MailOptin.php:209
2216
+ msgid ""
2217
+ "Could not install plugin. Please <a href=\"%s\">download</a> and install "
2218
+ "manually."
2219
+ msgstr ""
2220
+
2221
+ #. translators: %s - Lite plugin download URL.
2222
+ #: src/Admin/SettingsPages/MailOptin.php:221
2223
+ msgid ""
2224
+ "Could not activate plugin. Please activate from the <a href=\"%s\">Plugins "
2225
+ "page</a>."
2226
+ msgstr ""
2227
+
2228
+ #: src/Admin/SettingsPages/MailOptin.php:232
2229
+ msgid "Installing..."
2230
+ msgstr ""
2231
+
2232
+ #: src/Admin/SettingsPages/MailOptin.php:233
2233
+ msgid "Activating..."
2234
+ msgstr ""
2235
+
2236
+ #: src/Admin/SettingsPages/MailOptin.php:234
2237
+ #: src/Admin/SettingsPages/MailOptin.php:596
2238
+ msgid "MailOptin Installed & Activated"
2239
+ msgstr ""
2240
+
2241
+ #: src/Admin/SettingsPages/MailOptin.php:235
2242
+ msgid "Install Now"
2243
+ msgstr ""
2244
+
2245
+ #: src/Admin/SettingsPages/MailOptin.php:236
2246
+ msgid "Activate Now"
2247
+ msgstr ""
2248
+
2249
+ #: src/Admin/SettingsPages/MailOptin.php:237
2250
+ msgid "Download Now"
2251
+ msgstr ""
2252
+
2253
+ #: src/Admin/SettingsPages/MailOptin.php:238
2254
+ msgid "Go to Plugins page"
2255
+ msgstr ""
2256
+
2257
+ #: src/Admin/SettingsPages/MailOptin.php:243
2258
+ msgid "Go to MailOptin Settings"
2259
+ msgstr ""
2260
+
2261
+ #: src/Admin/SettingsPages/MailOptin.php:472
2262
+ msgid "ProfilePress ♥ MailOptin"
2263
+ msgstr ""
2264
+
2265
+ #: src/Admin/SettingsPages/MailOptin.php:473
2266
+ msgid "#1 Popup, Optin Forms & Marketing Automation Plugin"
2267
+ msgstr ""
2268
+
2269
+ #: src/Admin/SettingsPages/MailOptin.php:474
2270
+ msgid ""
2271
+ "MailOptin lets you create popups and newsletter opt-in forms that integrates "
2272
+ "with Mailchimp, Aweber, Constant Contact, Active Campaign & more."
2273
+ msgstr ""
2274
+
2275
+ #: src/Admin/SettingsPages/MailOptin.php:497
2276
+ msgid "MailOptin screenshot"
2277
+ msgstr ""
2278
+
2279
+ #: src/Admin/SettingsPages/MailOptin.php:498
2280
+ msgid ""
2281
+ "Automatically notify your subscribers every time you publish a new post."
2282
+ msgstr ""
2283
+
2284
+ #: src/Admin/SettingsPages/MailOptin.php:499
2285
+ msgid ""
2286
+ "Keep your subscribers engaged with daily, weekly and monthly email digest of "
2287
+ "published posts."
2288
+ msgstr ""
2289
+
2290
+ #: src/Admin/SettingsPages/MailOptin.php:500
2291
+ msgid ""
2292
+ "Different types of opt-in form including Popup, notification bar, inline, "
2293
+ "scroll box, slide ins, sidebar forms."
2294
+ msgstr ""
2295
+
2296
+ #: src/Admin/SettingsPages/MailOptin.php:501
2297
+ msgid ""
2298
+ "Page-level targeting and optin triggers to build hyper segmented email list."
2299
+ msgstr ""
2300
+
2301
+ #: src/Admin/SettingsPages/MailOptin.php:502
2302
+ msgid ""
2303
+ "Analytics with actionable reporting & insights to improve your lead-"
2304
+ "generation strategy."
2305
+ msgstr ""
2306
+
2307
+ #: src/Admin/SettingsPages/MailOptin.php:530
2308
+ msgid "Step 1"
2309
+ msgstr ""
2310
+
2311
+ #: src/Admin/SettingsPages/MailOptin.php:531
2312
+ msgid "Install and Activate MailOptin"
2313
+ msgstr ""
2314
+
2315
+ #: src/Admin/SettingsPages/MailOptin.php:532
2316
+ msgid "Install MailOptin from the WordPress.org plugin repository."
2317
+ msgstr ""
2318
+
2319
+ #: src/Admin/SettingsPages/MailOptin.php:565
2320
+ msgid "Step 2"
2321
+ msgstr ""
2322
+
2323
+ #: src/Admin/SettingsPages/MailOptin.php:566
2324
+ msgid "Set Up MailOptin"
2325
+ msgstr ""
2326
+
2327
+ #: src/Admin/SettingsPages/MailOptin.php:567
2328
+ msgid "Configure and create your first optin form."
2329
+ msgstr ""
2330
+
2331
+ #: src/Admin/SettingsPages/MailOptin.php:588
2332
+ msgid "Install MailOptin"
2333
+ msgstr ""
2334
+
2335
+ #: src/Admin/SettingsPages/MailOptin.php:596
2336
+ msgid "Activate MailOptin"
2337
+ msgstr ""
2338
+
2339
+ #: src/Admin/SettingsPages/MailOptin.php:614
2340
+ msgid "Start Setup"
2341
+ msgstr ""
2342
+
2343
+ #: src/Admin/SettingsPages/MailOptin.php:620
2344
+ msgid "Go to MailOptin settings"
2345
+ msgstr ""
2346
+
2347
+ #: src/Admin/SettingsPages/MailOptin.php:641
2348
+ msgid "You do not have permission."
2349
+ msgstr ""
2350
+
2351
+ #: src/Admin/SettingsPages/MailOptin.php:651
2352
+ msgid "Plugin unavailable."
2353
+ msgstr ""
2354
+
2355
  #: src/Admin/SettingsPages/MemberDirectories.php:35
2356
  #: src/Admin/SettingsPages/MemberDirectories.php:53
2357
  #: src/Admin/SettingsPages/MemberDirectories.php:85
2717
  msgid "Uploaded file is greater than the allowed sized of %s"
2718
  msgstr ""
2719
 
2720
+ #: src/Classes/FileUploader.php:96
2721
  msgid "appears to be of an invalid file format. Please try again."
2722
  msgstr ""
2723
 
2724
+ #: src/Classes/FileUploader.php:127
2725
  msgid "Unable to save %s, please try again."
2726
  msgstr ""
2727
 
2728
+ #: src/Classes/FileUploader.php:154
2729
  msgid "The uploaded file exceeds the upload_max_filesize directive in php.ini"
2730
  msgstr ""
2731
 
2732
+ #: src/Classes/FileUploader.php:157
2733
  msgid ""
2734
  "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in "
2735
  "the HTML form"
2736
  msgstr ""
2737
 
2738
+ #: src/Classes/FileUploader.php:160
2739
  msgid "The uploaded file was only partially uploaded"
2740
  msgstr ""
2741
 
2742
+ #: src/Classes/FileUploader.php:163
2743
  msgid "No file was uploaded"
2744
  msgstr ""
2745
 
2746
+ #: src/Classes/FileUploader.php:166
2747
  msgid "Missing a temporary folder"
2748
  msgstr ""
2749
 
2750
+ #: src/Classes/FileUploader.php:169
2751
  msgid "Failed to write file to disk"
2752
  msgstr ""
2753
 
2754
+ #: src/Classes/FileUploader.php:172
2755
  msgid "File upload stopped by extension"
2756
  msgstr ""
2757
 
2760
  msgstr ""
2761
 
2762
  #: src/Classes/FormRepository.php:166 src/Themes/DragDrop/AbstractTheme.php:124
2763
+ #: src/Widgets/TabbedWidget.php:86
2764
  msgid "Processing"
2765
  msgstr ""
2766
 
2785
  msgstr ""
2786
 
2787
  #: src/Classes/ImageUploader.php:83
2788
+ msgid "Uploaded file is not an image."
2789
  msgstr ""
2790
 
2791
  #: src/Classes/ImageUploader.php:119
2841
  msgid "Log in"
2842
  msgstr ""
2843
 
2844
+ #: src/Classes/RegistrationAuth.php:211
2845
  msgid "%s field is required"
2846
  msgstr ""
2847
 
2848
+ #: src/Classes/RegistrationAuth.php:220
2849
  msgid ""
2850
  "<strong>ERROR</strong>: This username is invalid because it uses illegal "
2851
  "characters. Please enter a valid username."
2852
  msgstr ""
2853
 
2854
+ #: src/Classes/RegistrationAuth.php:224
2855
  msgid "Email address is not valid"
2856
  msgstr ""
2857
 
2858
+ #: src/Classes/RegistrationAuth.php:228
2859
  msgid "Passwords do not match"
2860
  msgstr ""
2861
 
2862
+ #: src/Classes/RegistrationAuth.php:232
2863
  msgid "Email addresses do not match"
2864
  msgstr ""
2865
 
2866
+ #: src/Classes/RegistrationAuth.php:236
2867
  msgid "Password is not strong"
2868
  msgstr ""
2869
 
2870
+ #: src/Classes/RegistrationAuth.php:402
2871
  #: src/Themes/DragDrop/AbstractTheme.php:110
2872
  msgid "Registration successful."
2873
  msgstr ""
3171
  msgstr ""
3172
 
3173
  #. translators: %s: User login.
3174
+ #: src/Functions/GlobalFunctions.php:794
3175
  msgid "Username: %s"
3176
  msgstr ""
3177
 
3178
+ #: src/Functions/GlobalFunctions.php:795
3179
  msgid "To set your password, visit the following address:"
3180
  msgstr ""
3181
 
3182
  #. translators: Login details notification email subject. %s: Site title.
3183
+ #: src/Functions/GlobalFunctions.php:803
3184
  msgid "[%s] Login Details"
3185
  msgstr ""
3186
 
3187
+ #: src/Functions/GlobalFunctions.php:1089
3188
  msgid ""
3189
  "It must be unique for each field, not a reserve text, in lowercase letters "
3190
  "only with an underscore ( _ ) separating words e.g job_title"
3191
  msgstr ""
3192
 
3193
+ #: src/Functions/GlobalFunctions.php:1210
3194
  msgid "%s (WooCommerce Billing Address)"
3195
  msgstr ""
3196
 
3197
+ #: src/Functions/GlobalFunctions.php:1214
3198
  msgid "%s (WooCommerce Shipping Address)"
3199
  msgstr ""
3200
 
3201
+ #: src/Functions/GlobalFunctions.php:1256
3202
  msgid "First and Last Names"
3203
  msgstr ""
3204
 
3205
+ #: src/Functions/GlobalFunctions.php:1257
3206
  msgid "Last and First Names"
3207
  msgstr ""
3208
 
3209
+ #: src/Functions/GlobalFunctions.php:1265
3210
  msgid "Registration Date"
3211
  msgstr ""
3212
 
3213
+ #: src/Functions/GlobalFunctions.php:1382
3214
+ msgid "There was an problem while verifying your file."
3215
+ msgstr ""
3216
+
3217
+ #: src/Functions/GlobalFunctions.php:1387
3218
+ msgid "Sorry, this file extension is not permitted for security reasons."
3219
+ msgstr ""
3220
+
3221
+ #: src/Functions/GlobalFunctions.php:1391
3222
+ msgid "Sorry, this file type is not permitted for security reasons."
3223
+ msgstr ""
3224
+
3225
+ #: src/Functions/GlobalFunctions.php:1395
3226
+ #: src/Functions/GlobalFunctions.php:1399
3227
+ msgid "Error: The file you uploaded is not accepted on our website."
3228
+ msgstr ""
3229
+
3230
  #: src/Functions/custom-settings-api.php:855
3231
  msgid "Code"
3232
  msgstr ""
4228
  msgstr ""
4229
 
4230
  #: src/NavigationMenuLinks/Backend.php:29 src/RegisterActivation/Base.php:155
4231
+ #: src/ShortcodeParser/Builder/LoginFormBuilder.php:166
4232
+ #: src/Themes/DragDrop/AbstractTheme.php:104 src/Widgets/TabbedWidget.php:87
4233
  msgid "Log In"
4234
  msgstr ""
4235
 
4241
  msgstr ""
4242
 
4243
  #: src/NavigationMenuLinks/Backend.php:31 src/RegisterActivation/Base.php:159
4244
+ #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:1015
4245
  #: src/ShortcodeParser/Builder/GlobalShortcodes.php:172
4246
+ #: src/Widgets/TabbedWidget.php:88
4247
  msgid "Sign Up"
4248
  msgstr ""
4249
 
4424
  msgid "custom field not defined"
4425
  msgstr ""
4426
 
4427
+ #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:1085
4428
  msgid "Delete Avatar"
4429
  msgstr ""
4430
 
4431
+ #: src/ShortcodeParser/Builder/FieldsShortcodeCallback.php:1121
4432
  msgid "Delete Cover Image"
4433
  msgstr ""
4434
 
4454
 
4455
  #: src/ShortcodeParser/Builder/PasswordResetBuilder.php:103
4456
  #: src/ShortcodeParser/Builder/PasswordResetBuilder.php:335
4457
+ #: src/Widgets/TabbedWidget.php:89
4458
  msgid "Get New Password"
4459
  msgstr ""
4460
 
4474
  msgid "Authentication failed. Please try again"
4475
  msgstr ""
4476
 
4477
+ #: src/ShortcodeParser/FrontendProfileTag.php:87
4478
  msgid ""
4479
  "This content is available to members only. Please <a href=\"%1$s\">login</a> "
4480
  "or <a href=\"%2$s\">register</a> to view this area."
4481
  msgstr ""
4482
 
4483
+ #: src/ShortcodeParser/FrontendProfileTag.php:94
4484
  msgid "You are not authorized to access this area."
4485
  msgstr ""
4486
 
4487
+ #: src/ShortcodeParser/FrontendProfileTag.php:132
4488
  msgid ""
4489
  "Form class not found. Please check if this user profile actually exist in "
4490
  "ProfilePress."
4491
  msgstr ""
4492
 
4493
+ #: src/ShortcodeParser/FrontendProfileTag.php:197
4494
  #: src/Themes/DragDrop/UserProfile/Dixon.php:121
4495
  msgid "Profile"
4496
  msgstr ""
4685
  msgstr ""
4686
 
4687
  #: src/Themes/DragDrop/AbstractBuildScratch.php:179
4688
+ #: src/Themes/DragDrop/AbstractTheme.php:109 src/Widgets/TabbedWidget.php:109
4689
  msgid "Register"
4690
  msgstr ""
4691
 
5211
  msgstr ""
5212
 
5213
  #: src/Themes/DragDrop/UserProfile/DefaultTemplate.php:378
5214
+ #: src/Widgets/TabbedWidget.php:209
5215
  msgid "Edit your profile"
5216
  msgstr ""
5217
 
5299
  msgid "A tabbed login, registration and lost password widget"
5300
  msgstr ""
5301
 
5302
+ #: src/Widgets/TabbedWidget.php:112
5303
  msgid "Forgot?"
5304
  msgstr ""
5305
 
5306
+ #: src/Widgets/TabbedWidget.php:206 src/Widgets/UserPanel.php:50
5307
  msgid "Welcome %s"
5308
  msgstr ""
5309
 
5310
+ #: src/Widgets/TabbedWidget.php:226
5311
  msgid "Login / Sign up"
5312
  msgstr ""
5313
 
5314
+ #: src/Widgets/TabbedWidget.php:232
5315
  msgid "Have an account?"
5316
  msgstr ""
5317
 
5318
+ #: src/Widgets/TabbedWidget.php:238
5319
  msgid "Don't have an account?"
5320
  msgstr ""
5321
 
5322
+ #: src/Widgets/TabbedWidget.php:244
5323
  msgid "Forgot Password?"
5324
  msgstr ""
5325
 
5326
+ #: src/Widgets/TabbedWidget.php:467
5327
  msgid "Login text:"
5328
  msgstr ""
5329
 
5330
+ #: src/Widgets/TabbedWidget.php:472
5331
  msgid "Registration text:"
5332
  msgstr ""
5333
 
5334
+ #: src/Widgets/TabbedWidget.php:477
5335
  msgid "Lost-password text:"
5336
  msgstr ""
5337
 
5338
+ #: src/Widgets/TabbedWidget.php:483
5339
  msgid "Automatically login user after successful registration"
5340
  msgstr ""
5341
 
5342
+ #: src/Widgets/TabbedWidget.php:489
5343
  msgid "Widget CSS:"
5344
  msgstr ""
5345
 
5346
+ #: src/Widgets/TabbedWidgetDependency.php:25
5347
  msgid "Unable to log in. Please try again"
5348
  msgstr ""
5349
 
5350
+ #: src/Widgets/TabbedWidgetDependency.php:43
5351
  msgid "Check your email for further instructions."
5352
  msgstr ""
5353
 
5354
+ #: src/Widgets/TabbedWidgetDependency.php:50
5355
  msgid "Unexpected error, please try again"
5356
  msgstr ""
5357
 
5358
+ #: src/Widgets/TabbedWidgetDependency.php:105
5359
  msgid "Required form field is missing"
5360
  msgstr ""
5361
 
5393
  msgid "ProfilePress"
5394
  msgstr ""
5395
 
5396
+ #. #-#-#-#-# wp-user-avatar.pot (ProfilePress 3.1.4) #-#-#-#-#
5397
  #. Plugin URI of the plugin/theme
5398
+ #. #-#-#-#-# wp-user-avatar.pot (ProfilePress 3.1.4) #-#-#-#-#
5399
  #. Author URI of the plugin/theme
5400
  msgid "https://profilepress.net"
5401
  msgstr ""
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: user registration, user profile, registration form, membership, login form
5
  Requires at least: 4.7
6
  Requires PHP: 5.6
7
  Tested up to: 5.7
8
- Stable tag: 3.1.3
9
  License: GPLv2 or later
10
 
11
  Modern membership plugin for user registration, login form, user profile, member directories & content restriction.
@@ -109,7 +109,6 @@ No. You can create and manage your forms, user profiles and member directories w
109
  3. User Registration Form
110
  4. Custom Login Form
111
  5. Drag and Drop Form builder
112
- 6. Advanced Shortcode Builder
113
  7. Email Customizer and Settings
114
  8. My Account Page
115
  9. Content Protection
@@ -119,6 +118,14 @@ No. You can create and manage your forms, user profiles and member directories w
119
 
120
  == Changelog ==
121
 
 
 
 
 
 
 
 
 
122
  = 3.1.3 =
123
  * Fixed edge cases where post content was overridden.
124
  * Fixed bug where buddypress avatar override wasn't working.
@@ -138,12 +145,4 @@ No. You can create and manage your forms, user profiles and member directories w
138
  * Fixed fatar error: Cannot use ProfilePress\Core\Base as Base because the name is already in use.
139
  * Fixed issue where myaccount js was shown on all pages.
140
 
141
- = 3.0 (The rebrand to ProfilePress) =
142
- * Added custom login forms.
143
- * Added frontend user registration form.
144
- * Added User Profiles.
145
- * Added Member Directories.
146
- * Added Content Protection.
147
- * Added Admin bar and dashboard access restriction.
148
-
149
  See the [changelog file](https://plugins.svn.wordpress.org/wp-user-avatar/trunk/changelog.txt) for full change log information.
5
  Requires at least: 4.7
6
  Requires PHP: 5.6
7
  Tested up to: 5.7
8
+ Stable tag: 3.1.4
9
  License: GPLv2 or later
10
 
11
  Modern membership plugin for user registration, login form, user profile, member directories & content restriction.
109
  3. User Registration Form
110
  4. Custom Login Form
111
  5. Drag and Drop Form builder
 
112
  7. Email Customizer and Settings
113
  8. My Account Page
114
  9. Content Protection
118
 
119
  == Changelog ==
120
 
121
+ = 3.1.4 =
122
+ * Security fix: Ensures only valid custom user meta are updated.
123
+ * Security fix: validate files and images correctly before they are uploaded.
124
+ * Fix: Avatar upload now respects resize settings when using frontend forms.
125
+ * Fix: Added link to uploaded file when file custom field is displayed.
126
+ * Enhancement: when a user profile doesn't exist, redirect to homepage.
127
+ * Enhancement: Remember login by default.
128
+
129
  = 3.1.3 =
130
  * Fixed edge cases where post content was overridden.
131
  * Fixed bug where buddypress avatar override wasn't working.
145
  * Fixed fatar error: Cannot use ProfilePress\Core\Base as Base because the name is already in use.
146
  * Fixed issue where myaccount js was shown on all pages.
147
 
 
 
 
 
 
 
 
 
148
  See the [changelog file](https://plugins.svn.wordpress.org/wp-user-avatar/trunk/changelog.txt) for full change log information.
src/Admin/SettingsPages/ExtensionsSettingsPage.php CHANGED
@@ -10,7 +10,7 @@ class ExtensionsSettingsPage extends AbstractSettingsPage
10
  {
11
  public function __construct()
12
  {
13
- add_filter('ppress_admin_hooks', function () {
14
  add_action('admin_menu', array($this, 'register_settings_page'));
15
  });
16
 
10
  {
11
  public function __construct()
12
  {
13
+ add_action('ppress_admin_hooks', function () {
14
  add_action('admin_menu', array($this, 'register_settings_page'));
15
  });
16
 
src/Admin/SettingsPages/MailOptin.php ADDED
@@ -0,0 +1,704 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace ProfilePress\Core\Admin\SettingsPages;
4
+
5
+ use MailOptin\Core\Repositories\EmailCampaignRepository;
6
+ use MailOptin\Core\Repositories\OptinCampaignsRepository;
7
+ use ProfilePress\Core\Classes\Installer\PluginSilentUpgrader;
8
+ use ProfilePress\Core\Classes\Installer\PPress_Install_Skin;
9
+
10
+ class MailOptin
11
+ {
12
+ const SLUG = 'pp-mailoptin';
13
+
14
+ private $config = array(
15
+ 'lite_plugin' => 'mailoptin/mailoptin.php',
16
+ 'lite_download_url' => 'https://downloads.wordpress.org/plugin/mailoptin.latest-stable.zip',
17
+ 'mailoptin_settings' => 'admin.php?page=mailoptin-optin-campaigns',
18
+ );
19
+
20
+ private $output_data = array();
21
+
22
+ public function __construct()
23
+ {
24
+ if ( ! $this->is_configured()) {
25
+ add_action('ppress_admin_hooks', function () {
26
+ add_action('admin_menu', array($this, 'register_settings_page'));
27
+ });
28
+ }
29
+
30
+ add_action('wp_ajax_ppress_activate_plugin', [$this, 'ppress_activate_plugin']);
31
+ add_action('wp_ajax_ppress_install_plugin', [$this, 'ppress_install_plugin']);
32
+
33
+ if (wp_doing_ajax()) {
34
+ add_action('wp_ajax_ppress_mailoptin_page_check_plugin_status', array($this, 'ajax_check_plugin_status'));
35
+ }
36
+
37
+ // Check what page we are on.
38
+ $page = isset($_GET['page']) ? \sanitize_key(\wp_unslash($_GET['page'])) : '';
39
+
40
+ if (self::SLUG !== $page) return;
41
+
42
+ add_action('admin_init', array($this, 'redirect_to_mailoptin_settings'));
43
+ add_action('admin_enqueue_scripts', array($this, 'enqueue_assets'));
44
+ }
45
+
46
+ public function ppress_install_plugin()
47
+ {
48
+ // Run a security check.
49
+ check_ajax_referer('ppress-admin-nonce', 'nonce');
50
+
51
+ $generic_error = esc_html__('There was an error while performing your request.', 'wp-user-avatar');
52
+ $type = ! empty($_POST['type']) ? sanitize_key($_POST['type']) : 'plugin';
53
+
54
+ if ( ! current_user_can('install_plugins')) {
55
+ wp_send_json_error($generic_error);
56
+ }
57
+
58
+ // Determine whether file modifications are allowed.
59
+ if ( ! wp_is_file_mod_allowed('ppress_can_install')) {
60
+ wp_send_json_error($generic_error);
61
+ }
62
+
63
+ $error = $type === 'plugin' ? esc_html__('Could not install plugin. Please download and install manually.', 'wp-user-avatar') : esc_html__('Could not install addon. Please download from wpforms.com and install manually.', 'wp-user-avatar');
64
+
65
+ if (empty($_POST['plugin'])) {
66
+ wp_send_json_error($error);
67
+ }
68
+
69
+ // Set the current screen to avoid undefined notices.
70
+ set_current_screen('profilepress_page_pp-mailoptin');
71
+
72
+ // Prepare variables.
73
+ $url = esc_url_raw(
74
+ add_query_arg(
75
+ [
76
+ 'page' => 'pp-extensions',
77
+ ],
78
+ admin_url('admin.php')
79
+ )
80
+ );
81
+
82
+ ob_start();
83
+ $creds = request_filesystem_credentials($url, '', false, false, null);
84
+
85
+ // Hide the filesystem credentials form.
86
+ ob_end_clean();
87
+
88
+ // Check for file system permissions.
89
+ if ($creds === false) {
90
+ wp_send_json_error($error);
91
+ }
92
+
93
+ if ( ! WP_Filesystem($creds)) {
94
+ wp_send_json_error($error);
95
+ }
96
+
97
+ /*
98
+ * We do not need any extra credentials if we have gotten this far, so let's install the plugin.
99
+ */
100
+
101
+ // Do not allow WordPress to search/download translations, as this will break JS output.
102
+ remove_action('upgrader_process_complete', ['Language_Pack_Upgrader', 'async_upgrade'], 20);
103
+
104
+ // Create the plugin upgrader with our custom skin.
105
+ $installer = new PluginSilentUpgrader(new PPress_Install_Skin());
106
+
107
+ // Error check.
108
+ if ( ! method_exists($installer, 'install') || empty($_POST['plugin'])) {
109
+ wp_send_json_error($error);
110
+ }
111
+
112
+ $installer->install($_POST['plugin']); // phpcs:ignore
113
+
114
+ // Flush the cache and return the newly installed plugin basename.
115
+ wp_cache_flush();
116
+
117
+ $plugin_basename = $installer->plugin_info();
118
+
119
+ if (empty($plugin_basename)) {
120
+ wp_send_json_error($error);
121
+ }
122
+
123
+ $result = [
124
+ 'msg' => $generic_error,
125
+ 'is_activated' => false,
126
+ 'basename' => $plugin_basename,
127
+ ];
128
+
129
+ // Check for permissions.
130
+ if ( ! current_user_can('activate_plugins')) {
131
+ $result['msg'] = $type === 'plugin' ? esc_html__('Plugin installed.', 'wp-user-avatar') : esc_html__('Addon installed.', 'wp-user-avatar');
132
+
133
+ wp_send_json_success($result);
134
+ }
135
+
136
+ // Activate the plugin silently.
137
+ $activated = activate_plugin($plugin_basename);
138
+
139
+ if ( ! is_wp_error($activated)) {
140
+ $result['is_activated'] = true;
141
+ $result['msg'] = $type === 'plugin' ? esc_html__('Plugin installed & activated.', 'wp-user-avatar') : esc_html__('Addon installed & activated.', 'wp-user-avatar');
142
+
143
+ wp_send_json_success($result);
144
+ }
145
+
146
+ // Fallback error just in case.
147
+ wp_send_json_error($result);
148
+ }
149
+
150
+ public function ppress_activate_plugin()
151
+ {
152
+ // Run a security check.
153
+ check_ajax_referer('ppress-admin-nonce', 'nonce');
154
+
155
+ // Check for permissions.
156
+ if ( ! current_user_can('activate_plugins')) {
157
+ wp_send_json_error(esc_html__('Plugin activation is disabled for you on this site.', 'wp-user-avatar'));
158
+ }
159
+
160
+ if (isset($_POST['plugin'])) {
161
+
162
+ $plugin = sanitize_text_field(wp_unslash($_POST['plugin']));
163
+ $activate = activate_plugins($plugin);
164
+
165
+ if ( ! is_wp_error($activate)) {
166
+ wp_send_json_success(esc_html__('Plugin activated.', 'wp-user-avatar'));
167
+ }
168
+ }
169
+
170
+ wp_send_json_error(esc_html__('Could not activate plugin. Please activate from the Plugins page.', 'wp-user-avatar'));
171
+ }
172
+
173
+ public function register_settings_page()
174
+ {
175
+ add_submenu_page(
176
+ PPRESS_SETTINGS_SLUG,
177
+ 'Popups & Optin Forms',
178
+ esc_html__('Popups & Optins', 'wp-user-avatar'),
179
+ 'manage_options',
180
+ self::SLUG,
181
+ array($this, 'output')
182
+ );
183
+ }
184
+
185
+ public function enqueue_assets()
186
+ {
187
+ wp_enqueue_script(
188
+ 'ppress-admin-page-mailoptin',
189
+ PPRESS_ASSETS_URL . "/js/mailoptin.js",
190
+ array('jquery'),
191
+ PPRESS_VERSION_NUMBER,
192
+ true
193
+ );
194
+
195
+ \wp_localize_script(
196
+ 'ppress-admin-page-mailoptin',
197
+ 'ppress_pluginlanding',
198
+ $this->get_js_strings()
199
+ );
200
+ }
201
+
202
+ /**
203
+ * JS Strings.
204
+ */
205
+ protected function get_js_strings()
206
+ {
207
+ $error_could_not_install = sprintf(
208
+ wp_kses( /* translators: %s - Lite plugin download URL. */
209
+ __('Could not install plugin. Please <a href="%s">download</a> and install manually.', 'wp-user-avatar'),
210
+ array(
211
+ 'a' => array(
212
+ 'href' => true,
213
+ ),
214
+ )
215
+ ),
216
+ esc_url($this->config['lite_download_url'])
217
+ );
218
+
219
+ $error_could_not_activate = sprintf(
220
+ wp_kses( /* translators: %s - Lite plugin download URL. */
221
+ __('Could not activate plugin. Please activate from the <a href="%s">Plugins page</a>.', 'wp-user-avatar'),
222
+ array(
223
+ 'a' => array(
224
+ 'href' => true,
225
+ ),
226
+ )
227
+ ),
228
+ esc_url(admin_url('plugins.php'))
229
+ );
230
+
231
+ return array(
232
+ 'installing' => esc_html__('Installing...', 'wp-user-avatar'),
233
+ 'activating' => esc_html__('Activating...', 'wp-user-avatar'),
234
+ 'activated' => esc_html__('MailOptin Installed & Activated', 'wp-user-avatar'),
235
+ 'install_now' => esc_html__('Install Now', 'wp-user-avatar'),
236
+ 'activate_now' => esc_html__('Activate Now', 'wp-user-avatar'),
237
+ 'download_now' => esc_html__('Download Now', 'wp-user-avatar'),
238
+ 'plugins_page' => esc_html__('Go to Plugins page', 'wp-user-avatar'),
239
+ 'error_could_not_install' => $error_could_not_install,
240
+ 'error_could_not_activate' => $error_could_not_activate,
241
+ 'manual_install_url' => $this->config['lite_download_url'],
242
+ 'manual_activate_url' => admin_url('plugins.php'),
243
+ 'mailoptin_settings_button' => esc_html__('Go to MailOptin Settings', 'wp-user-avatar'),
244
+ );
245
+ }
246
+
247
+ /**
248
+ * Generate and output page HTML.
249
+ */
250
+ public function output()
251
+ {
252
+ ?>
253
+ <style>
254
+ #ppress-admin-mailoptin {
255
+ width: 700px;
256
+ margin: 0 auto;
257
+ }
258
+
259
+ #ppress-admin-mailoptin .notice {
260
+ display: none
261
+ }
262
+
263
+ #ppress-admin-mailoptin *, #ppress-admin-mailoptin *::before, #ppress-admin-mailoptin *::after {
264
+ -webkit-box-sizing: border-box;
265
+ -moz-box-sizing: border-box;
266
+ box-sizing: border-box;
267
+ }
268
+
269
+ #ppress-admin-mailoptin section {
270
+ margin: 50px 0;
271
+ text-align: left;
272
+ clear: both;
273
+ }
274
+
275
+ #ppress-admin-mailoptin .top {
276
+ text-align: center;
277
+ }
278
+
279
+ #ppress-admin-mailoptin .top img {
280
+ margin-bottom: 38px;
281
+ }
282
+
283
+ #ppress-admin-mailoptin .top h1 {
284
+ font-size: 26px;
285
+ font-weight: 600;
286
+ margin-bottom: 0;
287
+ padding: 0;
288
+ }
289
+
290
+ #ppress-admin-mailoptin .top p {
291
+ font-size: 17px;
292
+ color: #777777;
293
+ margin-top: .5em;
294
+ }
295
+
296
+ #ppress-admin-mailoptin p {
297
+ font-size: 15px;
298
+ }
299
+
300
+ #ppress-admin-mailoptin .cont {
301
+ display: inline-block;
302
+ position: relative;
303
+ width: 100%;
304
+ padding: 5px;
305
+ background-color: #ffffff;
306
+ -webkit-box-shadow: 0px 2px 5px 0px rgb(0 0 0 / 5%);
307
+ -moz-box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.05);
308
+ box-shadow: 0px 2px 5px 0px rgb(0 0 0 / 5%);
309
+ border-radius: 3px;
310
+ box-sizing: border-box;
311
+ }
312
+
313
+ #ppress-admin-mailoptin .screenshot > * {
314
+ vertical-align: middle;
315
+ }
316
+
317
+ #ppress-admin-mailoptin .screenshot .cont img {
318
+ max-width: 100%;
319
+ display: block;
320
+ }
321
+
322
+ #ppress-admin-mailoptin .screenshot ul {
323
+ display: inline-block;
324
+ margin: 0 0 0 30px;
325
+ list-style-type: none;
326
+ max-width: 100%;
327
+ }
328
+
329
+ #ppress-admin-mailoptin .screenshot li {
330
+ margin: 16px 0;
331
+ padding: 0 0 0 24px;
332
+ font-size: 15px;
333
+ color: #777777;
334
+ }
335
+
336
+ #ppress-admin-mailoptin .step {
337
+ background-color: #F9F9F9;
338
+ -webkit-box-shadow: 0px 2px 5px 0px rgb(0 0 0 / 5%);
339
+ -moz-box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.05);
340
+ box-shadow: 0px 2px 5px 0px rgb(0 0 0 / 5%);
341
+ border: 1px solid #E5E5E5;
342
+ margin: 0 0 25px 0;
343
+ }
344
+
345
+ #ppress-admin-mailoptin .step .num {
346
+ display: inline-block;
347
+ position: relative;
348
+ width: 100px;
349
+ height: 50px;
350
+ text-align: center;
351
+ }
352
+
353
+ .ppress-admin-plugin-landing .loader {
354
+ margin: 0 auto;
355
+ position: relative;
356
+ text-indent: -9999em;
357
+ border-top: 4px solid #969696;
358
+ border-right: 4px solid #969696;
359
+ border-bottom: 4px solid #969696;
360
+ border-left: 4px solid #404040;
361
+ -webkit-transform: translateZ(0);
362
+ -ms-transform: translateZ(0);
363
+ transform: translateZ(0);
364
+ -webkit-animation: load8 1.1s infinite linear;
365
+ animation: load8 1.1s infinite linear;
366
+ background-color: transparent;
367
+ }
368
+
369
+ .ppress-admin-plugin-landing .loader, .ppress-admin-plugin-landing .loader:after {
370
+ display: block;
371
+ border-radius: 50%;
372
+ width: 50px;
373
+ height: 50px
374
+ }
375
+
376
+ @-webkit-keyframes load8 {
377
+ 0% {
378
+ -webkit-transform: rotate(0deg);
379
+ transform: rotate(0deg)
380
+ }
381
+
382
+ 100% {
383
+ -webkit-transform: rotate(360deg);
384
+ transform: rotate(360deg)
385
+ }
386
+ }
387
+
388
+ @keyframes load8 {
389
+ 0% {
390
+ -webkit-transform: rotate(0deg);
391
+ transform: rotate(0deg)
392
+ }
393
+
394
+ 100% {
395
+ -webkit-transform: rotate(360deg);
396
+ transform: rotate(360deg)
397
+ }
398
+ }
399
+
400
+ #ppress-admin-mailoptin .step .loader {
401
+ margin-top: -54px;
402
+ transition: all .3s;
403
+ opacity: 1;
404
+ }
405
+
406
+ #ppress-admin-mailoptin .step .hidden {
407
+ opacity: 0;
408
+ transition: all .3s;
409
+ }
410
+
411
+ #ppress-admin-mailoptin .step div {
412
+ display: inline-block;
413
+ width: calc(100% - 104px);
414
+ background-color: #ffffff;
415
+ padding: 30px;
416
+ border-left: 1px solid #eeeeee;
417
+ }
418
+
419
+ #ppress-admin-mailoptin .step h2 {
420
+ font-size: 24px;
421
+ line-height: 22px;
422
+ margin-top: 0;
423
+ margin-bottom: 15px;
424
+ }
425
+
426
+ #ppress-admin-mailoptin .step p {
427
+ font-size: 16px;
428
+ color: #777777;
429
+ }
430
+
431
+
432
+ #ppress-admin-mailoptin .step .button {
433
+ font-weight: 500;
434
+ box-shadow: none;
435
+ padding: 12px;
436
+ min-width: 200px;
437
+ height: auto;
438
+ line-height: 13px;
439
+ text-align: center;
440
+ font-size: 15px;
441
+ transition: all .3s;
442
+ }
443
+
444
+ #ppress-admin-mailoptin .grey {
445
+ opacity: 0.5;
446
+ }
447
+ </style>
448
+ <?php
449
+ echo '<div id="ppress-admin-mailoptin" class="wrap ppress-admin-wrap ppress-admin-plugin-landing">';
450
+
451
+ $this->output_section_heading();
452
+ $this->output_section_screenshot();
453
+ $this->output_section_step_install();
454
+ $this->output_section_step_setup();
455
+
456
+ echo '</div>';
457
+ }
458
+
459
+ /**
460
+ * Generate and output heading section HTML.
461
+ */
462
+ protected function output_section_heading()
463
+ {
464
+ // Heading section.
465
+ printf(
466
+ '<section class="top">
467
+ <img class="img-top" src="%1$s" alt="%2$s"/>
468
+ <h1>%3$s</h1>
469
+ <p>%4$s</p>
470
+ </section>',
471
+ esc_url(PPRESS_ASSETS_URL . '/images/profilepressxmailoptin.png'),
472
+ esc_attr__('ProfilePress ♥ MailOptin', 'wp-user-avatar'),
473
+ esc_html__('#1 Popup, Optin Forms & Marketing Automation Plugin', 'wp-user-avatar'),
474
+ esc_html__('MailOptin lets you create popups and newsletter opt-in forms that integrates with Mailchimp, Aweber, Constant Contact, Active Campaign & more.', 'wp-user-avatar')
475
+ );
476
+ }
477
+
478
+ /**
479
+ * Generate and output screenshot section HTML.
480
+ */
481
+ protected function output_section_screenshot()
482
+ {
483
+ printf(
484
+ '<section class="screenshot">
485
+ <div class="cont">
486
+ <img src="%1$s" alt="%2$s"/>
487
+ </div>
488
+ <ul>
489
+ <li>%3$s</li>
490
+ <li>%4$s</li>
491
+ <li>%5$s</li>
492
+ <li>%6$s</li>
493
+ <li>%7$s</li>
494
+ </ul>
495
+ </section>',
496
+ 'https://mailoptin.io/wp-content/uploads/2018/10/lead-generation-customizer-demo.jpg',
497
+ esc_attr__('MailOptin screenshot', 'wp-user-avatar'),
498
+ esc_html__('Automatically notify your subscribers every time you publish a new post.', 'wp-user-avatar'),
499
+ esc_html__('Keep your subscribers engaged with daily, weekly and monthly email digest of published posts.', 'wp-user-avatar'),
500
+ esc_html__('Different types of opt-in form including Popup, notification bar, inline, scroll box, slide ins, sidebar forms.', 'wp-user-avatar'),
501
+ esc_html__('Page-level targeting and optin triggers to build hyper segmented email list.', 'wp-user-avatar'),
502
+ esc_html__('Analytics with actionable reporting & insights to improve your lead-generation strategy.', 'wp-user-avatar')
503
+ );
504
+ }
505
+
506
+ /**
507
+ * Generate and output step 'Install' section HTML.
508
+ */
509
+ protected function output_section_step_install()
510
+ {
511
+ $step = $this->get_data_step_install();
512
+
513
+ if (empty($step)) {
514
+ return;
515
+ }
516
+
517
+ printf(
518
+ '<section class="step step-install">
519
+ <aside class="num">
520
+ <img src="%1$s" alt="%2$s" />
521
+ <i class="loader hidden"></i>
522
+ </aside>
523
+ <div>
524
+ <h2>%3$s</h2>
525
+ <p>%4$s</p>
526
+ <button class="button %5$s" data-plugin="%6$s" data-action="%7$s">%8$s</button>
527
+ </div>
528
+ </section>',
529
+ esc_url(PPRESS_ASSETS_URL . '/images/' . $step['icon']),
530
+ esc_attr__('Step 1', 'wp-user-avatar'),
531
+ esc_html__('Install and Activate MailOptin', 'wp-user-avatar'),
532
+ esc_html__('Install MailOptin from the WordPress.org plugin repository.', 'wp-user-avatar'),
533
+ esc_attr($step['button_class']),
534
+ esc_attr($step['plugin']),
535
+ esc_attr($step['button_action']),
536
+ esc_html($step['button_text'])
537
+ );
538
+ }
539
+
540
+ /**
541
+ * Generate and output step 'Setup' section HTML.
542
+ */
543
+ protected function output_section_step_setup()
544
+ {
545
+ $step = $this->get_data_step_setup();
546
+
547
+ if (empty($step)) {
548
+ return;
549
+ }
550
+
551
+ printf(
552
+ '<section class="step step-setup %1$s">
553
+ <aside class="num">
554
+ <img src="%2$s" alt="%3$s" />
555
+ <i class="loader hidden"></i>
556
+ </aside>
557
+ <div>
558
+ <h2>%4$s</h2>
559
+ <p>%5$s</p>
560
+ <button class="button %6$s" data-url="%7$s">%8$s</button>
561
+ </div>
562
+ </section>',
563
+ esc_attr($step['section_class']),
564
+ esc_url(PPRESS_ASSETS_URL . '/images/' . $step['icon']),
565
+ esc_attr__('Step 2', 'wp-user-avatar'),
566
+ esc_html__('Set Up MailOptin', 'wp-user-avatar'),
567
+ esc_html__('Configure and create your first optin form.', 'wp-user-avatar'),
568
+ esc_attr($step['button_class']),
569
+ esc_url(admin_url($this->config['mailoptin_settings'])),
570
+ esc_html($step['button_text'])
571
+ );
572
+ }
573
+
574
+ /**
575
+ * Step 'Install' data.
576
+ */
577
+ protected function get_data_step_install()
578
+ {
579
+ $step = array();
580
+
581
+ $this->output_data['all_plugins'] = get_plugins();
582
+ $this->output_data['plugin_installed'] = array_key_exists($this->config['lite_plugin'], $this->output_data['all_plugins']);
583
+ $this->output_data['plugin_activated'] = false;
584
+ $this->output_data['plugin_setup'] = false;
585
+
586
+ if ( ! $this->output_data['plugin_installed']) {
587
+ $step['icon'] = 'step-1.svg';
588
+ $step['button_text'] = esc_html__('Install MailOptin', 'wp-user-avatar');
589
+ $step['button_class'] = '';
590
+ $step['button_action'] = 'install';
591
+ $step['plugin'] = $this->config['lite_download_url'];
592
+ } else {
593
+ $this->output_data['plugin_activated'] = $this->is_activated();
594
+ $this->output_data['plugin_setup'] = $this->is_configured();
595
+ $step['icon'] = $this->output_data['plugin_activated'] ? 'step-complete.svg' : 'step-1.svg';
596
+ $step['button_text'] = $this->output_data['plugin_activated'] ? esc_html__('MailOptin Installed & Activated', 'wp-user-avatar') : esc_html__('Activate MailOptin', 'wp-user-avatar');
597
+ $step['button_class'] = $this->output_data['plugin_activated'] ? 'grey disabled' : '';
598
+ $step['button_action'] = $this->output_data['plugin_activated'] ? '' : 'activate';
599
+ $step['plugin'] = $this->config['lite_plugin'];
600
+ }
601
+
602
+ return $step;
603
+ }
604
+
605
+ /**
606
+ * Step 'Setup' data.
607
+ */
608
+ protected function get_data_step_setup()
609
+ {
610
+ $step = array();
611
+
612
+ $step['icon'] = 'step-2.svg';
613
+ $step['section_class'] = $this->output_data['plugin_activated'] ? '' : 'grey';
614
+ $step['button_text'] = esc_html__('Start Setup', 'wp-user-avatar');
615
+ $step['button_class'] = 'grey disabled';
616
+
617
+ if ($this->output_data['plugin_setup']) {
618
+ $step['icon'] = 'step-complete.svg';
619
+ $step['section_class'] = '';
620
+ $step['button_text'] = esc_html__('Go to MailOptin settings', 'wp-user-avatar');
621
+ } else {
622
+ $step['button_class'] = $this->output_data['plugin_activated'] ? '' : 'grey disabled';
623
+ }
624
+
625
+ return $step;
626
+ }
627
+
628
+ /**
629
+ * Ajax endpoint. Check plugin setup status.
630
+ * Used to properly init step 'Setup' section after completing step 'Install'.
631
+ */
632
+ public function ajax_check_plugin_status()
633
+ {
634
+ // Security checks.
635
+ if (
636
+ ! check_ajax_referer('ppress-admin-nonce', 'nonce', false) ||
637
+ ! current_user_can('activate_plugins')
638
+ ) {
639
+ wp_send_json_error(
640
+ array(
641
+ 'error' => esc_html__('You do not have permission.', 'wp-user-avatar'),
642
+ )
643
+ );
644
+ }
645
+
646
+ $result = array();
647
+
648
+ if ( ! $this->is_activated()) {
649
+ wp_send_json_error(
650
+ array(
651
+ 'error' => esc_html__('Plugin unavailable.', 'wp-user-avatar'),
652
+ )
653
+ );
654
+ }
655
+
656
+ $result['setup_status'] = (int)$this->is_configured();
657
+
658
+ wp_send_json_success($result);
659
+ }
660
+
661
+ /**
662
+ * Whether MailOptin plugin configured or not.
663
+ */
664
+ protected function is_configured()
665
+ {
666
+ if ( ! $this->is_activated()) return false;
667
+
668
+ $optins = OptinCampaignsRepository::get_optin_campaign_ids();
669
+
670
+ $emails = EmailCampaignRepository::get_email_campaign_ids();
671
+
672
+ return ! empty($optins) || ! empty($emails);
673
+ }
674
+
675
+ /**
676
+ * Whether MailOptin plugin active or not.
677
+ */
678
+ protected function is_activated()
679
+ {
680
+ return class_exists('MailOptin\Core\Base');
681
+ }
682
+
683
+ public function redirect_to_mailoptin_settings()
684
+ {
685
+ if ($this->is_configured()) {
686
+ wp_safe_redirect(admin_url($this->config['mailoptin_settings']));
687
+ exit;
688
+ }
689
+ }
690
+
691
+ /**
692
+ * @return self
693
+ */
694
+ public static function get_instance()
695
+ {
696
+ static $instance = null;
697
+
698
+ if (is_null($instance)) {
699
+ $instance = new self();
700
+ }
701
+
702
+ return $instance;
703
+ }
704
+ }
src/Base.php CHANGED
@@ -5,6 +5,7 @@ namespace ProfilePress\Core;
5
  use ProfilePress\Core\Admin\SettingsPages\AdminFooter;
6
  use ProfilePress\Core\Admin\SettingsPages\ExtensionsSettingsPage;
7
  use ProfilePress\Core\Admin\SettingsPages\IDUserColumn;
 
8
  use ProfilePress\Core\Admin\SettingsPages\MemberDirectories;
9
  use ProfilePress\Core\Admin\SettingsPages\ToolsSettingsPage;
10
  use ProfilePress\Core\Classes\GlobalSiteAccess;
@@ -222,6 +223,7 @@ class Base
222
 
223
  Forms::get_instance();
224
  MemberDirectories::get_instance();
 
225
  ExtensionsSettingsPage::get_instance();
226
 
227
  AdminNotices::get_instance();
5
  use ProfilePress\Core\Admin\SettingsPages\AdminFooter;
6
  use ProfilePress\Core\Admin\SettingsPages\ExtensionsSettingsPage;
7
  use ProfilePress\Core\Admin\SettingsPages\IDUserColumn;
8
+ use ProfilePress\Core\Admin\SettingsPages\MailOptin;
9
  use ProfilePress\Core\Admin\SettingsPages\MemberDirectories;
10
  use ProfilePress\Core\Admin\SettingsPages\ToolsSettingsPage;
11
  use ProfilePress\Core\Classes\GlobalSiteAccess;
223
 
224
  Forms::get_instance();
225
  MemberDirectories::get_instance();
226
+ MailOptin::get_instance();
227
  ExtensionsSettingsPage::get_instance();
228
 
229
  AdminNotices::get_instance();
src/Classes/AjaxHandler.php CHANGED
@@ -356,7 +356,7 @@ class AjaxHandler
356
  {
357
  if (current_user_can('manage_options')) {
358
 
359
- $posted_data = array_map('esc_attr', $_POST['data']);
360
  $db_data = get_option(PPRESS_CONTACT_INFO_OPTION_NAME, array());
361
 
362
  $newArray = array();
356
  {
357
  if (current_user_can('manage_options')) {
358
 
359
+ $posted_data = array_map('sanitize_text_field', $_POST['data']);
360
  $db_data = get_option(PPRESS_CONTACT_INFO_OPTION_NAME, array());
361
 
362
  $newArray = array();
src/Classes/EditUserProfile.php CHANGED
@@ -361,8 +361,11 @@ class EditUserProfile
361
  {
362
  $custom_usermeta = array();
363
 
 
 
364
  foreach ($post_data as $key => $value) {
365
- if ($key == 'eup_submit' || in_array($key, ppress_reserved_field_keys())) continue;
 
366
 
367
  if ( ! in_array($key, $valid_userdata)) {
368
  $custom_usermeta[$key] = $value;
361
  {
362
  $custom_usermeta = array();
363
 
364
+ $valid_custom_usermeta = array_keys(ppress_custom_fields_key_value_pair(true));
365
+
366
  foreach ($post_data as $key => $value) {
367
+
368
+ if ($key == 'eup_submit' || in_array($key, ppress_reserved_field_keys()) || ! in_array($key, $valid_custom_usermeta)) continue;
369
 
370
  if ( ! in_array($key, $valid_userdata)) {
371
  $custom_usermeta[$key] = $value;
src/Classes/FileUploader.php CHANGED
@@ -85,12 +85,14 @@ class FileUploader
85
  return ! empty($value);
86
  });
87
 
 
 
88
  $filename = $file['name'];
89
 
90
- // get the file extension
91
- $fileExtension = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
 
92
 
93
- if ( ! empty($allowed_extensions) && ! in_array($fileExtension, $allowed_extensions)) {
94
  return new WP_Error('invalid_file', $filename . ' ' . apply_filters('ppress_invalid_file_error', esc_html__('appears to be of an invalid file format. Please try again.', 'wp-user-avatar'), $field_key));
95
  }
96
 
85
  return ! empty($value);
86
  });
87
 
88
+ if ( ! is_array($allowed_extensions) || empty($allowed_extensions)) $allowed_extensions = [];
89
+
90
  $filename = $file['name'];
91
 
92
+ $mime_check = ppress_check_type_and_ext($file, [], $allowed_extensions);
93
+
94
+ if (is_wp_error($mime_check)) {
95
 
 
96
  return new WP_Error('invalid_file', $filename . ' ' . apply_filters('ppress_invalid_file_error', esc_html__('appears to be of an invalid file format. Please try again.', 'wp-user-avatar'), $field_key));
97
  }
98
 
src/Classes/ImageUploader.php CHANGED
@@ -68,19 +68,19 @@ class ImageUploader
68
  );
69
  }
70
 
71
- // verify the file is a GIF, JPEG, or PNG
72
- $fileType = exif_imagetype($image["tmp_name"]);
 
 
 
73
 
74
- $allowed_image_type = apply_filters('ppress_allowed_image_type', array(
75
- IMAGETYPE_GIF,
76
- IMAGETYPE_JPEG,
77
- IMAGETYPE_PNG
78
- ));
79
 
80
- if ( ! in_array($fileType, $allowed_image_type)) {
81
  return new WP_Error(
82
  'image_invalid',
83
- apply_filters('ppress_image_not_image_error', esc_html__('Uploaded file not an image.', 'wp-user-avatar'))
84
  );
85
  }
86
 
@@ -123,15 +123,13 @@ class ImageUploader
123
  /** WP User Avatar Adapter STARTS */
124
  global $wp_user_avatar, $wpua_resize_crop, $wpua_resize_h, $wpua_resize_upload, $wpua_resize_w;
125
 
126
- if ( ! $wp_user_avatar->wpua_is_author_or_above() && (bool)$wpua_resize_upload === true) {
127
 
128
  $uploaded_image = wp_get_image_editor($image_upload_dir . $file_name);
129
 
130
  if ( ! is_wp_error($uploaded_image)) {
131
 
132
  $uploaded_image->resize($wpua_resize_w, $wpua_resize_h, $wpua_resize_crop == '1');
133
-
134
- $uploaded_image->save($image_upload_dir . $file_name);
135
  }
136
  }
137
  /** WP User Avatar Adapter ENDS */
68
  );
69
  }
70
 
71
+ $accepted_mime_types = [
72
+ 'image/png',
73
+ 'image/jpeg',
74
+ 'image/gif'
75
+ ];
76
 
77
+ $mime_check = ppress_check_type_and_ext($image, $accepted_mime_types);
78
+
79
+ if (is_wp_error($mime_check)) {
 
 
80
 
 
81
  return new WP_Error(
82
  'image_invalid',
83
+ apply_filters('ppress_image_not_image_error', esc_html__('Uploaded file is not an image.', 'wp-user-avatar'))
84
  );
85
  }
86
 
123
  /** WP User Avatar Adapter STARTS */
124
  global $wp_user_avatar, $wpua_resize_crop, $wpua_resize_h, $wpua_resize_upload, $wpua_resize_w;
125
 
126
+ if ( (bool)$wpua_resize_upload === true) {
127
 
128
  $uploaded_image = wp_get_image_editor($image_upload_dir . $file_name);
129
 
130
  if ( ! is_wp_error($uploaded_image)) {
131
 
132
  $uploaded_image->resize($wpua_resize_w, $wpua_resize_h, $wpua_resize_crop == '1');
 
 
133
  }
134
  }
135
  /** WP User Avatar Adapter ENDS */
src/Classes/Installer/PPress_Install_Skin.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace ProfilePress\Core\Classes\Installer;
4
+
5
+ /**
6
+ * Skin for on-the-fly addon installations.
7
+ *
8
+ * @since 1.5.6.1 Extend PluginSilentUpgraderSkin and clean up the class.
9
+ */
10
+ class PPress_Install_Skin extends PluginSilentUpgraderSkin {
11
+
12
+ /**
13
+ * Instead of outputting HTML for errors, json_encode the errors and send them
14
+ * back to the Ajax script for processing.
15
+ *
16
+ * @since 1.0.0
17
+ *
18
+ * @param array $errors Array of errors with the install process.
19
+ */
20
+ public function error( $errors ) {
21
+
22
+ if ( ! empty( $errors ) ) {
23
+ wp_send_json_error( $errors );
24
+ }
25
+ }
26
+ }
src/Classes/Installer/PluginSilentUpgrader.php ADDED
@@ -0,0 +1,592 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace ProfilePress\Core\Classes\Installer;
4
+
5
+ use WP_Error;
6
+ use WP_Upgrader;
7
+ use WP_Filesystem_Base;
8
+
9
+ /** \WP_Upgrader class */
10
+ require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
11
+
12
+ /** \Plugin_Upgrader class */
13
+ require_once ABSPATH . 'wp-admin/includes/class-plugin-upgrader.php';
14
+
15
+ /**
16
+ * In WP 5.3 a PHP 5.6 splat operator (...$args) was added to \WP_Upgrader_Skin::feedback().
17
+ * We need to remove all calls to *Skin::feedback() method, as we can't override it in own Skins
18
+ * without breaking support for PHP 5.3-5.5.
19
+ *
20
+ * @internal Please do not use this class outside of core ProfilePress development. May be removed at any time.
21
+ */
22
+ class PluginSilentUpgrader extends \Plugin_Upgrader {
23
+
24
+ /**
25
+ * Run an upgrade/installation.
26
+ *
27
+ * Attempt to download the package (if it is not a local file), unpack it, and
28
+ * install it in the destination folder.
29
+ *
30
+ * @param array $options {
31
+ * Array or string of arguments for upgrading/installing a package.
32
+ *
33
+ * @type string $package The full path or URI of the package to install.
34
+ * Default empty.
35
+ * @type string $destination The full path to the destination folder.
36
+ * Default empty.
37
+ * @type bool $clear_destination Whether to delete any files already in the
38
+ * destination folder. Default false.
39
+ * @type bool $clear_working Whether to delete the files form the working
40
+ * directory after copying to the destination.
41
+ * Default false.
42
+ * @type bool $abort_if_destination_exists Whether to abort the installation if the destination
43
+ * folder already exists. When true, `$clear_destination`
44
+ * should be false. Default true.
45
+ * @type bool $is_multi Whether this run is one of multiple upgrade/installation
46
+ * actions being performed in bulk. When true, the skin
47
+ * WP_Upgrader::header() and WP_Upgrader::footer()
48
+ * aren't called. Default false.
49
+ * @type array $hook_extra Extra arguments to pass to the filter hooks called by
50
+ * WP_Upgrader::run().
51
+ * }
52
+ * @return array|false|WP_error The result from self::install_package() on success, otherwise a WP_Error,
53
+ * or false if unable to connect to the filesystem.
54
+ */
55
+ public function run( $options ) {
56
+
57
+ $defaults = array(
58
+ 'package' => '', // Please always pass this.
59
+ 'destination' => '', // And this
60
+ 'clear_destination' => false,
61
+ 'abort_if_destination_exists' => true, // Abort if the Destination directory exists, Pass clear_destination as false please
62
+ 'clear_working' => true,
63
+ 'is_multi' => false,
64
+ 'hook_extra' => array(), // Pass any extra $hook_extra args here, this will be passed to any hooked filters.
65
+ );
66
+
67
+ $options = wp_parse_args( $options, $defaults );
68
+
69
+ /**
70
+ * Filter the package options before running an update.
71
+ *
72
+ * See also {@see 'upgrader_process_complete'}.
73
+ *
74
+ * @since 4.3.0
75
+ *
76
+ * @param array $options {
77
+ * Options used by the upgrader.
78
+ *
79
+ * @type string $package Package for update.
80
+ * @type string $destination Update location.
81
+ * @type bool $clear_destination Clear the destination resource.
82
+ * @type bool $clear_working Clear the working resource.
83
+ * @type bool $abort_if_destination_exists Abort if the Destination directory exists.
84
+ * @type bool $is_multi Whether the upgrader is running multiple times.
85
+ * @type array $hook_extra {
86
+ * Extra hook arguments.
87
+ *
88
+ * @type string $action Type of action. Default 'update'.
89
+ * @type string $type Type of update process. Accepts 'plugin', 'theme', or 'core'.
90
+ * @type bool $bulk Whether the update process is a bulk update. Default true.
91
+ * @type string $plugin Path to the plugin file relative to the plugins directory.
92
+ * @type string $theme The stylesheet or template name of the theme.
93
+ * @type string $language_update_type The language pack update type. Accepts 'plugin', 'theme',
94
+ * or 'core'.
95
+ * @type object $language_update The language pack update offer.
96
+ * }
97
+ * }
98
+ */
99
+ $options = apply_filters( 'upgrader_package_options', $options );
100
+
101
+ if ( ! $options['is_multi'] ) { // call $this->header separately if running multiple times
102
+ $this->skin->header();
103
+ }
104
+
105
+ // Connect to the Filesystem first.
106
+ $res = $this->fs_connect( array( WP_CONTENT_DIR, $options['destination'] ) );
107
+ // Mainly for non-connected filesystem.
108
+ if ( ! $res ) {
109
+ if ( ! $options['is_multi'] ) {
110
+ $this->skin->footer();
111
+ }
112
+ return false;
113
+ }
114
+
115
+ $this->skin->before();
116
+
117
+ if ( is_wp_error( $res ) ) {
118
+ $this->skin->error( $res );
119
+ $this->skin->after();
120
+ if ( ! $options['is_multi'] ) {
121
+ $this->skin->footer();
122
+ }
123
+ return $res;
124
+ }
125
+
126
+ /*
127
+ * Download the package (Note, This just returns the filename
128
+ * of the file if the package is a local file)
129
+ */
130
+ $download = $this->download_package( $options['package'], true );
131
+
132
+ // Allow for signature soft-fail.
133
+ // WARNING: This may be removed in the future.
134
+ if ( is_wp_error( $download ) && $download->get_error_data( 'softfail-filename' ) ) {
135
+
136
+ // Don't output the 'no signature could be found' failure message for now.
137
+ if ( 'signature_verification_no_signature' != $download->get_error_code() || WP_DEBUG ) {
138
+ // Outout the failure error as a normal feedback, and not as an error:
139
+ //$this->skin->feedback( $download->get_error_message() );
140
+
141
+ // Report this failure back to WordPress.org for debugging purposes.
142
+ wp_version_check(
143
+ array(
144
+ 'signature_failure_code' => $download->get_error_code(),
145
+ 'signature_failure_data' => $download->get_error_data(),
146
+ )
147
+ );
148
+ }
149
+
150
+ // Pretend this error didn't happen.
151
+ $download = $download->get_error_data( 'softfail-filename' );
152
+ }
153
+
154
+ if ( is_wp_error( $download ) ) {
155
+ $this->skin->error( $download );
156
+ $this->skin->after();
157
+ if ( ! $options['is_multi'] ) {
158
+ $this->skin->footer();
159
+ }
160
+ return $download;
161
+ }
162
+
163
+ $delete_package = ( $download != $options['package'] ); // Do not delete a "local" file
164
+
165
+ // Unzips the file into a temporary directory.
166
+ $working_dir = $this->unpack_package( $download, $delete_package );
167
+ if ( is_wp_error( $working_dir ) ) {
168
+ $this->skin->error( $working_dir );
169
+ $this->skin->after();
170
+ if ( ! $options['is_multi'] ) {
171
+ $this->skin->footer();
172
+ }
173
+ return $working_dir;
174
+ }
175
+
176
+ // With the given options, this installs it to the destination directory.
177
+ $result = $this->install_package(
178
+ array(
179
+ 'source' => $working_dir,
180
+ 'destination' => $options['destination'],
181
+ 'clear_destination' => $options['clear_destination'],
182
+ 'abort_if_destination_exists' => $options['abort_if_destination_exists'],
183
+ 'clear_working' => $options['clear_working'],
184
+ 'hook_extra' => $options['hook_extra'],
185
+ )
186
+ );
187
+
188
+ $this->skin->set_result( $result );
189
+ if ( is_wp_error( $result ) ) {
190
+ $this->skin->error( $result );
191
+ //$this->skin->feedback( 'process_failed' );
192
+ } else {
193
+ // Installation succeeded.
194
+ //$this->skin->feedback( 'process_success' );
195
+ }
196
+
197
+ $this->skin->after();
198
+
199
+ if ( ! $options['is_multi'] ) {
200
+
201
+ /**
202
+ * Fire when the upgrader process is complete.
203
+ *
204
+ * See also {@see 'upgrader_package_options'}.
205
+ *
206
+ * @since 3.6.0
207
+ * @since 3.7.0 Added to WP_Upgrader::run().
208
+ * @since 4.6.0 `$translations` was added as a possible argument to `$hook_extra`.
209
+ *
210
+ * @param WP_Upgrader $this WP_Upgrader instance. In other contexts, $this, might be a
211
+ * Theme_Upgrader, Plugin_Upgrader, Core_Upgrade, or Language_Pack_Upgrader instance.
212
+ * @param array $hook_extra {
213
+ * Array of bulk item update data.
214
+ *
215
+ * @type string $action Type of action. Default 'update'.
216
+ * @type string $type Type of update process. Accepts 'plugin', 'theme', 'translation', or 'core'.
217
+ * @type bool $bulk Whether the update process is a bulk update. Default true.
218
+ * @type array $plugins Array of the basename paths of the plugins' main files.
219
+ * @type array $themes The theme slugs.
220
+ * @type array $translations {
221
+ * Array of translations update data.
222
+ *
223
+ * @type string $language The locale the translation is for.
224
+ * @type string $type Type of translation. Accepts 'plugin', 'theme', or 'core'.
225
+ * @type string $slug Text domain the translation is for. The slug of a theme/plugin or
226
+ * 'default' for core translations.
227
+ * @type string $version The version of a theme, plugin, or core.
228
+ * }
229
+ * }
230
+ */
231
+ do_action( 'upgrader_process_complete', $this, $options['hook_extra'] );
232
+
233
+ $this->skin->footer();
234
+ }
235
+
236
+ return $result;
237
+ }
238
+
239
+ /**
240
+ * Toggle maintenance mode for the site.
241
+ *
242
+ * Create/delete the maintenance file to enable/disable maintenance mode.
243
+ *
244
+ * @since 2.8.0
245
+ *
246
+ * @global WP_Filesystem_Base $wp_filesystem Subclass
247
+ *
248
+ * @param bool $enable True to enable maintenance mode, false to disable.
249
+ */
250
+ public function maintenance_mode( $enable = false ) {
251
+ global $wp_filesystem;
252
+ $file = $wp_filesystem->abspath() . '.maintenance';
253
+ if ( $enable ) {
254
+ //$this->skin->feedback( 'maintenance_start' );
255
+ // Create maintenance file to signal that we are upgrading
256
+ $maintenance_string = '<?php $upgrading = ' . time() . '; ?>';
257
+ $wp_filesystem->delete( $file );
258
+ $wp_filesystem->put_contents( $file, $maintenance_string, FS_CHMOD_FILE );
259
+ } elseif ( ! $enable && $wp_filesystem->exists( $file ) ) {
260
+ //$this->skin->feedback( 'maintenance_end' );
261
+ $wp_filesystem->delete( $file );
262
+ }
263
+ }
264
+
265
+ /**
266
+ * Download a package.
267
+ *
268
+ * @since 2.8.0
269
+ * @since 5.5.0 Added the `$hook_extra` parameter.
270
+ *
271
+ * @param string $package The URI of the package. If this is the full path to an
272
+ * existing local file, it will be returned untouched.
273
+ * @param bool $check_signatures Whether to validate file signatures. Default false.
274
+ * @param array $hook_extra Extra arguments to pass to the filter hooks. Default empty array.
275
+ * @return string|WP_Error The full path to the downloaded package file, or a WP_Error object.
276
+ */
277
+ public function download_package( $package, $check_signatures = false, $hook_extra = array() ) {
278
+
279
+ /**
280
+ * Filters whether to return the package.
281
+ *
282
+ * @since 3.7.0
283
+ * @since 5.5.0 Added the `$hook_extra` parameter.
284
+ *
285
+ * @param bool $reply Whether to bail without returning the package.
286
+ * Default false.
287
+ * @param string $package The package file name.
288
+ * @param WP_Upgrader $this The WP_Upgrader instance.
289
+ * @param array $hook_extra Extra arguments passed to hooked filters.
290
+ */
291
+ $reply = apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra );
292
+ if ( false !== $reply ) {
293
+ return $reply;
294
+ }
295
+
296
+ if ( ! preg_match( '!^(http|https|ftp)://!i', $package ) && file_exists( $package ) ) { // Local file or remote?
297
+ return $package; // Must be a local file.
298
+ }
299
+
300
+ if ( empty( $package ) ) {
301
+ return new WP_Error( 'no_package', $this->strings['no_package'] );
302
+ }
303
+
304
+ //$this->skin->feedback( 'downloading_package', $package );
305
+
306
+ $download_file = download_url( $package, 300, $check_signatures );
307
+
308
+ if ( is_wp_error( $download_file ) && ! $download_file->get_error_data( 'softfail-filename' ) ) {
309
+ return new WP_Error( 'download_failed', $this->strings['download_failed'], $download_file->get_error_message() );
310
+ }
311
+
312
+ return $download_file;
313
+ }
314
+
315
+ /**
316
+ * Unpack a compressed package file.
317
+ *
318
+ * @since 2.8.0
319
+ *
320
+ * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
321
+ *
322
+ * @param string $package Full path to the package file.
323
+ * @param bool $delete_package Optional. Whether to delete the package file after attempting
324
+ * to unpack it. Default true.
325
+ * @return string|WP_Error The path to the unpacked contents, or a WP_Error on failure.
326
+ */
327
+ public function unpack_package( $package, $delete_package = true ) {
328
+ global $wp_filesystem;
329
+
330
+ //$this->skin->feedback( 'unpack_package' );
331
+
332
+ $upgrade_folder = $wp_filesystem->wp_content_dir() . 'upgrade/';
333
+
334
+ //Clean up contents of upgrade directory beforehand.
335
+ $upgrade_files = $wp_filesystem->dirlist( $upgrade_folder );
336
+ if ( ! empty( $upgrade_files ) ) {
337
+ foreach ( $upgrade_files as $file ) {
338
+ $wp_filesystem->delete( $upgrade_folder . $file['name'], true );
339
+ }
340
+ }
341
+
342
+ // We need a working directory - Strip off any .tmp or .zip suffixes
343
+ $working_dir = $upgrade_folder . basename( basename( $package, '.tmp' ), '.zip' );
344
+
345
+ // Clean up working directory
346
+ if ( $wp_filesystem->is_dir( $working_dir ) ) {
347
+ $wp_filesystem->delete( $working_dir, true );
348
+ }
349
+
350
+ // Unzip package to working directory
351
+ $result = unzip_file( $package, $working_dir );
352
+
353
+ // Once extracted, delete the package if required.
354
+ if ( $delete_package ) {
355
+ unlink( $package );
356
+ }
357
+
358
+ if ( is_wp_error( $result ) ) {
359
+ $wp_filesystem->delete( $working_dir, true );
360
+ if ( 'incompatible_archive' == $result->get_error_code() ) {
361
+ return new WP_Error( 'incompatible_archive', $this->strings['incompatible_archive'], $result->get_error_data() );
362
+ }
363
+ return $result;
364
+ }
365
+
366
+ return $working_dir;
367
+ }
368
+
369
+ /**
370
+ * Install a package.
371
+ *
372
+ * Copies the contents of a package form a source directory, and installs them in
373
+ * a destination directory. Optionally removes the source. It can also optionally
374
+ * clear out the destination folder if it already exists.
375
+ *
376
+ * @since 2.8.0
377
+ *
378
+ * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
379
+ * @global array $wp_theme_directories
380
+ *
381
+ * @param array|string $args {
382
+ * Optional. Array or string of arguments for installing a package. Default empty array.
383
+ *
384
+ * @type string $source Required path to the package source. Default empty.
385
+ * @type string $destination Required path to a folder to install the package in.
386
+ * Default empty.
387
+ * @type bool $clear_destination Whether to delete any files already in the destination
388
+ * folder. Default false.
389
+ * @type bool $clear_working Whether to delete the files form the working directory
390
+ * after copying to the destination. Default false.
391
+ * @type bool $abort_if_destination_exists Whether to abort the installation if
392
+ * the destination folder already exists. Default true.
393
+ * @type array $hook_extra Extra arguments to pass to the filter hooks called by
394
+ * WP_Upgrader::install_package(). Default empty array.
395
+ * }
396
+ *
397
+ * @return array|WP_Error The result (also stored in `WP_Upgrader::$result`), or a WP_Error on failure.
398
+ */
399
+ public function install_package( $args = array() ) {
400
+ global $wp_filesystem, $wp_theme_directories;
401
+
402
+ $defaults = array(
403
+ 'source' => '', // Please always pass this
404
+ 'destination' => '', // and this
405
+ 'clear_destination' => false,
406
+ 'clear_working' => false,
407
+ 'abort_if_destination_exists' => true,
408
+ 'hook_extra' => array(),
409
+ );
410
+
411
+ $args = wp_parse_args( $args, $defaults );
412
+
413
+ // These were previously extract()'d.
414
+ $source = $args['source'];
415
+ $destination = $args['destination'];
416
+ $clear_destination = $args['clear_destination'];
417
+
418
+ if ( function_exists( 'set_time_limit' ) && false === strpos( ini_get( 'disable_functions' ), 'set_time_limit' ) && ! ini_get( 'safe_mode' ) ) {
419
+ @set_time_limit( 300 );
420
+ }
421
+
422
+ if ( empty( $source ) || empty( $destination ) ) {
423
+ return new WP_Error( 'bad_request', $this->strings['bad_request'] );
424
+ }
425
+ //$this->skin->feedback( 'installing_package' );
426
+
427
+ /**
428
+ * Filter the install response before the installation has started.
429
+ *
430
+ * Returning a truthy value, or one that could be evaluated as a WP_Error
431
+ * will effectively short-circuit the installation, returning that value
432
+ * instead.
433
+ *
434
+ * @since 2.8.0
435
+ *
436
+ * @param bool|WP_Error $response Response.
437
+ * @param array $hook_extra Extra arguments passed to hooked filters.
438
+ */
439
+ $res = apply_filters( 'upgrader_pre_install', true, $args['hook_extra'] );
440
+
441
+ if ( is_wp_error( $res ) ) {
442
+ return $res;
443
+ }
444
+
445
+ //Retain the Original source and destinations
446
+ $remote_source = $args['source'];
447
+ $local_destination = $destination;
448
+
449
+ $source_files = array_keys( $wp_filesystem->dirlist( $remote_source ) );
450
+ $remote_destination = $wp_filesystem->find_folder( $local_destination );
451
+
452
+ //Locate which directory to copy to the new folder, This is based on the actual folder holding the files.
453
+ if ( 1 == count( $source_files ) && $wp_filesystem->is_dir( trailingslashit( $args['source'] ) . $source_files[0] . '/' ) ) { //Only one folder? Then we want its contents.
454
+ $source = trailingslashit( $args['source'] ) . trailingslashit( $source_files[0] );
455
+ } elseif ( count( $source_files ) == 0 ) {
456
+ return new WP_Error( 'incompatible_archive_empty', $this->strings['incompatible_archive'], $this->strings['no_files'] ); // There are no files?
457
+ } else { // It's only a single file, the upgrader will use the folder name of this file as the destination folder. Folder name is based on zip filename.
458
+ $source = trailingslashit( $args['source'] );
459
+ }
460
+
461
+ /**
462
+ * Filter the source file location for the upgrade package.
463
+ *
464
+ * @since 2.8.0
465
+ * @since 4.4.0 The $hook_extra parameter became available.
466
+ *
467
+ * @param string $source File source location.
468
+ * @param string $remote_source Remote file source location.
469
+ * @param WP_Upgrader $this WP_Upgrader instance.
470
+ * @param array $hook_extra Extra arguments passed to hooked filters.
471
+ */
472
+ $source = apply_filters( 'upgrader_source_selection', $source, $remote_source, $this, $args['hook_extra'] );
473
+
474
+ if ( is_wp_error( $source ) ) {
475
+ return $source;
476
+ }
477
+
478
+ // Has the source location changed? If so, we need a new source_files list.
479
+ if ( $source !== $remote_source ) {
480
+ $source_files = array_keys( $wp_filesystem->dirlist( $source ) );
481
+ }
482
+
483
+ /*
484
+ * Protection against deleting files in any important base directories.
485
+ * Theme_Upgrader & Plugin_Upgrader also trigger this, as they pass the
486
+ * destination directory (WP_PLUGIN_DIR / wp-content/themes) intending
487
+ * to copy the directory into the directory, whilst they pass the source
488
+ * as the actual files to copy.
489
+ */
490
+ $protected_directories = array( ABSPATH, WP_CONTENT_DIR, WP_PLUGIN_DIR, WP_CONTENT_DIR . '/themes' );
491
+
492
+ if ( is_array( $wp_theme_directories ) ) {
493
+ $protected_directories = array_merge( $protected_directories, $wp_theme_directories );
494
+ }
495
+
496
+ if ( in_array( $destination, $protected_directories ) ) {
497
+ $remote_destination = trailingslashit( $remote_destination ) . trailingslashit( basename( $source ) );
498
+ $destination = trailingslashit( $destination ) . trailingslashit( basename( $source ) );
499
+ }
500
+
501
+ if ( $clear_destination ) {
502
+ // We're going to clear the destination if there's something there.
503
+ //$this->skin->feedback( 'remove_old' );
504
+
505
+ $removed = $this->clear_destination( $remote_destination );
506
+
507
+ /**
508
+ * Filter whether the upgrader cleared the destination.
509
+ *
510
+ * @param mixed $removed Whether the destination was cleared. true on success, WP_Error on failure
511
+ * @param string $local_destination The local package destination.
512
+ * @param string $remote_destination The remote package destination.
513
+ * @param array $hook_extra Extra arguments passed to hooked filters.
514
+ */
515
+ $removed = apply_filters( 'upgrader_clear_destination', $removed, $local_destination, $remote_destination, $args['hook_extra'] );
516
+
517
+ if ( is_wp_error( $removed ) ) {
518
+ return $removed;
519
+ }
520
+ } elseif ( $args['abort_if_destination_exists'] && $wp_filesystem->exists( $remote_destination ) ) {
521
+ //If we're not clearing the destination folder and something exists there already, Bail.
522
+ //But first check to see if there are actually any files in the folder.
523
+ $_files = $wp_filesystem->dirlist( $remote_destination );
524
+ if ( ! empty( $_files ) ) {
525
+ $wp_filesystem->delete( $remote_source, true ); //Clear out the source files.
526
+ return new WP_Error( 'folder_exists', $this->strings['folder_exists'], $remote_destination );
527
+ }
528
+ }
529
+
530
+ //Create destination if needed
531
+ if ( ! $wp_filesystem->exists( $remote_destination ) ) {
532
+ if ( ! $wp_filesystem->mkdir( $remote_destination, FS_CHMOD_DIR ) ) {
533
+ return new WP_Error( 'mkdir_failed_destination', $this->strings['mkdir_failed'], $remote_destination );
534
+ }
535
+ }
536
+ // Copy new version of item into place.
537
+ $result = copy_dir( $source, $remote_destination );
538
+ if ( is_wp_error( $result ) ) {
539
+ if ( $args['clear_working'] ) {
540
+ $wp_filesystem->delete( $remote_source, true );
541
+ }
542
+ return $result;
543
+ }
544
+
545
+ //Clear the Working folder?
546
+ if ( $args['clear_working'] ) {
547
+ $wp_filesystem->delete( $remote_source, true );
548
+ }
549
+
550
+ $destination_name = basename( str_replace( $local_destination, '', $destination ) );
551
+ if ( '.' == $destination_name ) {
552
+ $destination_name = '';
553
+ }
554
+
555
+ $this->result = compact( 'source', 'source_files', 'destination', 'destination_name', 'local_destination', 'remote_destination', 'clear_destination' );
556
+
557
+ /**
558
+ * Filter the installation response after the installation has finished.
559
+ *
560
+ * @param bool $response Installation response.
561
+ * @param array $hook_extra Extra arguments passed to hooked filters.
562
+ * @param array $result Installation result data.
563
+ */
564
+ $res = apply_filters( 'upgrader_post_install', true, $args['hook_extra'], $this->result );
565
+
566
+ if ( is_wp_error( $res ) ) {
567
+ $this->result = $res;
568
+ return $res;
569
+ }
570
+
571
+ //Bombard the calling function will all the info which we've just used.
572
+ return $this->result;
573
+ }
574
+
575
+ /**
576
+ * Install a plugin package.
577
+ *
578
+ * @param string $package The full local path or URI of the package.
579
+ * @param array $args Optional. Other arguments for installing a plugin package. Default empty array.
580
+ *
581
+ * @return bool|\WP_Error True if the installation was successful, false or a WP_Error otherwise.
582
+ */
583
+ public function install( $package, $args = array() ) {
584
+
585
+ $result = parent::install( $package, $args );
586
+ if ( true === $result ) {
587
+ do_action( 'ppress_plugin_installed', $package );
588
+ }
589
+
590
+ return $result;
591
+ }
592
+ }
src/Classes/Installer/PluginSilentUpgraderSkin.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace ProfilePress\Core\Classes\Installer;
4
+
5
+ /** \WP_Upgrader_Skin class */
6
+ require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader-skin.php';
7
+
8
+ /**
9
+ * Class PluginSilentUpgraderSkin.
10
+ *
11
+ * @internal Please do not use this class outside of core ProfilePress development. May be removed at any time.
12
+ */
13
+ class PluginSilentUpgraderSkin extends \WP_Upgrader_Skin {
14
+
15
+ /**
16
+ * Empty out the header of its HTML content and only check to see if it has
17
+ * been performed or not.
18
+ */
19
+ public function header() {
20
+ }
21
+
22
+ /**
23
+ * Empty out the footer of its HTML contents.
24
+ */
25
+ public function footer() {
26
+ }
27
+
28
+ /**
29
+ * Instead of outputting HTML for errors, just return them.
30
+ * Ajax request will just ignore it.
31
+ *
32
+ * @param array $errors Array of errors with the install process.
33
+ *
34
+ * @return array
35
+ */
36
+ public function error( $errors ) {
37
+ return $errors;
38
+ }
39
+
40
+ /**
41
+ * Empty out JavaScript output that calls function to decrement the update counts.
42
+ *
43
+ * @param string $type Type of update count to decrement.
44
+ */
45
+ public function decrement_update_count( $type ) {
46
+ }
47
+ }
src/Classes/Installer/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php namespace ProfilePress\Core\Classes;
2
+ //
src/Classes/LoginAuth.php CHANGED
@@ -25,7 +25,7 @@ class LoginAuth
25
  *
26
  * @param string $username
27
  * @param string $password
28
- * @param bool $remember_login
29
  * @param null|int $login_form_id
30
  * @param string $redirect
31
  *
@@ -51,7 +51,7 @@ class LoginAuth
51
  $creds['user_login'] = $username;
52
  $creds['user_password'] = $password;
53
 
54
- if ($remember_login == 'true') {
55
  $creds['remember'] = true;
56
  }
57
 
25
  *
26
  * @param string $username
27
  * @param string $password
28
+ * @param string $remember_login
29
  * @param null|int $login_form_id
30
  * @param string $redirect
31
  *
51
  $creds['user_login'] = $username;
52
  $creds['user_password'] = $password;
53
 
54
+ if (empty($remember_login) || $remember_login == 'true') {
55
  $creds['remember'] = true;
56
  }
57
 
src/Classes/PROFILEPRESS_sql.php CHANGED
@@ -119,19 +119,12 @@ class PROFILEPRESS_sql
119
  */
120
  public static function get_profile_custom_fields()
121
  {
122
- static $cache = false;
123
-
124
- if (false === $cache) {
125
-
126
- global $wpdb;
127
-
128
- $cache = $wpdb->get_results(
129
- sprintf("SELECT * FROM %s ORDER BY id", Base::profile_fields_db_table()),
130
- 'ARRAY_A'
131
- );
132
- }
133
 
134
- return $cache;
 
 
 
135
  }
136
 
137
  /**
119
  */
120
  public static function get_profile_custom_fields()
121
  {
122
+ global $wpdb;
 
 
 
 
 
 
 
 
 
 
123
 
124
+ return $wpdb->get_results(
125
+ sprintf("SELECT * FROM %s ORDER BY id", Base::profile_fields_db_table()),
126
+ 'ARRAY_A'
127
+ );
128
  }
129
 
130
  /**
src/Classes/RegistrationAuth.php CHANGED
@@ -91,10 +91,12 @@ class RegistrationAuth
91
  * @param bool $is_melange
92
  * @param string $no_login_redirect
93
  *
94
- * @return string
95
  */
96
  public static function register_new_user($post, $form_id = 0, $redirect = '', $is_melange = false, $no_login_redirect = '')
97
  {
 
 
98
  $files = $_FILES;
99
 
100
  // create an array of acceptable userdata for use by wp_insert_user
@@ -236,12 +238,19 @@ class RegistrationAuth
236
 
237
  // get the data for use by update_meta
238
  $custom_usermeta = array();
239
- // loop over the $_POST data and create an array of the invalid userdata/ custom usermeta
240
- foreach ($post as $key => $value) {
241
- if ($key == 'reg_submit' || in_array($key, ppress_reserved_field_keys())) continue;
242
 
243
- if ( ! in_array($key, $valid_userdata)) {
244
- $custom_usermeta[$key] = is_array($value) ? array_map('sanitize_text_field', $value) : sanitize_text_field($value);
 
 
 
 
 
 
 
 
 
 
245
  }
246
  }
247
 
91
  * @param bool $is_melange
92
  * @param string $no_login_redirect
93
  *
94
+ * @return string|void
95
  */
96
  public static function register_new_user($post, $form_id = 0, $redirect = '', $is_melange = false, $no_login_redirect = '')
97
  {
98
+ if ( ! get_option('users_can_register')) return;
99
+
100
  $files = $_FILES;
101
 
102
  // create an array of acceptable userdata for use by wp_insert_user
238
 
239
  // get the data for use by update_meta
240
  $custom_usermeta = array();
 
 
 
241
 
242
+ if (ExtensionManager::is_premium()) {
243
+ // loop over the $_POST data and create an array of the invalid userdata/ custom usermeta
244
+ foreach ($post as $key => $value) {
245
+
246
+ if ($key == 'reg_submit' || in_array($key, ppress_reserved_field_keys())) continue;
247
+
248
+ if ( ! in_array($key, $valid_userdata)) {
249
+
250
+ if (in_array($key, array_keys(ppress_custom_fields_key_value_pair(true)))) {
251
+ $custom_usermeta[$key] = is_array($value) ? array_map('sanitize_text_field', $value) : sanitize_text_field($value);
252
+ }
253
+ }
254
  }
255
  }
256
 
src/ContentProtection/Init.php CHANGED
@@ -9,7 +9,7 @@ class Init
9
  {
10
  public function __construct()
11
  {
12
- add_filter('ppress_admin_hooks', function () {
13
  SettingsPage::get_instance();
14
  });
15
 
9
  {
10
  public function __construct()
11
  {
12
+ add_action('ppress_admin_hooks', function () {
13
  SettingsPage::get_instance();
14
  });
15
 
src/Functions/GlobalFunctions.php CHANGED
@@ -1,6 +1,7 @@
1
  <?php
2
  /** List of ProfilePress global helper functions */
3
 
 
4
  use ProfilePress\Core\Base;
5
  use ProfilePress\Core\Classes\ExtensionManager as EM;
6
  use ProfilePress\Core\Classes\FormRepository as FR;
@@ -495,7 +496,8 @@ function ppress_is_admin_page()
495
  PPRESS_FORMS_SETTINGS_SLUG,
496
  PPRESS_MEMBER_DIRECTORIES_SLUG,
497
  PPRESS_CONTENT_PROTECTION_SETTINGS_SLUG,
498
- PPRESS_EXTENSIONS_SETTINGS_SLUG
 
499
  ];
500
 
501
  return (isset($_GET['page']) && in_array($_GET['page'], $pp_builder_pages)) ||
@@ -1358,4 +1360,44 @@ function ppress_recursive_trim($item)
1358
  }
1359
 
1360
  return trim($item);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1361
  }
1
  <?php
2
  /** List of ProfilePress global helper functions */
3
 
4
+ use ProfilePress\Core\Admin\SettingsPages\MailOptin;
5
  use ProfilePress\Core\Base;
6
  use ProfilePress\Core\Classes\ExtensionManager as EM;
7
  use ProfilePress\Core\Classes\FormRepository as FR;
496
  PPRESS_FORMS_SETTINGS_SLUG,
497
  PPRESS_MEMBER_DIRECTORIES_SLUG,
498
  PPRESS_CONTENT_PROTECTION_SETTINGS_SLUG,
499
+ PPRESS_EXTENSIONS_SETTINGS_SLUG,
500
+ MailOptin::SLUG
501
  ];
502
 
503
  return (isset($_GET['page']) && in_array($_GET['page'], $pp_builder_pages)) ||
1360
  }
1361
 
1362
  return trim($item);
1363
+ }
1364
+
1365
+ function ppress_check_type_and_ext($file, $accepted_mime_types = [], $accepted_file_ext = [])
1366
+ {
1367
+
1368
+ if (empty($file_name)) {
1369
+ $file_name = $file['name'];
1370
+ }
1371
+
1372
+ $tmp_name = $file['tmp_name'];
1373
+
1374
+ $wp_filetype = wp_check_filetype_and_ext($tmp_name, $file_name);
1375
+
1376
+ $ext = $wp_filetype['ext'];
1377
+ $type = $wp_filetype['type'];
1378
+ $proper_filename = $wp_filetype['proper_filename'];
1379
+
1380
+ // When a proper_filename value exists, it could be a security issue if it's different than the original file name.
1381
+ if ($proper_filename && strtolower($proper_filename) !== strtolower($file_name)) {
1382
+ return new WP_Error('invalid_file', esc_html__('There was an problem while verifying your file.', 'wp-user-avatar'));
1383
+ }
1384
+
1385
+ // If either $ext or $type are empty, WordPress doesn't like this file and we should bail.
1386
+ if ( ! $ext) {
1387
+ return new WP_Error('illegal_extension', esc_html__('Sorry, this file extension is not permitted for security reasons.', 'wp-user-avatar'));
1388
+ }
1389
+
1390
+ if ( ! $type) {
1391
+ return new WP_Error('illegal_type', esc_html__('Sorry, this file type is not permitted for security reasons.', 'wp-user-avatar'));
1392
+ }
1393
+
1394
+ if ( ! empty($accepted_mime_types) && ! in_array($type, $accepted_mime_types)) {
1395
+ return new WP_Error('illegal_type', esc_html__('Error: The file you uploaded is not accepted on our website.', 'wp-user-avatar'));
1396
+ }
1397
+
1398
+ if ( ! empty($accepted_file_ext) && ! in_array($ext, $accepted_file_ext)) {
1399
+ return new WP_Error('illegal_type', esc_html__('Error: The file you uploaded is not accepted on our website.', 'wp-user-avatar'));
1400
+ }
1401
+
1402
+ return true;
1403
  }
src/ShortcodeParser/Builder/FieldsShortcodeCallback.php CHANGED
@@ -971,7 +971,21 @@ class FieldsShortcodeCallback
971
 
972
  $attributes = $this->field_attributes($key, $this->valid_field_atts($atts));
973
 
974
- $html = "<input name='" . $key . "' type='file' $attributes>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
975
  // if field is required, add an hidden field
976
  if ($this->form_type == FormRepository::REGISTRATION_TYPE && $this->is_field_required($atts)) {
977
  $html .= "<input name='required-" . $key . "' type='hidden' value='true' style='display:none'>";
971
 
972
  $attributes = $this->field_attributes($key, $this->valid_field_atts($atts));
973
 
974
+ $html = '';
975
+
976
+ if ('edit_profile' == $this->form_name) {
977
+
978
+ $user_upload_data = get_user_meta($this->current_user->ID, 'pp_uploaded_files', true);
979
+ // if the user uploads isn't empty and there exist a file with the custom field key.
980
+ if ( ! empty($user_upload_data) && ($filename = @$user_upload_data[$key])) {
981
+ $link = PPRESS_FILE_UPLOAD_URL . $filename;
982
+ $html .= "<div class='ppress-user-upload'><a href='$link'>$filename</a></div>";
983
+ }
984
+
985
+ $html = apply_filters('ppress_edit_profile_hide_file', $html);
986
+ }
987
+
988
+ $html .= "<input name='" . $key . "' type='file' $attributes>";
989
  // if field is required, add an hidden field
990
  if ($this->form_type == FormRepository::REGISTRATION_TYPE && $this->is_field_required($atts)) {
991
  $html .= "<input name='required-" . $key . "' type='hidden' value='true' style='display:none'>";
src/ShortcodeParser/Builder/LoginFormBuilder.php CHANGED
@@ -126,7 +126,8 @@ class LoginFormBuilder
126
  $id = 'id="' . $atts['id'] . '"';
127
  $title = 'title="' . $atts['title'] . '"';
128
 
129
- $html = "<input name='login_remember' value='true' type='checkbox' $title $class $id $other_atts_html checked='checked'>";
 
130
 
131
  return apply_filters('ppress_login_remember_field', $html, $atts);
132
  }
@@ -134,10 +135,10 @@ class LoginFormBuilder
134
  public function login_submit($atts)
135
  {
136
  $form_type = FormRepository::LOGIN_TYPE;
137
- $form_id = isset($GLOBALS['pp_login_form_id']) ? $GLOBALS['pp_login_form_id'] : 0;
138
 
139
  if (isset($GLOBALS['pp_melange_form_id'])) {
140
- $form_id = $GLOBALS['pp_melange_form_id'];
141
  $form_type = FormRepository::MELANGE_TYPE;
142
  }
143
 
126
  $id = 'id="' . $atts['id'] . '"';
127
  $title = 'title="' . $atts['title'] . '"';
128
 
129
+ $html = "<input name='login_remember' value='false' type='hidden'>";
130
+ $html .= "<input name='login_remember' value='true' type='checkbox' $title $class $id $other_atts_html checked='checked'>";
131
 
132
  return apply_filters('ppress_login_remember_field', $html, $atts);
133
  }
135
  public function login_submit($atts)
136
  {
137
  $form_type = FormRepository::LOGIN_TYPE;
138
+ $form_id = isset($GLOBALS['pp_login_form_id']) ? $GLOBALS['pp_login_form_id'] : 0;
139
 
140
  if (isset($GLOBALS['pp_melange_form_id'])) {
141
+ $form_id = $GLOBALS['pp_melange_form_id'];
142
  $form_type = FormRepository::MELANGE_TYPE;
143
  }
144
 
src/ShortcodeParser/Builder/PasswordResetBuilder.php CHANGED
@@ -143,7 +143,7 @@ class PasswordResetBuilder
143
  $class = 'class="' . $atts['class'] . '"';
144
  $placeholder = 'placeholder="' . $atts['placeholder'] . '"';
145
  $id = ! empty($atts['id']) ? 'id="' . $atts['id'] . '"' : null;
146
- $value = isset($_POST['password1']) ? 'value="' . esc_attr($_POST['password1']) . '"' : 'value=""';
147
 
148
  $title = 'title="' . $atts['title'] . '"';
149
 
@@ -181,7 +181,7 @@ class PasswordResetBuilder
181
  $class = 'class="' . $atts['class'] . '"';
182
  $placeholder = 'placeholder="' . $atts['placeholder'] . '"';
183
  $id = ! empty($atts['id']) ? 'id="' . $atts['id'] . '"' : null;
184
- $value = isset($_POST['password2']) ? 'value="' . esc_attr($_POST['password2']) . '"' : 'value=""';
185
 
186
  $title = 'title="' . $atts['title'] . '"';
187
 
143
  $class = 'class="' . $atts['class'] . '"';
144
  $placeholder = 'placeholder="' . $atts['placeholder'] . '"';
145
  $id = ! empty($atts['id']) ? 'id="' . $atts['id'] . '"' : null;
146
+ $value = 'value=""';
147
 
148
  $title = 'title="' . $atts['title'] . '"';
149
 
181
  $class = 'class="' . $atts['class'] . '"';
182
  $placeholder = 'placeholder="' . $atts['placeholder'] . '"';
183
  $id = ! empty($atts['id']) ? 'id="' . $atts['id'] . '"' : null;
184
+ $value = 'value=""';
185
 
186
  $title = 'title="' . $atts['title'] . '"';
187
 
src/ShortcodeParser/FrontendProfileTag.php CHANGED
@@ -41,11 +41,11 @@ class FrontendProfileTag
41
  if (empty($who)) {
42
  if (is_user_logged_in()) {
43
  $user = $this->get_current_user_data();
44
- } elseif ( ! is_user_logged_in()) {
45
  $profile_slug_with_slash = ppress_get_profile_slug() . '/';
46
 
47
  if (strpos($_SERVER['REQUEST_URI'], $profile_slug_with_slash) !== false) {
48
- wp_safe_redirect(wp_login_url());
49
  exit;
50
  }
51
  }
@@ -55,11 +55,15 @@ class FrontendProfileTag
55
 
56
  // attempt to check if the slug is a nice-name and then retrieve the username of the user.
57
  $check = ppress_is_slug_nice_name($username_or_nicename);
58
- if (is_string($check)) {
59
- $username_or_nicename = $check;
60
- }
61
 
62
  $user = get_user_by('login', $username_or_nicename);
 
 
 
 
 
63
  }
64
 
65
  $user = apply_filters('ppress_frontend_profile_wp_user_object', $user);
41
  if (empty($who)) {
42
  if (is_user_logged_in()) {
43
  $user = $this->get_current_user_data();
44
+ } else {
45
  $profile_slug_with_slash = ppress_get_profile_slug() . '/';
46
 
47
  if (strpos($_SERVER['REQUEST_URI'], $profile_slug_with_slash) !== false) {
48
+ wp_safe_redirect(home_url());
49
  exit;
50
  }
51
  }
55
 
56
  // attempt to check if the slug is a nice-name and then retrieve the username of the user.
57
  $check = ppress_is_slug_nice_name($username_or_nicename);
58
+
59
+ if (is_string($check)) $username_or_nicename = $check;
 
60
 
61
  $user = get_user_by('login', $username_or_nicename);
62
+
63
+ if ( ! $user) {
64
+ wp_safe_redirect(home_url());
65
+ exit;
66
+ }
67
  }
68
 
69
  $user = apply_filters('ppress_frontend_profile_wp_user_object', $user);
src/Widgets/TabbedWidget.php CHANGED
@@ -31,8 +31,7 @@ class TabbedWidget extends \WP_Widget
31
  if (isset($_POST['tabbed_login_submit'])) {
32
  $this->widget_status = @TabbedWidgetDependency::login(
33
  trim($_POST['tabbed-login-name']),
34
- $_POST['tabbed-login-password'],
35
- sanitize_text_field($_POST['tabbed-login-remember-me'])
36
  );
37
  }
38
 
@@ -137,10 +136,6 @@ class TabbedWidget extends \WP_Widget
137
  <li>
138
  <input name="tabbed-login-password" value="<?php echo(isset($_POST['tabbed-login-password']) ? $_POST['tabbed-login-password'] : ''); ?>" type="password" placeholder="Password" required/>
139
  </li>
140
- <li class="remember-login">
141
- <input id="remember-login" name="tabbed-login-remember-me" type="checkbox" value="true">
142
- <label for="remember-login" class="css-label lite-cyan-check"><?= esc_html__('Remember Me', 'wp-user-avatar'); ?></label>
143
- </li>
144
  <li>
145
  <input data-pp-submit-label="<?= $login_btn_label ?>" data-pp-processing-label="<?= $processing_label ?>" name="tabbed_login_submit" type="submit" value="<?= $login_btn_label ?>" class="tb-button"/>
146
  </li>
31
  if (isset($_POST['tabbed_login_submit'])) {
32
  $this->widget_status = @TabbedWidgetDependency::login(
33
  trim($_POST['tabbed-login-name']),
34
+ $_POST['tabbed-login-password']
 
35
  );
36
  }
37
 
136
  <li>
137
  <input name="tabbed-login-password" value="<?php echo(isset($_POST['tabbed-login-password']) ? $_POST['tabbed-login-password'] : ''); ?>" type="password" placeholder="Password" required/>
138
  </li>
 
 
 
 
139
  <li>
140
  <input data-pp-submit-label="<?= $login_btn_label ?>" data-pp-processing-label="<?= $processing_label ?>" name="tabbed_login_submit" type="submit" value="<?= $login_btn_label ?>" class="tb-button"/>
141
  </li>
src/Widgets/TabbedWidgetDependency.php CHANGED
@@ -13,13 +13,12 @@ class TabbedWidgetDependency
13
  *
14
  * @param $username string login username
15
  * @param $password string login password
16
- * @param $remember_login bool remember login
17
  *
18
  * @return string
19
  */
20
- static function login($username, $password, $remember_login)
21
  {
22
- $login_status = LoginAuth::login_auth($username, $password, $remember_login);
23
 
24
  if (isset($login_status)) return $login_status->get_error_message();
25
 
13
  *
14
  * @param $username string login username
15
  * @param $password string login password
 
16
  *
17
  * @return string
18
  */
19
+ static function login($username, $password)
20
  {
21
+ $login_status = LoginAuth::login_auth($username, $password);
22
 
23
  if (isset($login_status)) return $login_status->get_error_message();
24
 
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitf1f8ec9023d123f9876c568dd7243be3::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit320a30269f6c41be35363d85a90cb2da::getLoader();
vendor/composer/InstalledVersions.php CHANGED
@@ -29,7 +29,7 @@ private static $installed = array (
29
  'aliases' =>
30
  array (
31
  ),
32
- 'reference' => '588f732082c5e996c3f81a115a24a6d4eedf0760',
33
  'name' => '__root__',
34
  ),
35
  'versions' =>
@@ -41,7 +41,7 @@ private static $installed = array (
41
  'aliases' =>
42
  array (
43
  ),
44
- 'reference' => '588f732082c5e996c3f81a115a24a6d4eedf0760',
45
  ),
46
  'collizo4sky/persist-admin-notices-dismissal' =>
47
  array (
29
  'aliases' =>
30
  array (
31
  ),
32
+ 'reference' => '224a4ea996906d92969576295f0ad2be38f29f01',
33
  'name' => '__root__',
34
  ),
35
  'versions' =>
41
  'aliases' =>
42
  array (
43
  ),
44
+ 'reference' => '224a4ea996906d92969576295f0ad2be38f29f01',
45
  ),
46
  'collizo4sky/persist-admin-notices-dismissal' =>
47
  array (
vendor/composer/autoload_classmap.php CHANGED
@@ -87,6 +87,7 @@ return array(
87
  'ProfilePress\\Core\\Admin\\SettingsPages\\Forms' => $baseDir . '/src/Admin/SettingsPages/Forms.php',
88
  'ProfilePress\\Core\\Admin\\SettingsPages\\GeneralSettings' => $baseDir . '/src/Admin/SettingsPages/GeneralSettings.php',
89
  'ProfilePress\\Core\\Admin\\SettingsPages\\IDUserColumn' => $baseDir . '/src/Admin/SettingsPages/IDUserColumn.php',
 
90
  'ProfilePress\\Core\\Admin\\SettingsPages\\MemberDirectories' => $baseDir . '/src/Admin/SettingsPages/MemberDirectories.php',
91
  'ProfilePress\\Core\\Admin\\SettingsPages\\MembersDirectoryList' => $baseDir . '/src/Admin/SettingsPages/MembersDirectoryList.php',
92
  'ProfilePress\\Core\\Admin\\SettingsPages\\ToolsSettingsPage' => $baseDir . '/src/Admin/SettingsPages/ToolsSettingsPage.php',
@@ -104,6 +105,9 @@ return array(
104
  'ProfilePress\\Core\\Classes\\GDPR' => $baseDir . '/src/Classes/GDPR.php',
105
  'ProfilePress\\Core\\Classes\\GlobalSiteAccess' => $baseDir . '/src/Classes/GlobalSiteAccess.php',
106
  'ProfilePress\\Core\\Classes\\ImageUploader' => $baseDir . '/src/Classes/ImageUploader.php',
 
 
 
107
  'ProfilePress\\Core\\Classes\\LoginAuth' => $baseDir . '/src/Classes/LoginAuth.php',
108
  'ProfilePress\\Core\\Classes\\Miscellaneous' => $baseDir . '/src/Classes/Miscellaneous.php',
109
  'ProfilePress\\Core\\Classes\\ModifyRedirectDefaultLinks' => $baseDir . '/src/Classes/ModifyRedirectDefaultLinks.php',
87
  'ProfilePress\\Core\\Admin\\SettingsPages\\Forms' => $baseDir . '/src/Admin/SettingsPages/Forms.php',
88
  'ProfilePress\\Core\\Admin\\SettingsPages\\GeneralSettings' => $baseDir . '/src/Admin/SettingsPages/GeneralSettings.php',
89
  'ProfilePress\\Core\\Admin\\SettingsPages\\IDUserColumn' => $baseDir . '/src/Admin/SettingsPages/IDUserColumn.php',
90
+ 'ProfilePress\\Core\\Admin\\SettingsPages\\MailOptin' => $baseDir . '/src/Admin/SettingsPages/MailOptin.php',
91
  'ProfilePress\\Core\\Admin\\SettingsPages\\MemberDirectories' => $baseDir . '/src/Admin/SettingsPages/MemberDirectories.php',
92
  'ProfilePress\\Core\\Admin\\SettingsPages\\MembersDirectoryList' => $baseDir . '/src/Admin/SettingsPages/MembersDirectoryList.php',
93
  'ProfilePress\\Core\\Admin\\SettingsPages\\ToolsSettingsPage' => $baseDir . '/src/Admin/SettingsPages/ToolsSettingsPage.php',
105
  'ProfilePress\\Core\\Classes\\GDPR' => $baseDir . '/src/Classes/GDPR.php',
106
  'ProfilePress\\Core\\Classes\\GlobalSiteAccess' => $baseDir . '/src/Classes/GlobalSiteAccess.php',
107
  'ProfilePress\\Core\\Classes\\ImageUploader' => $baseDir . '/src/Classes/ImageUploader.php',
108
+ 'ProfilePress\\Core\\Classes\\Installer\\PPress_Install_Skin' => $baseDir . '/src/Classes/Installer/PPress_Install_Skin.php',
109
+ 'ProfilePress\\Core\\Classes\\Installer\\PluginSilentUpgrader' => $baseDir . '/src/Classes/Installer/PluginSilentUpgrader.php',
110
+ 'ProfilePress\\Core\\Classes\\Installer\\PluginSilentUpgraderSkin' => $baseDir . '/src/Classes/Installer/PluginSilentUpgraderSkin.php',
111
  'ProfilePress\\Core\\Classes\\LoginAuth' => $baseDir . '/src/Classes/LoginAuth.php',
112
  'ProfilePress\\Core\\Classes\\Miscellaneous' => $baseDir . '/src/Classes/Miscellaneous.php',
113
  'ProfilePress\\Core\\Classes\\ModifyRedirectDefaultLinks' => $baseDir . '/src/Classes/ModifyRedirectDefaultLinks.php',
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitf1f8ec9023d123f9876c568dd7243be3
6
  {
7
  private static $loader;
8
 
@@ -24,15 +24,15 @@ class ComposerAutoloaderInitf1f8ec9023d123f9876c568dd7243be3
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
- spl_autoload_register(array('ComposerAutoloaderInitf1f8ec9023d123f9876c568dd7243be3', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
29
- spl_autoload_unregister(array('ComposerAutoloaderInitf1f8ec9023d123f9876c568dd7243be3', '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\ComposerStaticInitf1f8ec9023d123f9876c568dd7243be3::getInitializer($loader));
36
  } else {
37
  $map = require __DIR__ . '/autoload_namespaces.php';
38
  foreach ($map as $namespace => $path) {
@@ -53,19 +53,19 @@ class ComposerAutoloaderInitf1f8ec9023d123f9876c568dd7243be3
53
  $loader->register(true);
54
 
55
  if ($useStaticLoader) {
56
- $includeFiles = Composer\Autoload\ComposerStaticInitf1f8ec9023d123f9876c568dd7243be3::$files;
57
  } else {
58
  $includeFiles = require __DIR__ . '/autoload_files.php';
59
  }
60
  foreach ($includeFiles as $fileIdentifier => $file) {
61
- composerRequiref1f8ec9023d123f9876c568dd7243be3($fileIdentifier, $file);
62
  }
63
 
64
  return $loader;
65
  }
66
  }
67
 
68
- function composerRequiref1f8ec9023d123f9876c568dd7243be3($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 ComposerAutoloaderInit320a30269f6c41be35363d85a90cb2da
6
  {
7
  private static $loader;
8
 
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
+ spl_autoload_register(array('ComposerAutoloaderInit320a30269f6c41be35363d85a90cb2da', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
29
+ spl_autoload_unregister(array('ComposerAutoloaderInit320a30269f6c41be35363d85a90cb2da', '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\ComposerStaticInit320a30269f6c41be35363d85a90cb2da::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\ComposerStaticInit320a30269f6c41be35363d85a90cb2da::$files;
57
  } else {
58
  $includeFiles = require __DIR__ . '/autoload_files.php';
59
  }
60
  foreach ($includeFiles as $fileIdentifier => $file) {
61
+ composerRequire320a30269f6c41be35363d85a90cb2da($fileIdentifier, $file);
62
  }
63
 
64
  return $loader;
65
  }
66
  }
67
 
68
+ function composerRequire320a30269f6c41be35363d85a90cb2da($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 ComposerStaticInitf1f8ec9023d123f9876c568dd7243be3
8
  {
9
  public static $files = array (
10
  'fda73876e8be17735f680f484cec1679' => __DIR__ . '/../..' . '/src/Functions/custom-settings-api.php',
@@ -120,6 +120,7 @@ class ComposerStaticInitf1f8ec9023d123f9876c568dd7243be3
120
  'ProfilePress\\Core\\Admin\\SettingsPages\\Forms' => __DIR__ . '/../..' . '/src/Admin/SettingsPages/Forms.php',
121
  'ProfilePress\\Core\\Admin\\SettingsPages\\GeneralSettings' => __DIR__ . '/../..' . '/src/Admin/SettingsPages/GeneralSettings.php',
122
  'ProfilePress\\Core\\Admin\\SettingsPages\\IDUserColumn' => __DIR__ . '/../..' . '/src/Admin/SettingsPages/IDUserColumn.php',
 
123
  'ProfilePress\\Core\\Admin\\SettingsPages\\MemberDirectories' => __DIR__ . '/../..' . '/src/Admin/SettingsPages/MemberDirectories.php',
124
  'ProfilePress\\Core\\Admin\\SettingsPages\\MembersDirectoryList' => __DIR__ . '/../..' . '/src/Admin/SettingsPages/MembersDirectoryList.php',
125
  'ProfilePress\\Core\\Admin\\SettingsPages\\ToolsSettingsPage' => __DIR__ . '/../..' . '/src/Admin/SettingsPages/ToolsSettingsPage.php',
@@ -137,6 +138,9 @@ class ComposerStaticInitf1f8ec9023d123f9876c568dd7243be3
137
  'ProfilePress\\Core\\Classes\\GDPR' => __DIR__ . '/../..' . '/src/Classes/GDPR.php',
138
  'ProfilePress\\Core\\Classes\\GlobalSiteAccess' => __DIR__ . '/../..' . '/src/Classes/GlobalSiteAccess.php',
139
  'ProfilePress\\Core\\Classes\\ImageUploader' => __DIR__ . '/../..' . '/src/Classes/ImageUploader.php',
 
 
 
140
  'ProfilePress\\Core\\Classes\\LoginAuth' => __DIR__ . '/../..' . '/src/Classes/LoginAuth.php',
141
  'ProfilePress\\Core\\Classes\\Miscellaneous' => __DIR__ . '/../..' . '/src/Classes/Miscellaneous.php',
142
  'ProfilePress\\Core\\Classes\\ModifyRedirectDefaultLinks' => __DIR__ . '/../..' . '/src/Classes/ModifyRedirectDefaultLinks.php',
@@ -282,9 +286,9 @@ class ComposerStaticInitf1f8ec9023d123f9876c568dd7243be3
282
  public static function getInitializer(ClassLoader $loader)
283
  {
284
  return \Closure::bind(function () use ($loader) {
285
- $loader->prefixLengthsPsr4 = ComposerStaticInitf1f8ec9023d123f9876c568dd7243be3::$prefixLengthsPsr4;
286
- $loader->prefixDirsPsr4 = ComposerStaticInitf1f8ec9023d123f9876c568dd7243be3::$prefixDirsPsr4;
287
- $loader->classMap = ComposerStaticInitf1f8ec9023d123f9876c568dd7243be3::$classMap;
288
 
289
  }, null, ClassLoader::class);
290
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit320a30269f6c41be35363d85a90cb2da
8
  {
9
  public static $files = array (
10
  'fda73876e8be17735f680f484cec1679' => __DIR__ . '/../..' . '/src/Functions/custom-settings-api.php',
120
  'ProfilePress\\Core\\Admin\\SettingsPages\\Forms' => __DIR__ . '/../..' . '/src/Admin/SettingsPages/Forms.php',
121
  'ProfilePress\\Core\\Admin\\SettingsPages\\GeneralSettings' => __DIR__ . '/../..' . '/src/Admin/SettingsPages/GeneralSettings.php',
122
  'ProfilePress\\Core\\Admin\\SettingsPages\\IDUserColumn' => __DIR__ . '/../..' . '/src/Admin/SettingsPages/IDUserColumn.php',
123
+ 'ProfilePress\\Core\\Admin\\SettingsPages\\MailOptin' => __DIR__ . '/../..' . '/src/Admin/SettingsPages/MailOptin.php',
124
  'ProfilePress\\Core\\Admin\\SettingsPages\\MemberDirectories' => __DIR__ . '/../..' . '/src/Admin/SettingsPages/MemberDirectories.php',
125
  'ProfilePress\\Core\\Admin\\SettingsPages\\MembersDirectoryList' => __DIR__ . '/../..' . '/src/Admin/SettingsPages/MembersDirectoryList.php',
126
  'ProfilePress\\Core\\Admin\\SettingsPages\\ToolsSettingsPage' => __DIR__ . '/../..' . '/src/Admin/SettingsPages/ToolsSettingsPage.php',
138
  'ProfilePress\\Core\\Classes\\GDPR' => __DIR__ . '/../..' . '/src/Classes/GDPR.php',
139
  'ProfilePress\\Core\\Classes\\GlobalSiteAccess' => __DIR__ . '/../..' . '/src/Classes/GlobalSiteAccess.php',
140
  'ProfilePress\\Core\\Classes\\ImageUploader' => __DIR__ . '/../..' . '/src/Classes/ImageUploader.php',
141
+ 'ProfilePress\\Core\\Classes\\Installer\\PPress_Install_Skin' => __DIR__ . '/../..' . '/src/Classes/Installer/PPress_Install_Skin.php',
142
+ 'ProfilePress\\Core\\Classes\\Installer\\PluginSilentUpgrader' => __DIR__ . '/../..' . '/src/Classes/Installer/PluginSilentUpgrader.php',
143
+ 'ProfilePress\\Core\\Classes\\Installer\\PluginSilentUpgraderSkin' => __DIR__ . '/../..' . '/src/Classes/Installer/PluginSilentUpgraderSkin.php',
144
  'ProfilePress\\Core\\Classes\\LoginAuth' => __DIR__ . '/../..' . '/src/Classes/LoginAuth.php',
145
  'ProfilePress\\Core\\Classes\\Miscellaneous' => __DIR__ . '/../..' . '/src/Classes/Miscellaneous.php',
146
  'ProfilePress\\Core\\Classes\\ModifyRedirectDefaultLinks' => __DIR__ . '/../..' . '/src/Classes/ModifyRedirectDefaultLinks.php',
286
  public static function getInitializer(ClassLoader $loader)
287
  {
288
  return \Closure::bind(function () use ($loader) {
289
+ $loader->prefixLengthsPsr4 = ComposerStaticInit320a30269f6c41be35363d85a90cb2da::$prefixLengthsPsr4;
290
+ $loader->prefixDirsPsr4 = ComposerStaticInit320a30269f6c41be35363d85a90cb2da::$prefixDirsPsr4;
291
+ $loader->classMap = ComposerStaticInit320a30269f6c41be35363d85a90cb2da::$classMap;
292
 
293
  }, null, ClassLoader::class);
294
  }
vendor/composer/installed.php CHANGED
@@ -6,7 +6,7 @@
6
  'aliases' =>
7
  array (
8
  ),
9
- 'reference' => '588f732082c5e996c3f81a115a24a6d4eedf0760',
10
  'name' => '__root__',
11
  ),
12
  'versions' =>
@@ -18,7 +18,7 @@
18
  'aliases' =>
19
  array (
20
  ),
21
- 'reference' => '588f732082c5e996c3f81a115a24a6d4eedf0760',
22
  ),
23
  'collizo4sky/persist-admin-notices-dismissal' =>
24
  array (
6
  'aliases' =>
7
  array (
8
  ),
9
+ 'reference' => '224a4ea996906d92969576295f0ad2be38f29f01',
10
  'name' => '__root__',
11
  ),
12
  'versions' =>
18
  'aliases' =>
19
  array (
20
  ),
21
+ 'reference' => '224a4ea996906d92969576295f0ad2be38f29f01',
22
  ),
23
  'collizo4sky/persist-admin-notices-dismissal' =>
24
  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.1.3
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.1.3');
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.1.4
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.1.4');
18
 
19
  require __DIR__ . '/vendor/autoload.php';
20