Custom Login Page Customizer - Version 2.1.2

Version Description

  • Update immediately - compatible with 5.6 and bugfix release. Introducing New features and settings panel.

=

Download this release

Release Info

Developer hiddenpearls
Plugin Icon 128x128 Custom Login Page Customizer
Version 2.1.2
Comparing to
See all releases

Code changes from version 2.1.1 to 2.1.2

login-customizer.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Custom Login Page Customizer
4
  * Plugin URI: https://loginpress.pro/?utm_source=login-customizer-lite&utm_medium=plugin-url-link
5
  * Description: Custom Login Customizer plugin allows you to easily customize your login page straight from your WordPress Customizer! Awesome, right?
6
- * Version: 2.1.1
7
  * Requires at least: 5.0
8
  * Requires PHP: 5.6
9
  * Author: Hardeep Asrani
3
  * Plugin Name: Custom Login Page Customizer
4
  * Plugin URI: https://loginpress.pro/?utm_source=login-customizer-lite&utm_medium=plugin-url-link
5
  * Description: Custom Login Customizer plugin allows you to easily customize your login page straight from your WordPress Customizer! Awesome, right?
6
+ * Version: 2.1.2
7
  * Requires at least: 5.0
8
  * Requires PHP: 5.6
9
  * Author: Hardeep Asrani
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tested up to: 5.6
4
  Contributors: hardeepasrani, hiddenpearls
5
  Author URI: https://loginpress.pro/?utm_source=login-customizer-lite&utm_medium=author-url-link
6
  Tags: login, customizer, logo, login logo, login customizer, login page,admin, branding, customization, custom login, error, login error, custom login pro
7
- Stable tag: 2.1.1
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -46,11 +46,15 @@ Please visit <a target="_blank" rel="nofollow" href="https://loginpress.pro/?utm
46
 
47
  == Upgrade Notice ==
48
 
49
- = 2.1.1 =
50
  * Update immediately - compatible with 5.6 and bugfix release. Introducing New features and settings panel.
51
 
52
  == Changelog ==
53
 
 
 
 
 
54
  = 2.1.1 - 2021-01-27 =
55
  * New Feature: Introducing new Login Customizer settings page.
56
  * New Feature: Introducing "Remember Me" option already checked on login form.
4
  Contributors: hardeepasrani, hiddenpearls
5
  Author URI: https://loginpress.pro/?utm_source=login-customizer-lite&utm_medium=author-url-link
6
  Tags: login, customizer, logo, login logo, login customizer, login page,admin, branding, customization, custom login, error, login error, custom login pro
7
+ Stable tag: 2.1.2
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
46
 
47
  == Upgrade Notice ==
48
 
49
+ = 2.1.2 =
50
  * Update immediately - compatible with 5.6 and bugfix release. Introducing New features and settings panel.
51
 
52
  == Changelog ==
53
 
54
+ = 2.1.2 - 2021-02-20 =
55
+
56
+ * New Feature: Introducing new control for customizing privacy policy link on login page.
57
+
58
  = 2.1.1 - 2021-01-27 =
59
  * New Feature: Introducing new Login Customizer settings page.
60
  * New Feature: Introducing "Remember Me" option already checked on login form.
