Peter’s Login Redirect - Version 3.0.0.5

Version Description

  • Added escaping to url fields in redirection UI
  • Added https://yoursite.tld/?loginwp_link_redirect=true for triggering login redirection.
Download this release

Release Info

Developer Collizo4sky
Plugin Icon 128x128 Peter’s Login Redirect
Version 3.0.0.5
Comparing to
See all releases

Code changes from version 3.0.0.4 to 3.0.0.5

changelog.txt CHANGED
@@ -1,5 +1,9 @@
1
  == Changelog ==
2
 
 
 
 
 
3
  = 3.0.0.4 =
4
  * Prefixed class exist check with backslash.
5
  * [Pro] [Added MemberMouse integration](https://loginwp.com/pricing/?utm_source=wprepo&utm_medium=changelog&utm_campaign=3004).
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.
6
+
7
  = 3.0.0.4 =
8
  * Prefixed class exist check with backslash.
9
  * [Pro] [Added MemberMouse integration](https://loginwp.com/pricing/?utm_source=wprepo&utm_medium=changelog&utm_campaign=3004).
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.4\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/peters-login-"
7
  "redirect\n"
8
- "POT-Creation-Date: 2021-10-07 11:18:52+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
@@ -624,9 +624,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.4) #-#-#-#-#
628
  #. Plugin URI of the plugin/theme
629
- #. #-#-#-#-# peters-login-redirect.pot (LoginWP (Formerly Peter's Login Redirect) 3.0.0.4) #-#-#-#-#
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.5\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/peters-login-"
7
  "redirect\n"
8
+ "POT-Creation-Date: 2021-11-03 11:09:22+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
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.5) #-#-#-#-#
628
  #. Plugin URI of the plugin/theme
629
+ #. #-#-#-#-# peters-login-redirect.pot (LoginWP (Formerly Peter's Login Redirect) 3.0.0.5) #-#-#-#-#
630
  #. Author URI of the plugin/theme
631
  msgid "https://loginwp.com"
632
  msgstr ""
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: login, logout, redirect, login form, user registration, admin, administrat
5
  Requires at least: 4.0
6
  Requires PHP: 5.6
7
  Tested up to: 5.8
8
- Stable tag: 3.0.0.4
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,6 +74,10 @@ Login redirects not working? This plugin uses WordPress's standard login_redirec
74
 
75
  == Changelog ==
76
 
 
 
 
 
77
  = 3.0.0.4 =
78
  * Prefixed class exist check with backslash.
