Version Description
- Fixed multisite installation bug.
- Fixed issue where database migration didn't work.
Download this release
Release Info
Developer | Collizo4sky |
Plugin | Peter’s Login Redirect |
Version | 3.0.0.3 |
Comparing to | |
See all releases |
Code changes from version 3.0.0.2 to 3.0.0.3
- changelog.txt +4 -0
- readme.txt +5 -1
- src/core/src/Core.php +17 -9
- uninstall.php +1 -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 +3 -3
- wplogin_redirect.php +2 -2
changelog.txt
CHANGED
@@ -1,5 +1,9 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
3 |
= 3.0.0.2 =
|
4 |
* Fixed issue where placeholders wasn't getting saved as url.
|
5 |
* Improved BuddyPress/BuddyBoss support.
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 3.0.0.3 =
|
4 |
+
* Fixed multisite installation bug.
|
5 |
+
* Fixed issue where database migration didn't work.
|
6 |
+
|
7 |
= 3.0.0.2 =
|
8 |
* Fixed issue where placeholders wasn't getting saved as url.
|
9 |
* Improved BuddyPress/BuddyBoss support.
|
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.
|
9 |
License: GPL-2.0+
|
10 |
|
11 |
Redirect users to different locations after they log in, log out and register based on different conditions.
|
@@ -70,6 +70,10 @@ Login redirects not working? This plugin uses WordPress's standard login_redirec
|
|
70 |
|
71 |
== Changelog ==
|
72 |
|
|
|
|
|
|
|
|
|
73 |
= 3.0.0.2 =
|
74 |
* Fixed issue where placeholders wasn't getting saved as url.
|
75 |
* Improved BuddyPress/BuddyBoss support.
|
5 |
Requires at least: 4.0
|
6 |
Requires PHP: 5.6
|
7 |
Tested up to: 5.8
|
8 |
+
Stable tag: 3.0.0.3
|
9 |
License: GPL-2.0+
|
10 |
|
11 |
Redirect users to different locations after they log in, log out and register based on different conditions.
|
70 |
|
71 |
== Changelog ==
|
72 |
|
73 |
+
= 3.0.0.3 =
|
74 |
+
* Fixed multisite installation bug.
|
75 |
+
* Fixed issue where database migration didn't work.
|
76 |
+
|
77 |
= 3.0.0.2 =
|
78 |
* Fixed issue where placeholders wasn't getting saved as url.
|
79 |
* Improved BuddyPress/BuddyBoss support.
|
src/core/src/Core.php
CHANGED
@@ -6,7 +6,8 @@ global $wpdb;
|
|
6 |
|
7 |
use LoginWP\Core\Redirections\Redirections;
|
8 |
|
9 |
-
define('
|
|
|
10 |
define('PTR_LOGINWP_SETTINGS_PAGE_SLUG', 'loginwp-settings');
|
11 |
define('PTR_LOGINWP_REDIRECTION_PAGE_SLUG', 'loginwp-redirections');
|
12 |
define('PTR_LOGINWP_REDIRECTIONS_PAGE_URL', admin_url('admin.php?page=' . PTR_LOGINWP_REDIRECTION_PAGE_SLUG));
|
@@ -48,7 +49,8 @@ class Core
|
|
48 |
{
|
49 |
global $wpdb;
|
50 |
|
51 |
-
$
|
|
|
52 |
|
53 |
// Add the table to hold group information and moderator rules
|
54 |
if ($rul_db_addresses != $wpdb->get_var("SHOW TABLES LIKE '$rul_db_addresses'")) {
|
@@ -59,8 +61,7 @@ class Core
|
|
59 |
`rul_url` LONGTEXT NULL default NULL,
|
60 |
`rul_url_logout` LONGTEXT NULL default NULL,
|
61 |
`rul_order` int(2) NOT NULL default '0',
|
62 |
-
PRIMARY KEY (id)
|
63 |
-
UNIQUE KEY `rul_type` (`rul_type`,`rul_value`)
|
64 |
)";
|
65 |
|
66 |
$wpdb->query($sql);
|
@@ -115,7 +116,9 @@ class Core
|
|
115 |
|
116 |
public function rul_drop_tables($tables)
|
117 |
{
|
118 |
-
$
|
|
|
|
|
119 |
|
120 |
return $tables;
|
121 |
}
|
@@ -126,12 +129,13 @@ class Core
|
|
126 |
{
|
127 |
global $wpdb;
|
128 |
|
129 |
-
$
|
|
|
130 |
|
131 |
-
// Turn version into an integer for comparisons
|
132 |
-
$current_version = intval(str_replace('.', '', get_option('rul_version')));
|
133 |
// necessary cos pro starts with version 4.
|
134 |
-
$cmp_current_version = str_replace('4.', '3.',
|
|
|
|
|
135 |
|
136 |
if ($cmp_current_version < 220) {
|
137 |
$wpdb->query("ALTER TABLE `$rul_db_addresses` ADD `rul_url_logout` LONGTEXT NOT NULL default '' AFTER `rul_url`");
|
@@ -161,6 +165,10 @@ class Core
|
|
161 |
$wpdb->query("ALTER TABLE $rul_db_addresses ADD id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT FIRST");
|
162 |
}
|
163 |
|
|
|
|
|
|
|
|
|
164 |
update_option('rul_version', PTR_LOGINWP_VERSION_NUMBER, 'no');
|
165 |
|
166 |
add_option('loginwp_install_date', current_time('mysql'));
|
6 |
|
7 |
use LoginWP\Core\Redirections\Redirections;
|
8 |
|
9 |
+
define('PTR_LOGINWP_DB_TABLE_NAME', 'login_redirects');
|
10 |
+
define('PTR_LOGINWP_DB_TABLE', $wpdb->prefix . PTR_LOGINWP_DB_TABLE_NAME);
|
11 |
define('PTR_LOGINWP_SETTINGS_PAGE_SLUG', 'loginwp-settings');
|
12 |
define('PTR_LOGINWP_REDIRECTION_PAGE_SLUG', 'loginwp-redirections');
|
13 |
define('PTR_LOGINWP_REDIRECTIONS_PAGE_URL', admin_url('admin.php?page=' . PTR_LOGINWP_REDIRECTION_PAGE_SLUG));
|
49 |
{
|
50 |
global $wpdb;
|
51 |
|
52 |
+
// important we don't use PTR_LOGINWP_DB_TABLE, rather call $wpdb->prefix . 'table name'
|
53 |
+
$rul_db_addresses = $wpdb->prefix . PTR_LOGINWP_DB_TABLE_NAME;
|
54 |
|
55 |
// Add the table to hold group information and moderator rules
|
56 |
if ($rul_db_addresses != $wpdb->get_var("SHOW TABLES LIKE '$rul_db_addresses'")) {
|
61 |
`rul_url` LONGTEXT NULL default NULL,
|
62 |
`rul_url_logout` LONGTEXT NULL default NULL,
|
63 |
`rul_order` int(2) NOT NULL default '0',
|
64 |
+
PRIMARY KEY (id)
|
|
|
65 |
)";
|
66 |
|
67 |
$wpdb->query($sql);
|
116 |
|
117 |
public function rul_drop_tables($tables)
|
118 |
{
|
119 |
+
global $wpdb;
|
120 |
+
|
121 |
+
$tables[] = $wpdb->prefix . PTR_LOGINWP_DB_TABLE_NAME;
|
122 |
|
123 |
return $tables;
|
124 |
}
|
129 |
{
|
130 |
global $wpdb;
|
131 |
|
132 |
+
// important we don't use PTR_LOGINWP_DB_TABLE, rather call $wpdb->prefix . 'table name'
|
133 |
+
$rul_db_addresses = $wpdb->prefix . PTR_LOGINWP_DB_TABLE_NAME;
|
134 |
|
|
|
|
|
135 |
// necessary cos pro starts with version 4.
|
136 |
+
$cmp_current_version = str_replace('4.', '3.', get_option('rul_version'));
|
137 |
+
// Turn version into an integer for comparisons
|
138 |
+
$cmp_current_version = intval(str_replace('.', '', $cmp_current_version));
|
139 |
|
140 |
if ($cmp_current_version < 220) {
|
141 |
$wpdb->query("ALTER TABLE `$rul_db_addresses` ADD `rul_url_logout` LONGTEXT NOT NULL default '' AFTER `rul_url`");
|
165 |
$wpdb->query("ALTER TABLE $rul_db_addresses ADD id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT FIRST");
|
166 |
}
|
167 |
|
168 |
+
if ($cmp_current_version < 3003) {
|
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'));
|
uninstall.php
CHANGED
@@ -15,7 +15,7 @@ function loginwp_mo_uninstall_function()
|
|
15 |
|
16 |
global $wpdb;
|
17 |
|
18 |
-
$drop_tables[] = "DROP TABLE IF EXISTS " .
|
19 |
|
20 |
foreach ($drop_tables as $tables) {
|
21 |
$wpdb->query($tables);
|
15 |
|
16 |
global $wpdb;
|
17 |
|
18 |
+
$drop_tables[] = "DROP TABLE IF EXISTS " . $wpdb->prefix . PTR_LOGINWP_DB_TABLE_NAME;
|
19 |
|
20 |
foreach ($drop_tables as $tables) {
|
21 |
$wpdb->query($tables);
|
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 ComposerAutoloaderInit37fdd4a02b6406828ab351aaea94cb4c::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 ComposerAutoloaderInit006816daff9c23385357d110a29042e9
|
|
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 ComposerAutoloaderInit006816daff9c23385357d110a29042e9
|
|
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 ComposerAutoloaderInit37fdd4a02b6406828ab351aaea94cb4c
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
+
spl_autoload_register(array('ComposerAutoloaderInit37fdd4a02b6406828ab351aaea94cb4c', 'loadClassLoader'), true, true);
|
28 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
29 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit37fdd4a02b6406828ab351aaea94cb4c', '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\ComposerStaticInit37fdd4a02b6406828ab351aaea94cb4c::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\ComposerStaticInit37fdd4a02b6406828ab351aaea94cb4c::$files;
|
57 |
} else {
|
58 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
59 |
}
|
60 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
61 |
+
composerRequire37fdd4a02b6406828ab351aaea94cb4c($fileIdentifier, $file);
|
62 |
}
|
63 |
|
64 |
return $loader;
|
65 |
}
|
66 |
}
|
67 |
|
68 |
+
function composerRequire37fdd4a02b6406828ab351aaea94cb4c($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 ComposerStaticInit006816daff9c23385357d110a29042e9
|
|
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 ComposerStaticInit37fdd4a02b6406828ab351aaea94cb4c
|
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 = ComposerStaticInit37fdd4a02b6406828ab351aaea94cb4c::$prefixLengthsPsr4;
|
160 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit37fdd4a02b6406828ab351aaea94cb4c::$prefixDirsPsr4;
|
161 |
+
$loader->classMap = ComposerStaticInit37fdd4a02b6406828ab351aaea94cb4c::$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-09-
|
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.1632832656",
|
204 |
+
"version_normalized": "0.1.0.0-alpha1632832656",
|
205 |
"source": {
|
206 |
"type": "git",
|
207 |
"url": "https://github.com/LoginWP/Core.git",
|
208 |
+
"reference": "81a0dd88fc4901e79b2124d016eccd0d11ade3b2"
|
209 |
},
|
210 |
"dist": {
|
211 |
"type": "zip",
|
212 |
+
"url": "https://api.github.com/repos/LoginWP/Core/zipball/81a0dd88fc4901e79b2124d016eccd0d11ade3b2",
|
213 |
+
"reference": "81a0dd88fc4901e79b2124d016eccd0d11ade3b2",
|
214 |
"shasum": ""
|
215 |
},
|
216 |
"require": {
|
217 |
"collizo4sky/persist-admin-notices-dismissal": "^1.4",
|
218 |
"composer/installers": "~1.0"
|
219 |
},
|
220 |
+
"time": "2021-09-28T12:37:14+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.1632832656"
|
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.
|
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(
|
38 |
'dev_requirement' => false,
|
39 |
),
|
40 |
'loginwp/core' => array(
|
41 |
+
'pretty_version' => '0.1.0-alpha.1632832656',
|
42 |
+
'version' => '0.1.0.0-alpha1632832656',
|
43 |
'type' => 'wordpress-plugin',
|
44 |
'install_path' => __DIR__ . '/../../src/core',
|
45 |
'aliases' => array(),
|
46 |
+
'reference' => '81a0dd88fc4901e79b2124d016eccd0d11ade3b2',
|
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.3
|
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.3');
|
20 |
|
21 |
add_action('init', function () {
|
22 |
load_plugin_textdomain('peters-login-redirect', false, dirname(plugin_basename(__FILE__)) . '/languages');
|