resources/css/style-review.css ADDED
@@ -0,0 +1,277 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .logincustomizer-review-notice{
2
+ padding: 15px 15px 15px 0;
3
+ background-color: #fff;
4
+ border-radius: 3px;
5
+ margin: 20px 20px 0 0;
6
+ border-left: 4px solid #5c55ff;
7
+ }
8
+ .logincustomizer-review-notice:after{
9
+ content: '';
10
+ display: table;
11
+ clear: both;
12
+ }
13
+ .logincustomizer-review-thumbnail{
14
+ width: 114px;
15
+ float: left;
16
+ line-height: 80px;
17
+ text-align: center;
18
+ border-right: 4px solid transparent;
19
+ }
20
+ .logincustomizer-review-thumbnail img{
21
+ width: 68px;
22
+ margin-top: 18px;
23
+ vertical-align: middle;
24
+ }
25
+ .logincustomizer-review-text{
26
+ overflow: hidden;
27
+ }
28
+ .logincustomizer-review-text h3{
29
+ font-size: 24px;
30
+ margin: 0 0 5px;
31
+ font-weight: 400;
32
+ line-height: 1.3;
33
+ }
34
+ .logincustomizer-review-text p{
35
+ font-size: 13px;
36
+ margin: 14px 0 15px;
37
+ }
38
+ .logincustomizer-review-ul{
39
+ margin: 0;
40
+ padding: 0;
41
+ }
42
+ .logincustomizer-review-ul li{
43
+ display: inline-block;
44
+ margin-right: 15px;
45
+ }
46
+ .logincustomizer-review-ul li a{
47
+ display: inline-block;
48
+ color: #10738B;
49
+ text-decoration: none;
50
+ padding-left: 26px;
51
+ position: relative;
52
+ }
53
+ .logincustomizer-review-ul li a span{
54
+ position: absolute;
55
+ left: 0;
56
+ top: -2px;
57
+ }
58
+ .logincustomizer-dasboard-pro-link{
59
+ color: #0cbb0c;
60
+ }
61
+
62
+ /* logincustomizer Add-ons CSS @since 1.1.3 */
63
+
64
+ .logincustomizer-alert-notice{
65
+ background: #fff;
66
+ margin: 20px 20px 0 0;
67
+ position: relative;
68
+ display: flex;
69
+ align-items: center;
70
+ clear: both;
71
+ }
72
+ .logincustomizer-alert-notice>*{
73
+ -webkit-box-sizing: border-box;
74
+ box-sizing: border-box;
75
+ }
76
+ .logincustomizer-alert-notice:after{
77
+ content: '';
78
+ display: table;
79
+ clear: both;
80
+ }
81
+ .logincustomizer-alert-thumbnail{
82
+ width: 300px;
83
+ text-align: center;
84
+ position: relative;
85
+ }
86
+ .logincustomizer-alert-thumbnail img{
87
+ width: 250px;
88
+ vertical-align: middle;
89
+ }
90
+ .logincustomizer-alert-text{
91
+ padding: 16px 80px 16px 80px;
92
+ overflow: hidden;
93
+ background: #1a5fa4;
94
+ position: relative;
95
+ flex: 1;
96
+ }
97
+ .black_friday_notic .logincustomizer-alert-text {
98
+ padding: 16px 10px 16px 80px;
99
+ }
100
+ .black_friday{
101
+ background: #000 !important;
102
+ text-align: center;
103
+ }
104
+ .black_friday:after{
105
+ display: none;
106
+ }
107
+ .black_friday_notic .logincustomizer-alert-text {
108
+ display: flex;
109
+ align-items: center;
110
+ }
111
+ .black_friday_notic .logincustomizer-alert-button-section {
112
+ width: 450px;
113
+ }
114
+ .logincustomizer-addon-notice-link:focus{
115
+ outline: none;
116
+ box-shadow: none;
117
+ }
118
+ .logincustomizer-alert-text:after{
119
+ width: 80px;
120
+ height: 100%;
121
+ background: #fff;
122
+ content: '';
123
+ position: absolute;
124
+ top: 0;
125
+ right: -40px;
126
+ transform: skewX(-20deg);
127
+ z-index: 1;
128
+ }
129
+ .logincustomizer-alert-text:before{
130
+ width: 80px;
131
+ height: 100%;
132
+ background: #fff;
133
+ content: '';
134
+ position: absolute;
135
+ top: 0;
136
+ left: -40px;
137
+ transform: skewX(-20deg);
138
+ z-index: 1;
139
+ }
140
+ .logincustomizer-alert-text h3{
141
+ font-size: 20px;
142
+ line-height: 24px;
143
+ margin: 0 0 10px;
144
+ color: #fff;
145
+ }
146
+ .logincustomizer-alert-text p{
147
+ font-size: 16px;
148
+ margin: 0;
149
+ color: #fff;
150
+ }
151
+ .black_friday_sale_btn .logincustomizer-alert-button {
152
+ display: inline-block;
153
+ padding: 24px 20px;
154
+ font-size: 38px;
155
+ background-color: #24afe9;
156
+ color: #000;
157
+ border-radius: 0px;
158
+ text-decoration: none;
159
+ font-weight: bold;
160
+ }
161
+ .logincustomizer-alert-button-section{
162
+ width: 300px;
163
+ text-align: center;
164
+ position: relative;
165
+ }
166
+ .logincustomizer-alert-button{
167
+ height: auto;
168
+ padding: 0;
169
+ color: #1a5fa4;
170
+ border: 0;
171
+ border-radius: 5px;
172
+ background: none;
173
+ font-size: 16px;
174
+ font-weight: bold;
175
+ text-decoration: underline;
176
+ cursor: pointer;
177
+ }
178
+ .logincustomizer-alert-button:focus{
179
+ outline: none;
180
+ box-shadow: none;
181
+ }
182
+ .wp-core-ui .logincustomizer-alert-notice.notice.is-dismissible{
183
+ padding: 0px;
184
+ border-left: 0px;
185
+ }
186
+ .logincustomizer-alert-notice .notice-dismiss{
187
+ text-decoration: none;
188
+ z-index: 1;
189
+ }
190
+ .logincustomizer-addon-notice-link{
191
+ display: flex;
192
+ align-items: center;
193
+ flex: 1;
194
+ text-decoration: none;
195
+ }
196
+ .logincustomizer-notice-logo{
197
+ width: 72px;
198
+ text-align: center;
199
+ position: relative;
200
+ margin: 10px;
201
+ }
202
+ .logincustomizer-notice-logo img{
203
+ width: 50px;
204
+ vertical-align: middle;
205
+ }
206
+
207
+ .logincustomizer-notice-discription{
208
+ overflow: hidden;
209
+ width: calc(100% - 50px);
210
+ }
211
+ .logincustomizer-notification.logincustomizer-notice-success{
212
+ border:1px solid #6ab074;
213
+ background: #e6f0e8;
214
+ margin: 36px 20px 0 0;
215
+ display: -webkit-box;
216
+ display: -ms-flexbox;
217
+ display: flex;
218
+ -webkit-box-align: center;
219
+ -ms-flex-align: center;
220
+ align-items: center;
221
+ }
222
+ .logincustomizer-notice-success .logincustomizer-notice-discription p{
223
+ color: #21573a;
224
+ }
225
+ .logincustomizer-notification.logincustomizer-notice-success .logincustomizer-notification-close:before{
226
+ color: #21573a;
227
+ }
228
+ @media screen and (max-width: 1300px) {
229
+ .logincustomizer-alert-thumbnail{
230
+ width: 200px;
231
+ }
232
+ .logincustomizer-alert-thumbnail img{
233
+ width: 170px;
234
+ }
235
+ .logincustomizer-alert-button-section{
236
+ width: 200px;
237
+ }
238
+ }
239
+ @media screen and (max-width: 1100px) {
240
+ .logincustomizer-alert-thumbnail{
241
+ display: none;
242
+ }
243
+ .logincustomizer-alert-thumbnail img{
244
+ width: 150px;
245
+ }
246
+ .logincustomizer-alert-text{
247
+ padding-left: 30px;
248
+ }
249
+ .logincustomizer-alert-text:before,.logincustomizer-alert-text:after{
250
+ display: none;
251
+ }
252
+ }
253
+ @media screen and (max-width: 782px) {
254
+ .logincustomizer-alert-text{
255
+ padding-right: 40px;
256
+ padding-bottom: 50px;
257
+ }
258
+ .logincustomizer-alert-button-section{
259
+ width: auto;
260
+ text-align: left;
261
+ }
262
+ .logincustomizer-alert-button-section{
263
+ position: absolute;
264
+ bottom: 20px;
265
+ left: 33px;
266
+ }
267
+ .logincustomizer-alert-button{
268
+ color: #fff;
269
+ }
270
+ .logincustomizer-alert-notice .notice-dismiss:before{
271
+ color: #fff;
272
+ }
273
+ .black_friday_sale_btn .logincustomizer-alert-button{
274
+ width: 310px;
275
+ text-align: center;
276
+ }
277
+ }
src/Customizer/Panel/Assets/JS/customizer-preview.js CHANGED
@@ -321,6 +321,23 @@
321
  });
