Version Description
- Compatibility with WP 5.9.
- Pro: Added LearnDash Enrolled Course and User Group redirect conditions.
- Pro: Added WooCommerce Purchased Product, Purchased Product Category, Active User Subscription, Active Membership Plan redirect conditions.
- Pro: Added MemberPress Subscribed Membership redirect condition.
- Pro: Added Restrict Content Pro Has Membership redirect condition.
- Pro: Added LifterLMS Enrolled Course and Enrolled Membership redirect conditions.
See the changelog file for full changelog information.
Download this release
Release Info
Developer | Collizo4sky |
Plugin | Peter’s Login Redirect |
Version | 3.0.0.6 |
Comparing to | |
See all releases |
Code changes from version 3.0.0.5 to 3.0.0.6
- changelog.txt +8 -0
- languages/peters-login-redirect.pot +116 -69
- readme.txt +9 -26
- src/core/assets/css/admin.css +10 -0
- src/core/src/Admin/AbstractSettingsPage.php +1 -1
- src/core/src/Admin/Admin.php +9 -4
- src/core/src/Admin/RedirectWPList.php +13 -15
- src/core/src/Admin/RedirectionsPage.php +21 -0
- src/core/src/Admin/views/include.view.php +17 -0
- src/core/src/Admin/views/view.condition-rule.php +18 -5
- src/core/src/Admin/views/view.pro-conditions.php +37 -0
- src/core/src/Core.php +5 -1
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +4 -4
- vendor/composer/installed.json +7 -7
- vendor/composer/installed.php +5 -5
- wplogin_redirect.php +2 -2
changelog.txt
CHANGED
@@ -1,5 +1,13 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 3.0.0.5 =
|
4 |
* Added escaping to url fields in redirection UI
|
5 |
* Added https://yoursite.tld/?loginwp_link_redirect=true for triggering login redirection.
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 3.0.0.6 =
|
4 |
+
* Compatibility with WP 5.9.
|
5 |
+
* Pro: Added [LearnDash](https://loginwp.com/?utm_source=wprepo&utm_medium=changelog&utm_campaign=3006#pro-conditions) Enrolled Course and User Group redirect conditions.
|
6 |
+
* Pro: Added [WooCommerce](https://loginwp.com/?utm_source=wprepo&utm_medium=changelog&utm_campaign=3006#pro-conditions) Purchased Product, Purchased Product Category, Active User Subscription, Active Membership Plan redirect conditions.
|
7 |
+
* Pro: Added [MemberPress](https://loginwp.com/?utm_source=wprepo&utm_medium=changelog&utm_campaign=3006#pro-conditions) Subscribed Membership redirect condition.
|
8 |
+
* Pro: Added [Restrict Content Pro](https://loginwp.com/?utm_source=wprepo&utm_medium=changelog&utm_campaign=3006#pro-conditions) Has Membership redirect condition.
|
9 |
+
* Pro: Added [LifterLMS](https://loginwp.com/?utm_source=wprepo&utm_medium=changelog&utm_campaign=3006#pro-conditions) Enrolled Course and Enrolled Membership redirect conditions.
|
10 |
+
|
11 |
= 3.0.0.5 =
|
12 |
* Added escaping to url fields in redirection UI
|
13 |
* Added https://yoursite.tld/?loginwp_link_redirect=true for triggering login redirection.
|
languages/peters-login-redirect.pot
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
# This file is distributed under the same license as the LoginWP (Formerly Peter's Login Redirect) package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: LoginWP (Formerly Peter's Login Redirect) 3.0.0.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/peters-login-"
|
7 |
"redirect\n"
|
8 |
-
"POT-Creation-Date: 2021-11-
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -52,6 +52,7 @@ msgid "Redirect to currently viewing page"
|
|
52 |
msgstr ""
|
53 |
|
54 |
#: src/core/src/Admin/AbstractSettingsPage.php:138
|
|
|
55 |
msgid "Get LoginWP Pro →"
|
56 |
msgstr ""
|
57 |
|
@@ -81,52 +82,52 @@ msgstr ""
|
|
81 |
msgid "LoginWP"
|
82 |
msgstr ""
|
83 |
|
84 |
-
#: src/core/src/Admin/Admin.php:
|
85 |
msgid "Are you sure?"
|
86 |
msgstr ""
|
87 |
|
88 |
-
#: src/core/src/Admin/Admin.php:
|
89 |
msgid ""
|
90 |
"Thank you for using LoginWP. Please rate the plugin %1$s on %2$sWordPress.org"
|
91 |
"%3$s to help us spread the word."
|
92 |
msgstr ""
|
93 |
|
94 |
-
#: src/core/src/Admin/Admin.php:
|
95 |
#: src/core/src/Admin/SettingsPage.php:35
|
96 |
msgid "Settings"
|
97 |
msgstr ""
|
98 |
|
99 |
-
#: src/core/src/Admin/Admin.php:
|
100 |
msgid "Go Premium"
|
101 |
msgstr ""
|
102 |
|
103 |
-
#: src/core/src/Admin/Admin.php:
|
104 |
msgid "View LoginWP documentation"
|
105 |
msgstr ""
|
106 |
|
107 |
-
#: src/core/src/Admin/Admin.php:
|
108 |
msgid "Docs"
|
109 |
msgstr ""
|
110 |
|
111 |
-
#: src/core/src/Admin/Admin.php:
|
112 |
msgid "Visit customer support"
|
113 |
msgstr ""
|
114 |
|
115 |
-
#: src/core/src/Admin/Admin.php:
|
116 |
msgid "Support"
|
117 |
msgstr ""
|
118 |
|
119 |
-
#: src/core/src/Admin/Admin.php:
|
120 |
msgid "Upgrade to PRO"
|
121 |
msgstr ""
|
122 |
|
123 |
-
#: src/core/src/Admin/Admin.php:
|
124 |
msgid ""
|
125 |
"Important news! %1$sPeters Login Redirect%2$s has been rebranded to "
|
126 |
"%1$sLoginWP%2$s with a new UI. %3$sCheck It Out%5$s | %4$sDismiss Notice%5$s"
|
127 |
msgstr ""
|
128 |
|
129 |
-
#: src/core/src/Admin/Admin.php:
|
130 |
msgid ""
|
131 |
"Hey, I noticed you have been using LoginWP (Formerly Peter's Login Redirect) "
|
132 |
"for a while now - that's awesome! Could you please do me a BIG favor and "
|
@@ -134,11 +135,11 @@ msgid ""
|
|
134 |
"word and boost our motivation - thanks!"
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: src/core/src/Admin/Admin.php:
|
138 |
msgid "Sure! I'd love to give a review"
|
139 |
msgstr ""
|
140 |
|
141 |
-
#: src/core/src/Admin/Admin.php:
|
142 |
msgid "Dismiss"
|
143 |
msgstr ""
|
144 |
|
@@ -340,145 +341,150 @@ msgstr ""
|
|
340 |
msgid "loginwp_redirects"
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: src/core/src/Admin/RedirectWPList.php:
|
344 |
-
#: src/core/src/Admin/RedirectionsPage.php:66
|
345 |
-
msgid "Username"
|
346 |
-
msgstr ""
|
347 |
-
|
348 |
-
#: src/core/src/Admin/RedirectWPList.php:37
|
349 |
-
#: src/core/src/Admin/RedirectionsPage.php:72
|
350 |
-
msgid "User Role"
|
351 |
-
msgstr ""
|
352 |
-
|
353 |
-
#: src/core/src/Admin/RedirectWPList.php:38
|
354 |
-
#: src/core/src/Admin/RedirectionsPage.php:78
|
355 |
-
msgid "User Capability"
|
356 |
-
msgstr ""
|
357 |
-
|
358 |
-
#: src/core/src/Admin/RedirectWPList.php:95
|
359 |
msgid "No redirection rule found. %sConsider creating one%s"
|
360 |
msgstr ""
|
361 |
|
362 |
-
#: src/core/src/Admin/RedirectWPList.php:
|
363 |
-
#: src/core/src/Admin/RedirectWPList.php:
|
364 |
msgid "[Not Set]"
|
365 |
msgstr ""
|
366 |
|
367 |
-
#: src/core/src/Admin/RedirectWPList.php:
|
368 |
msgid "Edit"
|
369 |
msgstr ""
|
370 |
|
371 |
-
#: src/core/src/Admin/RedirectWPList.php:
|
372 |
-
#: src/core/src/Admin/RedirectWPList.php:
|
373 |
-
#: src/core/src/Admin/views/include.view.php:
|
374 |
msgid "Delete"
|
375 |
msgstr ""
|
376 |
|
377 |
-
#: src/core/src/Admin/RedirectWPList.php:
|
378 |
#: src/core/src/Admin/views/view.redirect-urls.php:18
|
379 |
msgid "Login URL"
|
380 |
msgstr ""
|
381 |
|
382 |
-
#: src/core/src/Admin/RedirectWPList.php:
|
383 |
#: src/core/src/Admin/views/view.redirect-urls.php:26
|
384 |
msgid "Logout URL"
|
385 |
msgstr ""
|
386 |
|
387 |
-
#: src/core/src/Admin/RedirectWPList.php:
|
388 |
msgid "Condition"
|
389 |
msgstr ""
|
390 |
|
391 |
-
#: src/core/src/Admin/RedirectWPList.php:
|
392 |
msgid "Condition Value"
|
393 |
msgstr ""
|
394 |
|
395 |
-
#: src/core/src/Admin/RedirectionsPage.php:
|
396 |
msgid "Redirections - LoginWP"
|
397 |
msgstr ""
|
398 |
|
399 |
-
#: src/core/src/Admin/RedirectionsPage.php:
|
400 |
msgid "Redirection "
|
401 |
msgstr ""
|
402 |
|
403 |
-
#: src/core/src/Admin/RedirectionsPage.php:
|
404 |
msgid "Redirections"
|
405 |
msgstr ""
|
406 |
|
407 |
-
#: src/core/src/Admin/RedirectionsPage.php:
|
408 |
-
#: src/core/src/Admin/RedirectionsPage.php:
|
409 |
msgid "Rules"
|
410 |
msgstr ""
|
411 |
|
412 |
-
#: src/core/src/Admin/RedirectionsPage.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
413 |
msgid "Add New"
|
414 |
msgstr ""
|
415 |
|
416 |
-
#: src/core/src/Admin/RedirectionsPage.php:
|
417 |
msgid "Go Back"
|
418 |
msgstr ""
|
419 |
|
420 |
-
#: src/core/src/Admin/RedirectionsPage.php:
|
421 |
msgid "Redirection Rules"
|
422 |
msgstr ""
|
423 |
|
424 |
-
#: src/core/src/Admin/RedirectionsPage.php:
|
425 |
msgid "Select..."
|
426 |
msgstr ""
|
427 |
|
428 |
-
#: src/core/src/Admin/RedirectionsPage.php:
|
429 |
msgid "Redirect rule saved successfully"
|
430 |
msgstr ""
|
431 |
|
432 |
-
#: src/core/src/Admin/RedirectionsPage.php:
|
433 |
msgid "Changes saved"
|
434 |
msgstr ""
|
435 |
|
436 |
-
#: src/core/src/Admin/RedirectionsPage.php:
|
437 |
msgid "Redirect rule deleted"
|
438 |
msgstr ""
|
439 |
|
440 |
-
#: src/core/src/Admin/RedirectionsPage.php:
|
|
|
|
|
|
|
|
|
441 |
msgid "ERROR: No Login or Logout URL specified"
|
442 |
msgstr ""
|
443 |
|
444 |
-
#: src/core/src/Admin/RedirectionsPage.php:
|
445 |
msgid "ERROR: Non-existent username submitted"
|
446 |
msgstr ""
|
447 |
|
448 |
-
#: src/core/src/Admin/RedirectionsPage.php:
|
449 |
msgid "ERROR: Non-existent role submitted"
|
450 |
msgstr ""
|
451 |
|
452 |
-
#: src/core/src/Admin/RedirectionsPage.php:
|
453 |
msgid "ERROR: Non-existent level submitted"
|
454 |
msgstr ""
|
455 |
|
456 |
-
#: src/core/src/Admin/RedirectionsPage.php:
|
457 |
msgid "ERROR: Unknown error editing redirect rule"
|
458 |
msgstr ""
|
459 |
|
460 |
-
#: src/core/src/Admin/RedirectionsPage.php:
|
461 |
msgid "ERROR: Unknown error when adding the redirect rule"
|
462 |
msgstr ""
|
463 |
|
464 |
-
#: src/core/src/Admin/RedirectionsPage.php:
|
465 |
-
#: src/core/src/Admin/RedirectionsPage.php:
|
466 |
msgid "ERROR: Unknown problem updating URL"
|
467 |
msgstr ""
|
468 |
|
469 |
-
#: src/core/src/Admin/RedirectionsPage.php:
|
470 |
msgid "Username of user"
|
471 |
msgstr ""
|
472 |
|
473 |
-
#: src/core/src/Admin/RedirectionsPage.php:
|
474 |
msgid "Author URL slug or user nicename"
|
475 |
msgstr ""
|
476 |
|
477 |
-
#: src/core/src/Admin/RedirectionsPage.php:
|
478 |
msgid "Website URL"
|
479 |
msgstr ""
|
480 |
|
481 |
-
#: src/core/src/Admin/RedirectionsPage.php:
|
482 |
msgid ""
|
483 |
"With %sLoginWP PRO%s, you can redirect users to the current page they are "
|
484 |
"logging in from or back to the previous (referrer) page after login."
|
@@ -531,7 +537,11 @@ msgstr ""
|
|
531 |
msgid "Redirect URLs"
|
532 |
msgstr ""
|
533 |
|
534 |
-
#: src/core/src/Admin/views/include.view.php:
|
|
|
|
|
|
|
|
|
535 |
msgid "Save Rule"
|
536 |
msgstr ""
|
537 |
|
@@ -590,10 +600,47 @@ msgstr ""
|
|
590 |
msgid "Select a condition"
|
591 |
msgstr ""
|
592 |
|
593 |
-
#: src/core/src/Admin/views/view.condition-rule.php:
|
594 |
msgid "Order"
|
595 |
msgstr ""
|
596 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
597 |
#: src/core/src/Functions.php:17
|
598 |
msgid "Register"
|
599 |
msgstr ""
|
@@ -624,9 +671,9 @@ msgstr ""
|
|
624 |
msgid "LoginWP (Formerly Peter's Login Redirect)"
|
625 |
msgstr ""
|
626 |
|
627 |
-
#. #-#-#-#-# peters-login-redirect.pot (LoginWP (Formerly Peter's Login Redirect) 3.0.0.
|
628 |
#. Plugin URI of the plugin/theme
|
629 |
-
#. #-#-#-#-# peters-login-redirect.pot (LoginWP (Formerly Peter's Login Redirect) 3.0.0.
|
630 |
#. Author URI of the plugin/theme
|
631 |
msgid "https://loginwp.com"
|
632 |
msgstr ""
|
2 |
# This file is distributed under the same license as the LoginWP (Formerly Peter's Login Redirect) package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: LoginWP (Formerly Peter's Login Redirect) 3.0.0.6\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/peters-login-"
|
7 |
"redirect\n"
|
8 |
+
"POT-Creation-Date: 2021-11-19 19:56:28+00:00\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
52 |
msgstr ""
|
53 |
|
54 |
#: src/core/src/Admin/AbstractSettingsPage.php:138
|
55 |
+
#: src/core/src/Admin/views/view.pro-conditions.php:34
|
56 |
msgid "Get LoginWP Pro →"
|
57 |
msgstr ""
|
58 |
|
82 |
msgid "LoginWP"
|
83 |
msgstr ""
|
84 |
|
85 |
+
#: src/core/src/Admin/Admin.php:89
|
86 |
msgid "Are you sure?"
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: src/core/src/Admin/Admin.php:112
|
90 |
msgid ""
|
91 |
"Thank you for using LoginWP. Please rate the plugin %1$s on %2$sWordPress.org"
|
92 |
"%3$s to help us spread the word."
|
93 |
msgstr ""
|
94 |
|
95 |
+
#: src/core/src/Admin/Admin.php:133 src/core/src/Admin/SettingsPage.php:29
|
96 |
#: src/core/src/Admin/SettingsPage.php:35
|
97 |
msgid "Settings"
|
98 |
msgstr ""
|
99 |
|
100 |
+
#: src/core/src/Admin/Admin.php:139 src/core/src/Admin/Admin.php:165
|
101 |
msgid "Go Premium"
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: src/core/src/Admin/Admin.php:159
|
105 |
msgid "View LoginWP documentation"
|
106 |
msgstr ""
|
107 |
|
108 |
+
#: src/core/src/Admin/Admin.php:159
|
109 |
msgid "Docs"
|
110 |
msgstr ""
|
111 |
|
112 |
+
#: src/core/src/Admin/Admin.php:160
|
113 |
msgid "Visit customer support"
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: src/core/src/Admin/Admin.php:160
|
117 |
msgid "Support"
|
118 |
msgstr ""
|
119 |
|
120 |
+
#: src/core/src/Admin/Admin.php:165 src/core/src/Admin/RedirectionsPage.php:470
|
121 |
msgid "Upgrade to PRO"
|
122 |
msgstr ""
|
123 |
|
124 |
+
#: src/core/src/Admin/Admin.php:183
|
125 |
msgid ""
|
126 |
"Important news! %1$sPeters Login Redirect%2$s has been rebranded to "
|
127 |
"%1$sLoginWP%2$s with a new UI. %3$sCheck It Out%5$s | %4$sDismiss Notice%5$s"
|
128 |
msgstr ""
|
129 |
|
130 |
+
#: src/core/src/Admin/Admin.php:213
|
131 |
msgid ""
|
132 |
"Hey, I noticed you have been using LoginWP (Formerly Peter's Login Redirect) "
|
133 |
"for a while now - that's awesome! Could you please do me a BIG favor and "
|
135 |
"word and boost our motivation - thanks!"
|
136 |
msgstr ""
|
137 |
|
138 |
+
#: src/core/src/Admin/Admin.php:217
|
139 |
msgid "Sure! I'd love to give a review"
|
140 |
msgstr ""
|
141 |
|
142 |
+
#: src/core/src/Admin/Admin.php:219
|
143 |
msgid "Dismiss"
|
144 |
msgstr ""
|
145 |
|
341 |
msgid "loginwp_redirects"
|
342 |
msgstr ""
|
343 |
|
344 |
+
#: src/core/src/Admin/RedirectWPList.php:82
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
345 |
msgid "No redirection rule found. %sConsider creating one%s"
|
346 |
msgstr ""
|
347 |
|
348 |
+
#: src/core/src/Admin/RedirectWPList.php:136
|
349 |
+
#: src/core/src/Admin/RedirectWPList.php:159
|
350 |
msgid "[Not Set]"
|
351 |
msgstr ""
|
352 |
|
353 |
+
#: src/core/src/Admin/RedirectWPList.php:141
|
354 |
msgid "Edit"
|
355 |
msgstr ""
|
356 |
|
357 |
+
#: src/core/src/Admin/RedirectWPList.php:142
|
358 |
+
#: src/core/src/Admin/RedirectWPList.php:252
|
359 |
+
#: src/core/src/Admin/views/include.view.php:61
|
360 |
msgid "Delete"
|
361 |
msgstr ""
|
362 |
|
363 |
+
#: src/core/src/Admin/RedirectWPList.php:221
|
364 |
#: src/core/src/Admin/views/view.redirect-urls.php:18
|
365 |
msgid "Login URL"
|
366 |
msgstr ""
|
367 |
|
368 |
+
#: src/core/src/Admin/RedirectWPList.php:222
|
369 |
#: src/core/src/Admin/views/view.redirect-urls.php:26
|
370 |
msgid "Logout URL"
|
371 |
msgstr ""
|
372 |
|
373 |
+
#: src/core/src/Admin/RedirectWPList.php:223
|
374 |
msgid "Condition"
|
375 |
msgstr ""
|
376 |
|
377 |
+
#: src/core/src/Admin/RedirectWPList.php:224
|
378 |
msgid "Condition Value"
|
379 |
msgstr ""
|
380 |
|
381 |
+
#: src/core/src/Admin/RedirectionsPage.php:33
|
382 |
msgid "Redirections - LoginWP"
|
383 |
msgstr ""
|
384 |
|
385 |
+
#: src/core/src/Admin/RedirectionsPage.php:36
|
386 |
msgid "Redirection "
|
387 |
msgstr ""
|
388 |
|
389 |
+
#: src/core/src/Admin/RedirectionsPage.php:42
|
390 |
msgid "Redirections"
|
391 |
msgstr ""
|
392 |
|
393 |
+
#: src/core/src/Admin/RedirectionsPage.php:58
|
394 |
+
#: src/core/src/Admin/RedirectionsPage.php:114
|
395 |
msgid "Rules"
|
396 |
msgstr ""
|
397 |
|
398 |
+
#: src/core/src/Admin/RedirectionsPage.php:66
|
399 |
+
msgid "Standard"
|
400 |
+
msgstr ""
|
401 |
+
|
402 |
+
#: src/core/src/Admin/RedirectionsPage.php:76
|
403 |
+
msgid "Username"
|
404 |
+
msgstr ""
|
405 |
+
|
406 |
+
#: src/core/src/Admin/RedirectionsPage.php:83
|
407 |
+
msgid "User Role"
|
408 |
+
msgstr ""
|
409 |
+
|
410 |
+
#: src/core/src/Admin/RedirectionsPage.php:90
|
411 |
+
msgid "User Capability"
|
412 |
+
msgstr ""
|
413 |
+
|
414 |
+
#: src/core/src/Admin/RedirectionsPage.php:129
|
415 |
msgid "Add New"
|
416 |
msgstr ""
|
417 |
|
418 |
+
#: src/core/src/Admin/RedirectionsPage.php:133
|
419 |
msgid "Go Back"
|
420 |
msgstr ""
|
421 |
|
422 |
+
#: src/core/src/Admin/RedirectionsPage.php:146
|
423 |
msgid "Redirection Rules"
|
424 |
msgstr ""
|
425 |
|
426 |
+
#: src/core/src/Admin/RedirectionsPage.php:202
|
427 |
msgid "Select..."
|
428 |
msgstr ""
|
429 |
|
430 |
+
#: src/core/src/Admin/RedirectionsPage.php:245
|
431 |
msgid "Redirect rule saved successfully"
|
432 |
msgstr ""
|
433 |
|
434 |
+
#: src/core/src/Admin/RedirectionsPage.php:248
|
435 |
msgid "Changes saved"
|
436 |
msgstr ""
|
437 |
|
438 |
+
#: src/core/src/Admin/RedirectionsPage.php:257
|
439 |
msgid "Redirect rule deleted"
|
440 |
msgstr ""
|
441 |
|
442 |
+
#: src/core/src/Admin/RedirectionsPage.php:274
|
443 |
+
msgid "ERROR: Condition value not specified"
|
444 |
+
msgstr ""
|
445 |
+
|
446 |
+
#: src/core/src/Admin/RedirectionsPage.php:278
|
447 |
msgid "ERROR: No Login or Logout URL specified"
|
448 |
msgstr ""
|
449 |
|
450 |
+
#: src/core/src/Admin/RedirectionsPage.php:282
|
451 |
msgid "ERROR: Non-existent username submitted"
|
452 |
msgstr ""
|
453 |
|
454 |
+
#: src/core/src/Admin/RedirectionsPage.php:286
|
455 |
msgid "ERROR: Non-existent role submitted"
|
456 |
msgstr ""
|
457 |
|
458 |
+
#: src/core/src/Admin/RedirectionsPage.php:290
|
459 |
msgid "ERROR: Non-existent level submitted"
|
460 |
msgstr ""
|
461 |
|
462 |
+
#: src/core/src/Admin/RedirectionsPage.php:323
|
463 |
msgid "ERROR: Unknown error editing redirect rule"
|
464 |
msgstr ""
|
465 |
|
466 |
+
#: src/core/src/Admin/RedirectionsPage.php:347
|
467 |
msgid "ERROR: Unknown error when adding the redirect rule"
|
468 |
msgstr ""
|
469 |
|
470 |
+
#: src/core/src/Admin/RedirectionsPage.php:378
|
471 |
+
#: src/core/src/Admin/RedirectionsPage.php:401
|
472 |
msgid "ERROR: Unknown problem updating URL"
|
473 |
msgstr ""
|
474 |
|
475 |
+
#: src/core/src/Admin/RedirectionsPage.php:448
|
476 |
msgid "Username of user"
|
477 |
msgstr ""
|
478 |
|
479 |
+
#: src/core/src/Admin/RedirectionsPage.php:449
|
480 |
msgid "Author URL slug or user nicename"
|
481 |
msgstr ""
|
482 |
|
483 |
+
#: src/core/src/Admin/RedirectionsPage.php:450
|
484 |
msgid "Website URL"
|
485 |
msgstr ""
|
486 |
|
487 |
+
#: src/core/src/Admin/RedirectionsPage.php:465
|
488 |
msgid ""
|
489 |
"With %sLoginWP PRO%s, you can redirect users to the current page they are "
|
490 |
"logging in from or back to the previous (referrer) page after login."
|
537 |
msgid "Redirect URLs"
|
538 |
msgstr ""
|
539 |
|
540 |
+
#: src/core/src/Admin/views/include.view.php:40
|
541 |
+
msgid "Available Pro Conditions %sUpgrade Now%s"
|
542 |
+
msgstr ""
|
543 |
+
|
544 |
+
#: src/core/src/Admin/views/include.view.php:67
|
545 |
msgid "Save Rule"
|
546 |
msgstr ""
|
547 |
|
600 |
msgid "Select a condition"
|
601 |
msgstr ""
|
602 |
|
603 |
+
#: src/core/src/Admin/views/view.condition-rule.php:48
|
604 |
msgid "Order"
|
605 |
msgstr ""
|
606 |
|
607 |
+
#: src/core/src/Admin/views/view.pro-conditions.php:4
|
608 |
+
#: src/core/src/Admin/views/view.pro-conditions.php:20
|
609 |
+
msgid "Enrolled Course"
|
610 |
+
msgstr ""
|
611 |
+
|
612 |
+
#: src/core/src/Admin/views/view.pro-conditions.php:5
|
613 |
+
msgid "User Group"
|
614 |
+
msgstr ""
|
615 |
+
|
616 |
+
#: src/core/src/Admin/views/view.pro-conditions.php:8
|
617 |
+
msgid "Purchased Product"
|
618 |
+
msgstr ""
|
619 |
+
|
620 |
+
#: src/core/src/Admin/views/view.pro-conditions.php:9
|
621 |
+
msgid "Purchased Product Category"
|
622 |
+
msgstr ""
|
623 |
+
|
624 |
+
#: src/core/src/Admin/views/view.pro-conditions.php:10
|
625 |
+
msgid "Active User Subscription"
|
626 |
+
msgstr ""
|
627 |
+
|
628 |
+
#: src/core/src/Admin/views/view.pro-conditions.php:11
|
629 |
+
msgid "Active Membership Plan"
|
630 |
+
msgstr ""
|
631 |
+
|
632 |
+
#: src/core/src/Admin/views/view.pro-conditions.php:14
|
633 |
+
msgid "Subscribed Membership"
|
634 |
+
msgstr ""
|
635 |
+
|
636 |
+
#: src/core/src/Admin/views/view.pro-conditions.php:17
|
637 |
+
msgid "Active Membership Level"
|
638 |
+
msgstr ""
|
639 |
+
|
640 |
+
#: src/core/src/Admin/views/view.pro-conditions.php:21
|
641 |
+
msgid "Enrolled Membership"
|
642 |
+
msgstr ""
|
643 |
+
|
644 |
#: src/core/src/Functions.php:17
|
645 |
msgid "Register"
|
646 |
msgstr ""
|
671 |
msgid "LoginWP (Formerly Peter's Login Redirect)"
|
672 |
msgstr ""
|
673 |
|
674 |
+
#. #-#-#-#-# peters-login-redirect.pot (LoginWP (Formerly Peter's Login Redirect) 3.0.0.6) #-#-#-#-#
|
675 |
#. Plugin URI of the plugin/theme
|
676 |
+
#. #-#-#-#-# peters-login-redirect.pot (LoginWP (Formerly Peter's Login Redirect) 3.0.0.6) #-#-#-#-#
|
677 |
#. Author URI of the plugin/theme
|
678 |
msgid "https://loginwp.com"
|
679 |
msgstr ""
|
readme.txt
CHANGED
@@ -4,8 +4,8 @@ Donate link: https://loginwp.com/pricing
|
|
4 |
Tags: login, logout, redirect, login form, user registration, admin, administration, dashboard, users, authentication
|
5 |
Requires at least: 4.0
|
6 |
Requires PHP: 5.6
|
7 |
-
Tested up to: 5.
|
8 |
-
Stable tag: 3.0.0.
|
9 |
License: GPL-2.0+
|
10 |
|
11 |
Redirect users to different locations after they log in, log out and register based on different conditions.
|
@@ -74,29 +74,12 @@ Login redirects not working? This plugin uses WordPress's standard login_redirec
|
|
74 |
|
75 |
== Changelog ==
|
76 |
|
77 |
-
= 3.0.0.
|
78 |
-
*
|
79 |
-
* Added https://
|
80 |
-
|
81 |
-
=
|
82 |
-
*
|
83 |
-
*
|
84 |
-
|
85 |
-
= 3.0.0.3 =
|
86 |
-
* Fixed multisite installation bug.
|
87 |
-
* Fixed issue where database migration didn't work.
|
88 |
-
|
89 |
-
= 3.0.0.2 =
|
90 |
-
* Fixed issue where placeholders wasn't getting saved as url.
|
91 |
-
* Improved BuddyPress/BuddyBoss support.
|
92 |
-
|
93 |
-
= 3.0.0.1 =
|
94 |
-
* Fixed issue where placeholders wasn't getting saved as url.
|
95 |
-
* Improved BuddyPress/BuddyBoss support.
|
96 |
-
|
97 |
-
= 3.0.0.0 =
|
98 |
-
* Rebranded to LoginWP.
|
99 |
-
* UI revamp.
|
100 |
-
* [Pro plugin](https://loginwp.com/pricing/?utm_source=wprepo&utm_medium=changelog&utm_campaign=3-release) now available.
|
101 |
|
102 |
See the [changelog file](https://plugins.svn.wordpress.org/peters-login-redirect/trunk/changelog.txt) for full changelog information.
|
4 |
Tags: login, logout, redirect, login form, user registration, admin, administration, dashboard, users, authentication
|
5 |
Requires at least: 4.0
|
6 |
Requires PHP: 5.6
|
7 |
+
Tested up to: 5.9
|
8 |
+
Stable tag: 3.0.0.6
|
9 |
License: GPL-2.0+
|
10 |
|
11 |
Redirect users to different locations after they log in, log out and register based on different conditions.
|
74 |
|
75 |
== Changelog ==
|
76 |
|
77 |
+
= 3.0.0.6 =
|
78 |
+
* Compatibility with WP 5.9.
|
79 |
+
* Pro: Added [LearnDash](https://loginwp.com/?utm_source=wprepo&utm_medium=changelog&utm_campaign=3006#pro-conditions) Enrolled Course and User Group redirect conditions.
|
80 |
+
* Pro: Added [WooCommerce](https://loginwp.com/?utm_source=wprepo&utm_medium=changelog&utm_campaign=3006#pro-conditions) Purchased Product, Purchased Product Category, Active User Subscription, Active Membership Plan redirect conditions.
|
81 |
+
* Pro: Added [MemberPress](https://loginwp.com/?utm_source=wprepo&utm_medium=changelog&utm_campaign=3006#pro-conditions) Subscribed Membership redirect condition.
|
82 |
+
* Pro: Added [Restrict Content Pro](https://loginwp.com/?utm_source=wprepo&utm_medium=changelog&utm_campaign=3006#pro-conditions) Has Membership redirect condition.
|
83 |
+
* Pro: Added [LifterLMS](https://loginwp.com/?utm_source=wprepo&utm_medium=changelog&utm_campaign=3006#pro-conditions) Enrolled Course and Enrolled Membership redirect conditions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
|
85 |
See the [changelog file](https://plugins.svn.wordpress.org/peters-login-redirect/trunk/changelog.txt) for full changelog information.
|
src/core/assets/css/admin.css
CHANGED
@@ -41,6 +41,16 @@
|
|
41 |
padding-right: 0;
|
42 |
}
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
.loginwp-admin .loginwp-data-listing .handle-actions {
|
45 |
display: none
|
46 |
}
|
41 |
padding-right: 0;
|
42 |
}
|
43 |
|
44 |
+
.loginwp-admin .ptr-loginwp-pro-condition {
|
45 |
+
padding: 10px 0;
|
46 |
+
border-bottom: 1px solid #eee;
|
47 |
+
margin-bottom: 5px;
|
48 |
+
}
|
49 |
+
|
50 |
+
.loginwp-admin .ptr-loginwp-pro-conditions-wrap div a {
|
51 |
+
margin-top: 5px;
|
52 |
+
}
|
53 |
+
|
54 |
.loginwp-admin .loginwp-data-listing .handle-actions {
|
55 |
display: none
|
56 |
}
|
src/core/src/Admin/AbstractSettingsPage.php
CHANGED
@@ -56,7 +56,7 @@ abstract class AbstractSettingsPage
|
|
56 |
<div class="loginwp-header-menus">
|
57 |
<nav class="loginwp-nav-tab-wrapper nav-tab-wrapper">
|
58 |
<?php foreach ($menus as $id => $menu) : ?>
|
59 |
-
<a href="<?php echo esc_url(remove_query_arg(wp_removable_query_args(), add_query_arg('tab', $id))); ?>" class="loginwp-nav-tab nav-tab<?= $id == $active_menu ? ' loginwp-nav-active' : '' ?>">
|
60 |
<?php echo $menu ?>
|
61 |
</a>
|
62 |
<?php endforeach; ?>
|
56 |
<div class="loginwp-header-menus">
|
57 |
<nav class="loginwp-nav-tab-wrapper nav-tab-wrapper">
|
58 |
<?php foreach ($menus as $id => $menu) : ?>
|
59 |
+
<a href="<?php echo esc_url(remove_query_arg(['action', 'id'] + wp_removable_query_args(), add_query_arg('tab', $id))); ?>" class="loginwp-nav-tab nav-tab<?= $id == $active_menu ? ' loginwp-nav-active' : '' ?>">
|
60 |
<?php echo $menu ?>
|
61 |
</a>
|
62 |
<?php endforeach; ?>
|
src/core/src/Admin/Admin.php
CHANGED
@@ -55,16 +55,23 @@ class Admin
|
|
55 |
add_action('admin_notices', [$this, 'ptlr_is_now_loginwp_notice']);
|
56 |
}
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
public function act_on_request()
|
59 |
{
|
60 |
if ( ! empty($_GET['loginwp_admin_action'])) {
|
61 |
|
62 |
if ($_GET['loginwp_admin_action'] == 'dismiss_leave_review_forever') {
|
63 |
-
|
64 |
}
|
65 |
|
66 |
if ($_GET['loginwp_admin_action'] == 'dismiss_ptlr_now_loginwp') {
|
67 |
-
|
68 |
}
|
69 |
|
70 |
wp_safe_redirect(esc_url_raw(remove_query_arg('loginwp_admin_action')));
|
@@ -219,8 +226,6 @@ class Admin
|
|
219 |
echo '</div>';
|
220 |
}
|
221 |
|
222 |
-
|
223 |
-
|
224 |
public function removable_query_args($args)
|
225 |
{
|
226 |
$args[] = 'license-settings-updated';
|
55 |
add_action('admin_notices', [$this, 'ptlr_is_now_loginwp_notice']);
|
56 |
}
|
57 |
|
58 |
+
public static function set_admin_notice_cache( $id, $timeout ) {
|
59 |
+
$cache_key = 'pand-' . md5( $id );
|
60 |
+
update_site_option( $cache_key, $timeout );
|
61 |
+
|
62 |
+
return true;
|
63 |
+
}
|
64 |
+
|
65 |
public function act_on_request()
|
66 |
{
|
67 |
if ( ! empty($_GET['loginwp_admin_action'])) {
|
68 |
|
69 |
if ($_GET['loginwp_admin_action'] == 'dismiss_leave_review_forever') {
|
70 |
+
self::set_admin_notice_cache('loginwp-review-plugin-notice', 'forever');
|
71 |
}
|
72 |
|
73 |
if ($_GET['loginwp_admin_action'] == 'dismiss_ptlr_now_loginwp') {
|
74 |
+
self::set_admin_notice_cache('ptlr_is_now_loginwp_notice', 'forever');
|
75 |
}
|
76 |
|
77 |
wp_safe_redirect(esc_url_raw(remove_query_arg('loginwp_admin_action')));
|
226 |
echo '</div>';
|
227 |
}
|
228 |
|
|
|
|
|
229 |
public function removable_query_args($args)
|
230 |
{
|
231 |
$args[] = 'license-settings-updated';
|
src/core/src/Admin/RedirectWPList.php
CHANGED
@@ -30,19 +30,6 @@ class RedirectWPList extends \WP_List_Table
|
|
30 |
$this->process_actions();
|
31 |
}
|
32 |
|
33 |
-
public function hash_map($key = '')
|
34 |
-
{
|
35 |
-
$map = [
|
36 |
-
'user' => esc_html__('Username', 'peters-login-redirect'),
|
37 |
-
'role' => esc_html__('User Role', 'peters-login-redirect'),
|
38 |
-
'level' => esc_html__('User Capability', 'peters-login-redirect'),
|
39 |
-
];
|
40 |
-
|
41 |
-
if ( ! empty($key)) return $map[$key];
|
42 |
-
|
43 |
-
return $map;
|
44 |
-
}
|
45 |
-
|
46 |
/**
|
47 |
* Retrieve campaigns data from the database
|
48 |
*
|
@@ -181,7 +168,18 @@ class RedirectWPList extends \WP_List_Table
|
|
181 |
*/
|
182 |
public function column_rul_type($item)
|
183 |
{
|
184 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
}
|
186 |
|
187 |
/**
|
@@ -197,7 +195,7 @@ class RedirectWPList extends \WP_List_Table
|
|
197 |
$value = loginwp_var(Helpers::user_role_list(), $item['rul_value']);
|
198 |
}
|
199 |
|
200 |
-
return $value;
|
201 |
}
|
202 |
|
203 |
/**
|
30 |
$this->process_actions();
|
31 |
}
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
/**
|
34 |
* Retrieve campaigns data from the database
|
35 |
*
|
168 |
*/
|
169 |
public function column_rul_type($item)
|
170 |
{
|
171 |
+
$val = wp_list_filter(RedirectionsPage::get_rule_conditions(), ['id' => $item['rul_type']]);
|
172 |
+
$label = @array_values(wp_list_pluck($val, 'label'))[0];
|
173 |
+
$category_id = @array_values(wp_list_pluck($val, 'category'))[0];
|
174 |
+
$category = loginwp_var(RedirectionsPage::rule_condition_categories(), $category_id);
|
175 |
+
|
176 |
+
if ( ! empty($category_id) && $category_id != RedirectionsPage::STANDARD_CATEGORY) {
|
177 |
+
$category .= ': ';
|
178 |
+
} else {
|
179 |
+
$category = '';
|
180 |
+
}
|
181 |
+
|
182 |
+
return sprintf('%s' . $label, "<strong>$category</strong>");
|
183 |
}
|
184 |
|
185 |
/**
|
195 |
$value = loginwp_var(Helpers::user_role_list(), $item['rul_value']);
|
196 |
}
|
197 |
|
198 |
+
return apply_filters('rul_column_rul_value', $value, $item);
|
199 |
}
|
200 |
|
201 |
/**
|
src/core/src/Admin/RedirectionsPage.php
CHANGED
@@ -11,6 +11,8 @@ class RedirectionsPage extends AbstractSettingsPage
|
|
11 |
*/
|
12 |
protected $wplist_instance;
|
13 |
|
|
|
|
|
14 |
public function __construct()
|
15 |
{
|
16 |
ProfilePress::get_instance();
|
@@ -58,23 +60,33 @@ class RedirectionsPage extends AbstractSettingsPage
|
|
58 |
return apply_filters('loginwp_redirections_header_menu_tabs', $tabs);
|
59 |
}
|
60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
public static function get_rule_conditions()
|
62 |
{
|
63 |
return apply_filters('rul_rule_conditions', [
|
64 |
[
|
65 |
'id' => 'user',
|
|
|
66 |
'label' => esc_html__('Username', 'peters-login-redirect'),
|
67 |
'options' => Helpers::username_list(),
|
68 |
'order_support' => false
|
69 |
],
|
70 |
[
|
71 |
'id' => 'role',
|
|
|
72 |
'label' => esc_html__('User Role', 'peters-login-redirect'),
|
73 |
'options' => Helpers::user_role_list(),
|
74 |
'order_support' => true
|
75 |
],
|
76 |
[
|
77 |
'id' => 'level',
|
|
|
78 |
'label' => esc_html__('User Capability', 'peters-login-redirect'),
|
79 |
'options' => Helpers::capability_list(),
|
80 |
'order_support' => true
|
@@ -82,6 +94,11 @@ class RedirectionsPage extends AbstractSettingsPage
|
|
82 |
]);
|
83 |
}
|
84 |
|
|
|
|
|
|
|
|
|
|
|
85 |
/**
|
86 |
* Screen options
|
87 |
*/
|
@@ -253,6 +270,10 @@ class RedirectionsPage extends AbstractSettingsPage
|
|
253 |
|
254 |
$error_message = '';
|
255 |
|
|
|
|
|
|
|
|
|
256 |
if (empty($_POST['rul_login_url']) && empty($_POST['rul_logout_url'])) {
|
257 |
$error_message = __('ERROR: No Login or Logout URL specified', 'peters-login-redirect');
|
258 |
}
|
11 |
*/
|
12 |
protected $wplist_instance;
|
13 |
|
14 |
+
const STANDARD_CATEGORY = 'standard';
|
15 |
+
|
16 |
public function __construct()
|
17 |
{
|
18 |
ProfilePress::get_instance();
|
60 |
return apply_filters('loginwp_redirections_header_menu_tabs', $tabs);
|
61 |
}
|
62 |
|
63 |
+
public static function rule_condition_categories()
|
64 |
+
{
|
65 |
+
return apply_filters('rul_rule_conditions_categories', [
|
66 |
+
self::STANDARD_CATEGORY => esc_html__('Standard', 'peters-login-redirect')
|
67 |
+
]);
|
68 |
+
}
|
69 |
+
|
70 |
public static function get_rule_conditions()
|
71 |
{
|
72 |
return apply_filters('rul_rule_conditions', [
|
73 |
[
|
74 |
'id' => 'user',
|
75 |
+
'category' => self::STANDARD_CATEGORY,
|
76 |
'label' => esc_html__('Username', 'peters-login-redirect'),
|
77 |
'options' => Helpers::username_list(),
|
78 |
'order_support' => false
|
79 |
],
|
80 |
[
|
81 |
'id' => 'role',
|
82 |
+
'category' => self::STANDARD_CATEGORY,
|
83 |
'label' => esc_html__('User Role', 'peters-login-redirect'),
|
84 |
'options' => Helpers::user_role_list(),
|
85 |
'order_support' => true
|
86 |
],
|
87 |
[
|
88 |
'id' => 'level',
|
89 |
+
'category' => self::STANDARD_CATEGORY,
|
90 |
'label' => esc_html__('User Capability', 'peters-login-redirect'),
|
91 |
'options' => Helpers::capability_list(),
|
92 |
'order_support' => true
|
94 |
]);
|
95 |
}
|
96 |
|
97 |
+
public static function get_rule_conditions_by_category($category)
|
98 |
+
{
|
99 |
+
return wp_list_filter(self::get_rule_conditions(), ['category' => $category]);
|
100 |
+
}
|
101 |
+
|
102 |
/**
|
103 |
* Screen options
|
104 |
*/
|
270 |
|
271 |
$error_message = '';
|
272 |
|
273 |
+
if (empty($_POST['rul_condition_value'])) {
|
274 |
+
$error_message = __('ERROR: Condition value not specified', 'peters-login-redirect');
|
275 |
+
}
|
276 |
+
|
277 |
if (empty($_POST['rul_login_url']) && empty($_POST['rul_logout_url'])) {
|
278 |
$error_message = __('ERROR: No Login or Logout URL specified', 'peters-login-redirect');
|
279 |
}
|
src/core/src/Admin/views/include.view.php
CHANGED
@@ -31,6 +31,23 @@ add_action('add_meta_boxes', function () use ($ruleData) {
|
|
31 |
);
|
32 |
});
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
do_action('add_meta_boxes', 'ptrloginwpredirection', '');
|
35 |
|
36 |
?>
|
31 |
);
|
32 |
});
|
33 |
|
34 |
+
|
35 |
+
if ( ! defined('LOGINWP_DETACH_LIBSODIUM')) {
|
36 |
+
add_action('add_meta_boxes', function () use ($ruleData) {
|
37 |
+
add_meta_box(
|
38 |
+
'ptr-loginwp-pro-conditions',
|
39 |
+
sprintf(
|
40 |
+
esc_html__('Available Pro Conditions %sUpgrade Now%s', 'peters-login-redirect'),
|
41 |
+
'<a target="_blank" href="https://loginwp.com/pricing/?utm_source=wp_dashboard&utm_medium=upgrade&utm_campaign=pro_conditions_metabox_header">', '</a>'
|
42 |
+
),
|
43 |
+
function () use ($ruleData) {
|
44 |
+
require dirname(__FILE__) . '/view.pro-conditions.php';
|
45 |
+
},
|
46 |
+
'ptrloginwpredirection'
|
47 |
+
);
|
48 |
+
});
|
49 |
+
}
|
50 |
+
|
51 |
do_action('add_meta_boxes', 'ptrloginwpredirection', '');
|
52 |
|
53 |
?>
|
src/core/src/Admin/views/view.condition-rule.php
CHANGED
@@ -5,18 +5,31 @@ use LoginWP\Core\Admin\RedirectionsPage;
|
|
5 |
$db_condition = sanitize_text_field(loginwpPOST_var('rul_condition', loginwp_var($ruleData, 'rul_type', '')));
|
6 |
$db_condition_value = sanitize_text_field(loginwpPOST_var('rul_condition_value', loginwp_var($ruleData, 'rul_value', '')));
|
7 |
$db_condition_order = absint(loginwpPOST_var('rul_order', loginwp_var($ruleData, 'rul_order', 0)));
|
8 |
-
|
9 |
?>
|
10 |
<div class="ptr-loginwp-condition-wrap">
|
11 |
<div class="ptr-loginwp-row">
|
12 |
<div id="ptr-loginwp-condition-wrap" class="ptr-loginwp-col">
|
13 |
<label>
|
14 |
<select name="rul_condition">
|
|
|
15 |
<option value=""><?php esc_html_e('Select a condition', 'peters-login-redirect'); ?></option>
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
<?php endforeach; ?>
|
21 |
</select>
|
22 |
</label>
|
5 |
$db_condition = sanitize_text_field(loginwpPOST_var('rul_condition', loginwp_var($ruleData, 'rul_type', '')));
|
6 |
$db_condition_value = sanitize_text_field(loginwpPOST_var('rul_condition_value', loginwp_var($ruleData, 'rul_value', '')));
|
7 |
$db_condition_order = absint(loginwpPOST_var('rul_order', loginwp_var($ruleData, 'rul_order', 0)));
|
|
|
8 |
?>
|
9 |
<div class="ptr-loginwp-condition-wrap">
|
10 |
<div class="ptr-loginwp-row">
|
11 |
<div id="ptr-loginwp-condition-wrap" class="ptr-loginwp-col">
|
12 |
<label>
|
13 |
<select name="rul_condition">
|
14 |
+
|
15 |
<option value=""><?php esc_html_e('Select a condition', 'peters-login-redirect'); ?></option>
|
16 |
+
|
17 |
+
<?php foreach (RedirectionsPage::rule_condition_categories() as $id => $label) : ?>
|
18 |
+
|
19 |
+
<?php $conditions = RedirectionsPage::get_rule_conditions_by_category($id); ?>
|
20 |
+
|
21 |
+
<?php if ( ! empty($conditions)) : ?>
|
22 |
+
|
23 |
+
<optgroup label="<?= $label ?>">
|
24 |
+
<?php foreach ($conditions as $condition) : ?>
|
25 |
+
<option value="<?php echo esc_attr($condition['id']) ?>" <?php selected($db_condition, $condition['id']) ?>>
|
26 |
+
<?php echo esc_html($condition['label']) ?>
|
27 |
+
</option>
|
28 |
+
<?php endforeach; ?>
|
29 |
+
</optgroup>
|
30 |
+
|
31 |
+
<?php endif; ?>
|
32 |
+
|
33 |
<?php endforeach; ?>
|
34 |
</select>
|
35 |
</label>
|
src/core/src/Admin/views/view.pro-conditions.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$pro_conditions = [
|
3 |
+
'LearnDash' => [
|
4 |
+
esc_html__('Enrolled Course', 'peters-login-redirect'),
|
5 |
+
esc_html__('User Group', 'peters-login-redirect')
|
6 |
+
],
|
7 |
+
'WooCommerce' => [
|
8 |
+
esc_html__('Purchased Product', 'peters-login-redirect'),
|
9 |
+
esc_html__('Purchased Product Category', 'peters-login-redirect'),
|
10 |
+
esc_html__('Active User Subscription', 'peters-login-redirect'),
|
11 |
+
esc_html__('Active Membership Plan', 'peters-login-redirect')
|
12 |
+
],
|
13 |
+
'MemberPress' => [
|
14 |
+
esc_html__('Subscribed Membership', 'peters-login-redirect')
|
15 |
+
],
|
16 |
+
'Restrict Content Pro' => [
|
17 |
+
esc_html__('Active Membership Level', 'peters-login-redirect')
|
18 |
+
],
|
19 |
+
'LifterLMS' => [
|
20 |
+
esc_html__('Enrolled Course', 'peters-login-redirect'),
|
21 |
+
esc_html__('Enrolled Membership', 'peters-login-redirect')
|
22 |
+
]
|
23 |
+
];
|
24 |
+
?>
|
25 |
+
|
26 |
+
<div class="ptr-loginwp-pro-conditions-wrap">
|
27 |
+
<?php foreach ($pro_conditions as $label => $condition): ?>
|
28 |
+
<div class="ptr-loginwp-pro-condition">
|
29 |
+
<strong><?= $label ?>:</strong> <?= implode(', ', $condition) ?>.
|
30 |
+
</div>
|
31 |
+
<?php endforeach; ?>
|
32 |
+
<div>
|
33 |
+
<a href="https://loginwp.com/pricing/?utm_source=wp_dashboard&utm_medium=upgrade&utm_campaign=pro_conditions_metabox" target="__blank" class="button-primary">
|
34 |
+
<?php esc_html_e('Get LoginWP Pro →', 'peters-login-redirect') ?>
|
35 |
+
</a>
|
36 |
+
</div>
|
37 |
+
</div>
|
src/core/src/Core.php
CHANGED
@@ -56,7 +56,7 @@ class Core
|
|
56 |
if ($rul_db_addresses != $wpdb->get_var("SHOW TABLES LIKE '$rul_db_addresses'")) {
|
57 |
$sql = "CREATE TABLE $rul_db_addresses (
|
58 |
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
59 |
-
`rul_type`
|
60 |
`rul_value` varchar(191) NULL default NULL,
|
61 |
`rul_url` LONGTEXT NULL default NULL,
|
62 |
`rul_url_logout` LONGTEXT NULL default NULL,
|
@@ -169,6 +169,10 @@ class Core
|
|
169 |
$wpdb->query("ALTER TABLE $rul_db_addresses DROP INDEX rul_type");
|
170 |
}
|
171 |
|
|
|
|
|
|
|
|
|
172 |
update_option('rul_version', PTR_LOGINWP_VERSION_NUMBER, 'no');
|
173 |
|
174 |
add_option('loginwp_install_date', current_time('mysql'));
|
56 |
if ($rul_db_addresses != $wpdb->get_var("SHOW TABLES LIKE '$rul_db_addresses'")) {
|
57 |
$sql = "CREATE TABLE $rul_db_addresses (
|
58 |
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
59 |
+
`rul_type` varchar(100) NOT NULL,
|
60 |
`rul_value` varchar(191) NULL default NULL,
|
61 |
`rul_url` LONGTEXT NULL default NULL,
|
62 |
`rul_url_logout` LONGTEXT NULL default NULL,
|
169 |
$wpdb->query("ALTER TABLE $rul_db_addresses DROP INDEX rul_type");
|
170 |
}
|
171 |
|
172 |
+
if ($cmp_current_version < 3006) {
|
173 |
+
$wpdb->query("ALTER TABLE $rul_db_addresses CHANGE rul_type rul_type varchar(100) NOT NULL");
|
174 |
+
}
|
175 |
+
|
176 |
update_option('rul_version', PTR_LOGINWP_VERSION_NUMBER, 'no');
|
177 |
|
178 |
add_option('loginwp_install_date', current_time('mysql'));
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit9f015b48a8bd360c3134cf1d5a23f83d::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -24,15 +24,15 @@ class ComposerAutoloaderInitaacbd4f72e1a80d06c4220c3f2513830
|
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
-
spl_autoload_register(array('
|
28 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
29 |
-
spl_autoload_unregister(array('
|
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\
|
36 |
} else {
|
37 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
38 |
foreach ($map as $namespace => $path) {
|
@@ -53,19 +53,19 @@ class ComposerAutoloaderInitaacbd4f72e1a80d06c4220c3f2513830
|
|
53 |
$loader->register(true);
|
54 |
|
55 |
if ($useStaticLoader) {
|
56 |
-
$includeFiles = Composer\Autoload\
|
57 |
} else {
|
58 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
59 |
}
|
60 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
61 |
-
|
62 |
}
|
63 |
|
64 |
return $loader;
|
65 |
}
|
66 |
}
|
67 |
|
68 |
-
function
|
69 |
{
|
70 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
71 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit9f015b48a8bd360c3134cf1d5a23f83d
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
+
spl_autoload_register(array('ComposerAutoloaderInit9f015b48a8bd360c3134cf1d5a23f83d', 'loadClassLoader'), true, true);
|
28 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
29 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit9f015b48a8bd360c3134cf1d5a23f83d', '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\ComposerStaticInit9f015b48a8bd360c3134cf1d5a23f83d::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\ComposerStaticInit9f015b48a8bd360c3134cf1d5a23f83d::$files;
|
57 |
} else {
|
58 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
59 |
}
|
60 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
61 |
+
composerRequire9f015b48a8bd360c3134cf1d5a23f83d($fileIdentifier, $file);
|
62 |
}
|
63 |
|
64 |
return $loader;
|
65 |
}
|
66 |
}
|
67 |
|
68 |
+
function composerRequire9f015b48a8bd360c3134cf1d5a23f83d($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
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'7c119350ad5d791b1ae2d87a60e07ace' => __DIR__ . '/../..' . '/src/core/src/MoAdminNotice.php',
|
@@ -156,9 +156,9 @@ class ComposerStaticInitaacbd4f72e1a80d06c4220c3f2513830
|
|
156 |
public static function getInitializer(ClassLoader $loader)
|
157 |
{
|
158 |
return \Closure::bind(function () use ($loader) {
|
159 |
-
$loader->prefixLengthsPsr4 =
|
160 |
-
$loader->prefixDirsPsr4 =
|
161 |
-
$loader->classMap =
|
162 |
|
163 |
}, null, ClassLoader::class);
|
164 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit9f015b48a8bd360c3134cf1d5a23f83d
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'7c119350ad5d791b1ae2d87a60e07ace' => __DIR__ . '/../..' . '/src/core/src/MoAdminNotice.php',
|
156 |
public static function getInitializer(ClassLoader $loader)
|
157 |
{
|
158 |
return \Closure::bind(function () use ($loader) {
|
159 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit9f015b48a8bd360c3134cf1d5a23f83d::$prefixLengthsPsr4;
|
160 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit9f015b48a8bd360c3134cf1d5a23f83d::$prefixDirsPsr4;
|
161 |
+
$loader->classMap = ComposerStaticInit9f015b48a8bd360c3134cf1d5a23f83d::$classMap;
|
162 |
|
163 |
}, null, ClassLoader::class);
|
164 |
}
|
vendor/composer/installed.json
CHANGED
@@ -200,24 +200,24 @@
|
|
200 |
},
|
201 |
{
|
202 |
"name": "loginwp/core",
|
203 |
-
"version": "0.1.0-alpha.
|
204 |
-
"version_normalized": "0.1.0.0-
|
205 |
"source": {
|
206 |
"type": "git",
|
207 |
"url": "https://github.com/LoginWP/Core.git",
|
208 |
-
"reference": "
|
209 |
},
|
210 |
"dist": {
|
211 |
"type": "zip",
|
212 |
-
"url": "https://api.github.com/repos/LoginWP/Core/zipball/
|
213 |
-
"reference": "
|
214 |
"shasum": ""
|
215 |
},
|
216 |
"require": {
|
217 |
"collizo4sky/persist-admin-notices-dismissal": "^1.4",
|
218 |
"composer/installers": "~1.0"
|
219 |
},
|
220 |
-
"time": "2021-11-
|
221 |
"type": "wordpress-plugin",
|
222 |
"installation-source": "dist",
|
223 |
"autoload": {
|
@@ -233,7 +233,7 @@
|
|
233 |
"description": "Core lib for LoginWP",
|
234 |
"support": {
|
235 |
"issues": "https://github.com/LoginWP/Core/issues",
|
236 |
-
"source": "https://github.com/LoginWP/Core/tree/0.1.0-alpha.
|
237 |
},
|
238 |
"install-path": "../../src/core"
|
239 |
}
|
200 |
},
|
201 |
{
|
202 |
"name": "loginwp/core",
|
203 |
+
"version": "0.1.0-alpha.1637351034",
|
204 |
+
"version_normalized": "0.1.0.0-alpha1637351034",
|
205 |
"source": {
|
206 |
"type": "git",
|
207 |
"url": "https://github.com/LoginWP/Core.git",
|
208 |
+
"reference": "be39d47ffbb67b1357e9582cc3d1ad9ecad1e283"
|
209 |
},
|
210 |
"dist": {
|
211 |
"type": "zip",
|
212 |
+
"url": "https://api.github.com/repos/LoginWP/Core/zipball/be39d47ffbb67b1357e9582cc3d1ad9ecad1e283",
|
213 |
+
"reference": "be39d47ffbb67b1357e9582cc3d1ad9ecad1e283",
|
214 |
"shasum": ""
|
215 |
},
|
216 |
"require": {
|
217 |
"collizo4sky/persist-admin-notices-dismissal": "^1.4",
|
218 |
"composer/installers": "~1.0"
|
219 |
},
|
220 |
+
"time": "2021-11-19T19:43:41+00:00",
|
221 |
"type": "wordpress-plugin",
|
222 |
"installation-source": "dist",
|
223 |
"autoload": {
|
233 |
"description": "Core lib for LoginWP",
|
234 |
"support": {
|
235 |
"issues": "https://github.com/LoginWP/Core/issues",
|
236 |
+
"source": "https://github.com/LoginWP/Core/tree/0.1.0-alpha.1637351034"
|
237 |
},
|
238 |
"install-path": "../../src/core"
|
239 |
}
|
vendor/composer/installed.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
'type' => 'library',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
-
'reference' => '
|
9 |
'name' => '__root__',
|
10 |
'dev' => false,
|
11 |
),
|
@@ -16,7 +16,7 @@
|
|
16 |
'type' => 'library',
|
17 |
'install_path' => __DIR__ . '/../../',
|
18 |
'aliases' => array(),
|
19 |
-
'reference' => '
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
'collizo4sky/persist-admin-notices-dismissal' => array(
|
@@ -38,12 +38,12 @@
|
|
38 |
'dev_requirement' => false,
|
39 |
),
|
40 |
'loginwp/core' => array(
|
41 |
-
'pretty_version' => '0.1.0-alpha.
|
42 |
-
'version' => '0.1.0.0-
|
43 |
'type' => 'wordpress-plugin',
|
44 |
'install_path' => __DIR__ . '/../../src/core',
|
45 |
'aliases' => array(),
|
46 |
-
'reference' => '
|
47 |
'dev_requirement' => false,
|
48 |
),
|
49 |
'roundcube/plugin-installer' => array(
|
5 |
'type' => 'library',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
+
'reference' => 'dfe5fe8efde9684f7e6c4bf3cc443e8300251289',
|
9 |
'name' => '__root__',
|
10 |
'dev' => false,
|
11 |
),
|
16 |
'type' => 'library',
|
17 |
'install_path' => __DIR__ . '/../../',
|
18 |
'aliases' => array(),
|
19 |
+
'reference' => 'dfe5fe8efde9684f7e6c4bf3cc443e8300251289',
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
'collizo4sky/persist-admin-notices-dismissal' => array(
|
38 |
'dev_requirement' => false,
|
39 |
),
|
40 |
'loginwp/core' => array(
|
41 |
+
'pretty_version' => '0.1.0-alpha.1637351034',
|
42 |
+
'version' => '0.1.0.0-alpha1637351034',
|
43 |
'type' => 'wordpress-plugin',
|
44 |
'install_path' => __DIR__ . '/../../src/core',
|
45 |
'aliases' => array(),
|
46 |
+
'reference' => 'be39d47ffbb67b1357e9582cc3d1ad9ecad1e283',
|
47 |
'dev_requirement' => false,
|
48 |
),
|
49 |
'roundcube/plugin-installer' => array(
|
wplogin_redirect.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: LoginWP (Formerly Peter's Login Redirect)
|
4 |
Plugin URI: https://loginwp.com
|
5 |
Description: Redirect users to different URLs based on their role, capability and more.
|
6 |
-
Version: 3.0.0.
|
7 |
Author: LoginWP Team
|
8 |
Author URI: https://loginwp.com
|
9 |
Text Domain: peters-login-redirect
|
@@ -16,7 +16,7 @@ use LoginWP\Core\Core;
|
|
16 |
require __DIR__ . '/vendor/autoload.php';
|
17 |
|
18 |
define('PTR_LOGINWP_SYSTEM_FILE_PATH', __FILE__);
|
19 |
-
define('PTR_LOGINWP_VERSION_NUMBER', '3.0.0.
|
20 |
|
21 |
add_action('init', function () {
|
22 |
load_plugin_textdomain('peters-login-redirect', false, dirname(plugin_basename(__FILE__)) . '/languages');
|
3 |
Plugin Name: LoginWP (Formerly Peter's Login Redirect)
|
4 |
Plugin URI: https://loginwp.com
|
5 |
Description: Redirect users to different URLs based on their role, capability and more.
|
6 |
+
Version: 3.0.0.6
|
7 |
Author: LoginWP Team
|
8 |
Author URI: https://loginwp.com
|
9 |
Text Domain: peters-login-redirect
|
16 |
require __DIR__ . '/vendor/autoload.php';
|
17 |
|
18 |
define('PTR_LOGINWP_SYSTEM_FILE_PATH', __FILE__);
|
19 |
+
define('PTR_LOGINWP_VERSION_NUMBER', '3.0.0.6');
|
20 |
|
21 |
add_action('init', function () {
|
22 |
load_plugin_textdomain('peters-login-redirect', false, dirname(plugin_basename(__FILE__)) . '/languages');
|