79
  * [Pro] [Added MemberMouse integration](https://loginwp.com/pricing/?utm_source=wprepo&utm_medium=changelog&utm_campaign=3004).
5
  Requires at least: 4.0
6
  Requires PHP: 5.6
7
  Tested up to: 5.8
8
+ Stable tag: 3.0.0.5
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.5 =
78
+ * Added escaping to url fields in redirection UI
79
+ * Added https://yoursite.tld/?loginwp_link_redirect=true for triggering login redirection.
80
+
81
  = 3.0.0.4 =
82
  * Prefixed class exist check with backslash.
83
  * [Pro] [Added MemberMouse integration](https://loginwp.com/pricing/?utm_source=wprepo&utm_medium=changelog&utm_campaign=3004).
src/core/src/Admin/views/view.redirect-urls.php CHANGED
@@ -18,7 +18,7 @@ $modal_title = esc_html__('View Available Placeholders', 'peters-login-redirect'
18
  <label for="rul_login_url"><?= esc_html__('Login URL', 'peters-login-redirect') ?></label>
19
  </th>
20
  <td>
21
- <input name="rul_login_url" type="text" id="rul_login_url" value="<?php echo $login_url; ?>" class="regular-text">
22
  </td>
23
  </tr>
24
  <tr>
@@ -26,7 +26,7 @@ $modal_title = esc_html__('View Available Placeholders', 'peters-login-redirect'
26
  <label for="rul_logout_url"><?= esc_html__('Logout URL', 'peters-login-redirect') ?></label>
27
  </th>
28
  <td>
29
- <input name="rul_logout_url" type="text" id="rul_logout_url" value="<?php echo $logout_url; ?>" class="regular-text">
30
  </td>
31
  </tr>
32
  </tbody>
18
  <label for="rul_login_url"><?= esc_html__('Login URL', 'peters-login-redirect') ?></label>
19
  </th>
20
  <td>
21
+ <input name="rul_login_url" type="text" id="rul_login_url" value="<?php echo esc_attr($login_url); ?>" class="regular-text">
22
  </td>
23
  </tr>
24
  <tr>
26
  <label for="rul_logout_url"><?= esc_html__('Logout URL', 'peters-login-redirect') ?></label>
27
  </th>
28
  <td>
29
+ <input name="rul_logout_url" type="text" id="rul_logout_url" value="<?php echo esc_attr($logout_url); ?>" class="regular-text">
30
  </td>
31
  </tr>
32
  </tbody>
src/core/src/Redirections/Redirections.php CHANGED
@@ -8,11 +8,19 @@ class Redirections
8
  {
9
  public function __construct()
10
  {
 
11
  add_filter('login_redirect', [__CLASS__, 'login_redirect_callback'], 999999999, 3);
12
  add_filter('registration_redirect', [__CLASS__, 'registration_redirect_callback'], 10, 2);
13
  add_filter('logout_redirect', [__CLASS__, 'logout_redirect'], 999999999, 3);
14
  }
15
 
 
 
 
 
 
 
 
16
  public static function login_redirect_callback($redirect_to, $requested_redirect_to, $user)
17
  {
18
  $post_redirect_to_override = Helpers::redirectFunctionCollection_get_settings('rul_allow_post_redirect_override');
8
  {
9
  public function __construct()
10
  {
11
+ add_action('init', [$this, 'login_redirect_url']);
12
  add_filter('login_redirect', [__CLASS__, 'login_redirect_callback'], 999999999, 3);
13
  add_filter('registration_redirect', [__CLASS__, 'registration_redirect_callback'], 10, 2);
14
  add_filter('logout_redirect', [__CLASS__, 'logout_redirect'], 999999999, 3);
15
  }
16
 
17
+ public function login_redirect_url()
18
+ {
19
+ if(isset($_GET['loginwp_link_redirect'])) {
20
+ wplogin_redirect_control_function();
21
+ }
22
+ }
23
+
24
  public static function login_redirect_callback($redirect_to, $requested_redirect_to, $user)
25
  {
26
  $post_redirect_to_override = Helpers::redirectFunctionCollection_get_settings('rul_allow_post_redirect_override');
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInite2ce34532a123cb53a4c41ae29989246::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitaacbd4f72e1a80d06c4220c3f2513830::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInite2ce34532a123cb53a4c41ae29989246
6
  {
7
  private static $loader;
8
 
@@ -24,15 +24,15 @@ class ComposerAutoloaderInite2ce34532a123cb53a4c41ae29989246
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
- spl_autoload_register(array('ComposerAutoloaderInite2ce34532a123cb53a4c41ae29989246', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
- spl_autoload_unregister(array('ComposerAutoloaderInite2ce34532a123cb53a4c41ae29989246', '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\ComposerStaticInite2ce34532a123cb53a4c41ae29989246::getInitializer($loader));
36
  } else {
37
  $map = require __DIR__ . '/autoload_namespaces.php';
38
  foreach ($map as $namespace => $path) {
@@ -53,19 +53,19 @@ class ComposerAutoloaderInite2ce34532a123cb53a4c41ae29989246
53
  $loader->register(true);
54
 
55
  if ($useStaticLoader) {
56
- $includeFiles = Composer\Autoload\ComposerStaticInite2ce34532a123cb53a4c41ae29989246::$files;
57
  } else {
58
  $includeFiles = require __DIR__ . '/autoload_files.php';
59
  }
60
  foreach ($includeFiles as $fileIdentifier => $file) {
61
- composerRequiree2ce34532a123cb53a4c41ae29989246($fileIdentifier, $file);
62
  }
63
 
64
  return $loader;
65
  }
66
  }
67
 
68
- function composerRequiree2ce34532a123cb53a4c41ae29989246($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 ComposerAutoloaderInitaacbd4f72e1a80d06c4220c3f2513830
6
  {
7
  private static $loader;
8
 
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
+ spl_autoload_register(array('ComposerAutoloaderInitaacbd4f72e1a80d06c4220c3f2513830', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
+ spl_autoload_unregister(array('ComposerAutoloaderInitaacbd4f72e1a80d06c4220c3f2513830', '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\ComposerStaticInitaacbd4f72e1a80d06c4220c3f2513830::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\ComposerStaticInitaacbd4f72e1a80d06c4220c3f2513830::$files;
57
  } else {
58
  $includeFiles = require __DIR__ . '/autoload_files.php';
59
  }
60
  foreach ($includeFiles as $fileIdentifier => $file) {
61
+ composerRequireaacbd4f72e1a80d06c4220c3f2513830($fileIdentifier, $file);
62
  }
63
 
64
  return $loader;
65
  }
66
  }
67
 
68
+ function composerRequireaacbd4f72e1a80d06c4220c3f2513830($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 ComposerStaticInite2ce34532a123cb53a4c41ae29989246
8
  {
9
  public static $files = array (
10
  '7c119350ad5d791b1ae2d87a60e07ace' => __DIR__ . '/../..' . '/src/core/src/MoAdminNotice.php',
@@ -156,9 +156,9 @@ class ComposerStaticInite2ce34532a123cb53a4c41ae29989246
156
  public static function getInitializer(ClassLoader $loader)
157
  {
158
  return \Closure::bind(function () use ($loader) {
159
- $loader->prefixLengthsPsr4 = ComposerStaticInite2ce34532a123cb53a4c41ae29989246::$prefixLengthsPsr4;
160
- $loader->prefixDirsPsr4 = ComposerStaticInite2ce34532a123cb53a4c41ae29989246::$prefixDirsPsr4;
161
- $loader->classMap = ComposerStaticInite2ce34532a123cb53a4c41ae29989246::$classMap;
162
 
163
  }, null, ClassLoader::class);
164
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitaacbd4f72e1a80d06c4220c3f2513830
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 = ComposerStaticInitaacbd4f72e1a80d06c4220c3f2513830::$prefixLengthsPsr4;
160
+ $loader->prefixDirsPsr4 = ComposerStaticInitaacbd4f72e1a80d06c4220c3f2513830::$prefixDirsPsr4;
161
+ $loader->classMap = ComposerStaticInitaacbd4f72e1a80d06c4220c3f2513830::$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.1633605085",
204
- "version_normalized": "0.1.0.0-alpha1633605085",
205
  "source": {
206
  "type": "git",
207
  "url": "https://github.com/LoginWP/Core.git",
208
- "reference": "1b59aadd330c7f69e677c5d729da45c43cd70481"
209
  },
210
  "dist": {
211
  "type": "zip",
212
- "url": "https://api.github.com/repos/LoginWP/Core/zipball/1b59aadd330c7f69e677c5d729da45c43cd70481",
213
- "reference": "1b59aadd330c7f69e677c5d729da45c43cd70481",
214
  "shasum": ""
215
  },
216
  "require": {
217
  "collizo4sky/persist-admin-notices-dismissal": "^1.4",
218
  "composer/installers": "~1.0"
219
  },
220
- "time": "2021-09-29T14:32:34+00:00",
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.1633605085"
237
  },
238
  "install-path": "../../src/core"
239
  }
200
  },
201
  {
202
  "name": "loginwp/core",
203
+ "version": "0.1.0-alpha.1635937199",
204
+ "version_normalized": "0.1.0.0-alpha1635937199",
205
  "source": {
206
  "type": "git",
207
  "url": "https://github.com/LoginWP/Core.git",
208
+ "reference": "ac7c2b33ee9ff23e8bbb44f4cc8c6c701a167464"
209
  },
210
  "dist": {
211
  "type": "zip",
212
+ "url": "https://api.github.com/repos/LoginWP/Core/zipball/ac7c2b33ee9ff23e8bbb44f4cc8c6c701a167464",
213
+ "reference": "ac7c2b33ee9ff23e8bbb44f4cc8c6c701a167464",
214
  "shasum": ""
215
  },
216
  "require": {
217
  "collizo4sky/persist-admin-notices-dismissal": "^1.4",
218
  "composer/installers": "~1.0"
219
  },
220
+ "time": "2021-11-03T10:29:21+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.1635937199"
237
  },
238
  "install-path": "../../src/core"
239
  }
vendor/composer/installed.php CHANGED
@@ -38,12 +38,12 @@
38
  'dev_requirement' => false,
39
  ),
40
  'loginwp/core' => array(
41
- 'pretty_version' => '0.1.0-alpha.1633605085',
42
- 'version' => '0.1.0.0-alpha1633605085',
43
  'type' => 'wordpress-plugin',
44
  'install_path' => __DIR__ . '/../../src/core',
45
  'aliases' => array(),
46
- 'reference' => '1b59aadd330c7f69e677c5d729da45c43cd70481',
47
  'dev_requirement' => false,
48
  ),
49
  'roundcube/plugin-installer' => array(
38
  'dev_requirement' => false,
39
  ),
40
  'loginwp/core' => array(
41
+ 'pretty_version' => '0.1.0-alpha.1635937199',
42
+ 'version' => '0.1.0.0-alpha1635937199',
43
  'type' => 'wordpress-plugin',
44
  'install_path' => __DIR__ . '/../../src/core',
45
  'aliases' => array(),
46
+ 'reference' => 'ac7c2b33ee9ff23e8bbb44f4cc8c6c701a167464',
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.4
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.4');
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.5
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.5');
20
 
21
  add_action('init', function () {
22
  load_plugin_textdomain('peters-login-redirect', false, dirname(plugin_basename(__FILE__)) . '/languages');