322
  });
323
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
324
  wp.customize('login_customizer_options[logincust_field_lost_password]', function (value) {
325
  value.bind(function (newval) {
326
  if (newval === true) {
@@ -699,6 +716,11 @@
699
  .contents()
700
  .find(".login #nav a")
701
  .css({ 'color': newval });
 
 
 
 
 
702
  });
703
  });
704
 
@@ -706,7 +728,7 @@
706
  value.bind(function (newval) {
707
  $("#customize-preview iframe")
708
  .contents()
709
- .find('.login #backtoblog a').hover(function () {
710
  $(this).css({ 'color': newval });
711
  }, function () {
712
  $(this).css({ 'color': othercolor });
@@ -715,7 +737,7 @@
715
 
716
  $("#customize-preview iframe")
717
  .contents()
718
- .find('.login #nav a').hover(function () {
719
  $(this).css({ 'color': newval });
720
  }, function () {
721
  $(this).css({ 'color': othercolor });
321
  });
322
  });
323
 
324
+ wp.customize('login_customizer_options[logincust_privacy_policy_link]', function (value) {
325
+ value.bind(function (newval) {
326
+
327
+ if (newval === false) {
328
+ $("#customize-preview iframe")
329
+ .contents()
330
+ .find(".login .privacy-policy-page-link")
331
+ .css({ 'display': 'block' });
332
+ } else{
333
+ $("#customize-preview iframe")
334
+ .contents()
335
+ .find(".login .privacy-policy-page-link")
336
+ .css({ 'display': 'none' });
337
+ }
338
+ });
339
+ });
340
+
341
  wp.customize('login_customizer_options[logincust_field_lost_password]', function (value) {
342
  value.bind(function (newval) {
343
  if (newval === true) {
716
  .contents()
717
  .find(".login #nav a")
718
  .css({ 'color': newval });
719
+
720
+ $("#customize-preview iframe")
721
+ .contents()
722
+ .find(".privacy-policy-page-link a")
723
+ .css({ 'color': newval });
724
  });
725
  });
726
 
728
  value.bind(function (newval) {
729
  $("#customize-preview iframe")
730
  .contents()
731
+ .find('.login #backtoblog a, .login .privacy-policy-page-link a').hover(function () {
732
  $(this).css({ 'color': newval });
733
  }, function () {
734
  $(this).css({ 'color': othercolor });
737
 
738
  $("#customize-preview iframe")
739
  .contents()
740
+ .find('.login #nav a, .login .privacy-policy-page-link a').hover(function () {
741
  $(this).css({ 'color': newval });
742
  }, function () {
743
  $(this).css({ 'color': othercolor });
src/Customizer/Panel/Assets/JS/customizer.js CHANGED
@@ -161,6 +161,7 @@ var allOptions = [
161
  'login_customizer_options[logincust_form_shadow_spread]',
162
  'login_customizer_options[logincust_form_shadow]',
163
  'login_customizer_options[logincust_field_remember_me]',
 
164
  'login_customizer_options[logincust_field_width]',
165
  'login_customizer_options[logincust_field_font_size]',
166
  'login_customizer_options[logincust_field_border_width]',
@@ -218,6 +219,7 @@ var allValues = [
218
  '3px',
219
  'rgba(0,0,0, 0.13)',
220
  false,
 
221
  '100%',
222
  '24px',
223
  '1px',
161
  'login_customizer_options[logincust_form_shadow_spread]',
162
  'login_customizer_options[logincust_form_shadow]',
163
  'login_customizer_options[logincust_field_remember_me]',
164
+ 'login_customizer_options[logincust_privacy_policy_link]',
165
  'login_customizer_options[logincust_field_width]',
166
  'login_customizer_options[logincust_field_font_size]',
167
  'login_customizer_options[logincust_field_border_width]',
219
  '3px',
220
  'rgba(0,0,0, 0.13)',
221
  false,
222
+ false,
223
  '100%',
224
  '24px',
225
  '1px',
src/Customizer/Panel/Custom_Code.php CHANGED
@@ -109,7 +109,11 @@ namespace LoginCustomizer\Customizer\Panel;
109
  $custom_css .= 'display: none;';
110
  $custom_css .= '}';
111
  }
112
-
 
 
 
 
113
  // Register Link CSS
114
  if ( is_customize_preview() ) {
115
  if ( ! empty( $options['logincust_field_register_link'] ) && $options['logincust_field_register_link'] === 1 ) {
@@ -117,6 +121,11 @@ namespace LoginCustomizer\Customizer\Panel;
117
  $custom_css .= 'display: none;';
118
  $custom_css .= '}';
119
  }
 
 
 
 
 
120
  }
121
 
122
  // Lost Password Link CSS
@@ -237,12 +246,12 @@ namespace LoginCustomizer\Customizer\Panel;
237
  $custom_css .= '}';
238
  }
239
  if ( ! empty( $options['logincust_other_color'] ) ) {
240
- $custom_css .= '.login #nav, .login #nav a, .login #backtoblog a {';
241
  $custom_css .= 'color: ' . $options['logincust_other_color'] . ';';
242
  $custom_css .= '}';
243
  }
244
  if ( ! empty( $options['logincust_other_color_hover'] ) ) {
245
- $custom_css .= '.login #backtoblog a:hover, .login #nav a:hover {';
246
  $custom_css .= 'color: ' . $options['logincust_other_color_hover'] . ';';
247
  $custom_css .= '}';
248
  }
109
  $custom_css .= 'display: none;';
110
  $custom_css .= '}';
111
  }
112
+ if ( ! empty( $options['logincust_privacy_policy_link'] ) && $options['logincust_privacy_policy_link'] === 1 ) {
113
+ $custom_css .= '.login .privacy-policy-page-link {';
114
+ $custom_css .= 'display: none;';
115
+ $custom_css .= '}';
116
+ }
117
  // Register Link CSS
118
  if ( is_customize_preview() ) {
119
  if ( ! empty( $options['logincust_field_register_link'] ) && $options['logincust_field_register_link'] === 1 ) {
121
  $custom_css .= 'display: none;';
122
  $custom_css .= '}';
123
  }
124
+ if ( ! empty( $options['logincust_privacy_policy_link'] ) && $options['logincust_privacy_policy_link'] === 1 ) {
125
+ $custom_css .= '.login .privacy-policy-page-link {';
126
+ $custom_css .= 'display: none;';
127
+ $custom_css .= '}';
128
+ }
129
  }
130
 
131
  // Lost Password Link CSS
246
  $custom_css .= '}';
247
  }
248
  if ( ! empty( $options['logincust_other_color'] ) ) {
249
+ $custom_css .= '.login #nav, .login #nav a, .login #backtoblog a, .login .privacy-policy-page-link a {';
250
  $custom_css .= 'color: ' . $options['logincust_other_color'] . ';';
251
  $custom_css .= '}';
252
  }
253
  if ( ! empty( $options['logincust_other_color_hover'] ) ) {
254
+ $custom_css .= '.login #backtoblog a:hover, .login #nav a:hover, .login .privacy-policy-page-link a:hover {';
255
  $custom_css .= 'color: ' . $options['logincust_other_color_hover'] . ';';
256
  $custom_css .= '}';
257
  }
src/Includes/Notification.php ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Handling all the Notification calls in Login Customizer.
4
+ *
5
+ * @package LoginCustomizer
6
+ * @author WPBrigade
7
+ * @copyright Copyright (c) 2021, WPBrigade
8
+ * @link https://loginpress.pro/
9
+ * @license https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
10
+ * @since 2.1.2
11
+ *
12
+ */
13
+
14
+
15
+ namespace LoginCustomizer\Includes;
16
+
17
+ class Notification {
18
+
19
+ /** * * * * * * * *
20
+ * Class constructor
21
+ * * * * * * * * * */
22
+ public function __construct() {
23
+
24
+ $this->_hooks();
25
+ }
26
+
27
+
28
+ /**
29
+ * Hook into actions and filters
30
+ * @version 2.1.2
31
+ */
32
+ private function _hooks() {
33
+
34
+ add_action( 'admin_init', array( $this, 'logincustomizer_review_notice' ) );
35
+ }
36
+
37
+ /**
38
+ * Ask users to review our plugin on WordPress.org
39
+ *
40
+ * @return boolean false
41
+ * @since 2.1.2
42
+ */
43
+ public function logincustomizer_review_notice() {
44
+
45
+ $this->logincustomizer_review_dismissal();
46
+ $this->logincustomizer_review_pending();
47
+
48
+ $activation_time = get_site_option( 'logincustomizer_active_time' );
49
+ $review_dismissal = get_site_option( 'logincustomizer_review_dismiss' );
50
+
51
+ if ( 'yes' == $review_dismissal ) return;
52
+
53
+ if ( ! $activation_time ) :
54
+
55
+ $activation_time = time();
56
+ add_site_option( 'logincustomizer_active_time', $activation_time );
57
+
58
+ endif;
59
+
60
+ // 604800 = 7 Days in seconds.
61
+ if ( time() - $activation_time > 604800 ) :
62
+
63
+ wp_enqueue_style( 'logincustomizer_notification', LOGINCUST_FREE_RESOURCES . '/css/style-review.css', array(), LOGINCUST_FREE_VERSION );
64
+ add_action( 'admin_notices' , array( $this, 'logincustomizer_review_notice_message' ) );
65
+
66
+ endif;
67
+
68
+ }
69
+
70
+
71
+ /**
72
+ * Check and Dismiss review message.
73
+ *
74
+ * @since 2.1.2
75
+ */
76
+ private function logincustomizer_review_dismissal() {
77
+
78
+ if ( ! is_admin() ||
79
+ ! current_user_can( 'manage_options' ) ||
80
+ ! isset( $_GET['_wpnonce'] ) ||
81
+ ! wp_verify_nonce( sanitize_key( wp_unslash( $_GET['_wpnonce'] ) ), 'logincustomizer-review-nonce' ) ||
82
+ ! isset( $_GET['logincustomizer_review_dismiss'] ) ) :
83
+
84
+ return;
85
+ endif;
86
+
87
+ add_site_option( 'logincustomizer_review_dismiss', 'yes' );
88
+ }
89
+
90
+ /**
91
+ * Set time to current so review notice will popup after 14 days
92
+ *
93
+ * @since 2.1.2
94
+ */
95
+ function logincustomizer_review_pending() {
96
+
97
+ if ( ! is_admin() ||
98
+ ! current_user_can( 'manage_options' ) ||
99
+ ! isset( $_GET['_wpnonce'] ) ||
100
+ ! wp_verify_nonce( sanitize_key( wp_unslash( $_GET['_wpnonce'] ) ), 'logincustomizer-review-nonce' ) ||
101
+ ! isset( $_GET['logincustomizer_review_later'] ) ) :
102
+
103
+ return;
104
+ endif;
105
+
106
+ // Reset Time to current time.
107
+ update_site_option( 'logincustomizer_active_time', time() );
108
+ }
109
+
110
+ /**
111
+ * Review notice message
112
+ *
113
+ * @since 2.1.2
114
+ */
115
+ public function logincustomizer_review_notice_message() {
116
+
117
+ $scheme = ( wp_parse_url( $_SERVER['REQUEST_URI'], PHP_URL_QUERY ) ) ? '&' : '?';
118
+ $url = $_SERVER['REQUEST_URI'] . $scheme . 'logincustomizer_review_dismiss=yes';
119
+ $dismiss_url = wp_nonce_url( $url, 'logincustomizer-review-nonce' );
120
+
121
+ $_later_link = $_SERVER['REQUEST_URI'] . $scheme . 'logincustomizer_review_later=yes';
122
+ $later_url = wp_nonce_url( $_later_link, 'logincustomizer-review-nonce' ); ?>
123
+
124
+ <div class="logincustomizer-review-notice">
125
+ <div class="logincustomizer-review-thumbnail">
126
+ <img src="<?php echo LOGINCUST_FREE_URL.'Settings/Assets/logincust-settings-icon.png' ?>" alt="">
127
+ </div>
128
+ <div class="logincustomizer-review-text">
129
+ <h3><?php _e( 'Leave A Review?', 'login-customizer' ) ?></h3>
130
+ <p><?php _e( 'We hope you\'ve enjoyed using Login Customizer! Would you consider leaving us a review on WordPress.org?', 'login-customizer' ) ?></p>
131
+ <ul class="logincustomizer-review-ul">
132
+ <li>
133
+ <a href="https://wordpress.org/support/view/plugin-reviews/login-customizer?rate=5#postform" target="_blank"><span class="dashicons dashicons-external"></span><?php _e( 'Sure! I\'d love to!', 'login-customizer' ) ?></a>
134
+ </li>
135
+ <li>
136
+ <a href="<?php echo $dismiss_url ?>">
137
+ <span class="dashicons dashicons-smiley"></span>
138
+ <?php _e( 'I\'ve already left a review', 'login-customizer' ) ?>
139
+ </a>
140
+ </li>
141
+ <li>
142
+ <a href="<?php echo $later_url ?>">
143
+ <span class="dashicons dashicons-calendar-alt"></span>
144
+ <?php _e( 'Maybe Later', 'login-customizer' ) ?>
145
+ </a>
146
+ </li>
147
+ <li>
148
+ <a href="<?php echo $dismiss_url ?>">
149
+ <span class="dashicons dashicons-dismiss"></span>
150
+ <?php _e( 'Never show again', 'login-customizer' ) ?>
151
+ </a>
152
+ </li>
153
+ </ul>
154
+ </div>
155
+ </div>
156
+ <?php
157
+ }
158
+ }
src/Plugin.php CHANGED
@@ -14,11 +14,11 @@ namespace LoginCustomizer;
14
 
15
  use LoginCustomizer\Essentials;
16
  use LoginCustomizer\Includes\Plugin_Meta;
 
17
  use LoginCustomizer\Settings\Setup;
18
  use LoginCustomizer\Customizer\Create_Customizer;
19
  use LoginCustomizer\Settings\Features\Login_Order;
20
  use LoginCustomizer\Settings\Features\Custom_Register_Password;
21
-
22
  /**
23
  * Constant class.
24
  *
@@ -56,10 +56,10 @@ class Plugin {
56
  /**
57
  * Settings
58
  */
59
-
60
- $logincust_setting = get_option( 'logincust_setting' );
61
- $login_order = isset( $logincust_setting['login_order'] ) ? $logincust_setting['login_order'] : '';
62
- $enable_reg_pass_field = isset( $logincust_setting['enable_reg_pass_field'] ) ? $logincust_setting['enable_reg_pass_field'] : 'off';
63
 
64
 
65
  //Custom Register Fields if option is enbled from Login Customizer and WordPress Settings
14
 
15
  use LoginCustomizer\Essentials;
16
  use LoginCustomizer\Includes\Plugin_Meta;
17
+ use LoginCustomizer\Includes\Notification;
18
  use LoginCustomizer\Settings\Setup;
19
  use LoginCustomizer\Customizer\Create_Customizer;
20
  use LoginCustomizer\Settings\Features\Login_Order;
21
  use LoginCustomizer\Settings\Features\Custom_Register_Password;
 
22
  /**
23
  * Constant class.
24
  *
56
  /**
57
  * Settings
58
  */
59
+ new Notification();
60
+ $logincust_setting = get_option( 'logincust_setting' );
61
+ $login_order = isset( $logincust_setting['login_order'] ) ? $logincust_setting['login_order'] : '';
62
+ $enable_reg_pass_field = isset( $logincust_setting['enable_reg_pass_field'] ) ? $logincust_setting['enable_reg_pass_field'] : 'off';
63
 
64
 
65
  //Custom Register Fields if option is enbled from Login Customizer and WordPress Settings