Version Description
December 15, 2013 =
Fixed default redirect URLs not being used
Download this release
Release Info
Developer | brandon.wamboldt |
Plugin | WordPress Access Control |
Version | 4.0.3 |
Comparing to | |
See all releases |
Code changes from version 4.0.2 to 4.0.3
- readme.txt +5 -1
- wordpress-access-control.php +8 -3
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: members, only, plugin, restricted, access, menus, 3.3, wp_nav_menu, nonmembers
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.8
|
7 |
-
Stable tag: 4.0.
|
8 |
|
9 |
Restrict pages, posts, custom post types, menus and widgets to members, nonmembers or specific roles and still add to navigation
|
10 |
|
@@ -64,6 +64,10 @@ Yes, this is a new feature in 3.1.3. Use the syntax [members role="administrator
|
|
64 |
|
65 |
== Changelog ==
|
66 |
|
|
|
|
|
|
|
|
|
67 |
= 4.0.2 - December 15, 2013 =
|
68 |
|
69 |
* Fixing more compatability bugs
|
4 |
Tags: members, only, plugin, restricted, access, menus, 3.3, wp_nav_menu, nonmembers
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.8
|
7 |
+
Stable tag: 4.0.3
|
8 |
|
9 |
Restrict pages, posts, custom post types, menus and widgets to members, nonmembers or specific roles and still add to navigation
|
10 |
|
64 |
|
65 |
== Changelog ==
|
66 |
|
67 |
+
= 4.0.3 - December 15, 2013 =
|
68 |
+
|
69 |
+
* Fixed default redirect URLs not being used
|
70 |
+
|
71 |
= 4.0.2 - December 15, 2013 =
|
72 |
|
73 |
* Fixing more compatability bugs
|
wordpress-access-control.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin URI: http://brandonwamboldt.ca/plugins/members-only-menu-plugin/
|
5 |
* Author: Brandon Wamboldt
|
6 |
* Author URI: http://brandonwamboldt.ca/
|
7 |
-
* Version: 4.0.
|
8 |
* Description: This plugin is a powerful tool which gives you fine grained control over your pages and posts (and custom post types), allowing you to restrict a page, post, or custom post type to members, non-members, or even specific roles. You can customize how these pages and posts show up in search results, where users are directed when they visit them, and much more. <strong>You can even make your entire blog members only!</strong>.
|
9 |
*/
|
10 |
|
@@ -269,9 +269,14 @@ class WordPressAccessControl
|
|
269 |
if (get_post_meta($post->ID, '_wpac_is_members_only', true) && !WordPressAccessControl::check_conditions($post->ID)) {
|
270 |
if (is_singular()) {
|
271 |
$redirect_to = get_post_meta($post->ID, '_wpac_members_redirect_to', true);
|
|
|
272 |
|
273 |
if (empty($redirect_to)) {
|
274 |
-
|
|
|
|
|
|
|
|
|
275 |
} else {
|
276 |
header('Location: ' . add_query_arg('redirect_to', $_SERVER['REQUEST_URI'], $redirect_to));
|
277 |
}
|
@@ -713,7 +718,7 @@ class WordPressAccessControl
|
|
713 |
}
|
714 |
|
715 |
/**
|
716 |
-
* Loads a file that will override certain WordPress default widgets
|
717 |
* a slightly modified version that allows admins to select it's visibility
|
718 |
* (Members only or non members only).
|
719 |
*/
|
4 |
* Plugin URI: http://brandonwamboldt.ca/plugins/members-only-menu-plugin/
|
5 |
* Author: Brandon Wamboldt
|
6 |
* Author URI: http://brandonwamboldt.ca/
|
7 |
+
* Version: 4.0.3
|
8 |
* Description: This plugin is a powerful tool which gives you fine grained control over your pages and posts (and custom post types), allowing you to restrict a page, post, or custom post type to members, non-members, or even specific roles. You can customize how these pages and posts show up in search results, where users are directed when they visit them, and much more. <strong>You can even make your entire blog members only!</strong>.
|
9 |
*/
|
10 |
|
269 |
if (get_post_meta($post->ID, '_wpac_is_members_only', true) && !WordPressAccessControl::check_conditions($post->ID)) {
|
270 |
if (is_singular()) {
|
271 |
$redirect_to = get_post_meta($post->ID, '_wpac_members_redirect_to', true);
|
272 |
+
$default_redirect = get_option('wpac_default_members_redirect');
|
273 |
|
274 |
if (empty($redirect_to)) {
|
275 |
+
if (empty($default_redirect)) {
|
276 |
+
header('Location: ' . wp_login_url(site_url($_SERVER['REQUEST_URI'])));
|
277 |
+
} else {
|
278 |
+
header('Location: ' . add_query_arg('redirect_to', $_SERVER['REQUEST_URI'], $default_redirect));
|
279 |
+
}
|
280 |
} else {
|
281 |
header('Location: ' . add_query_arg('redirect_to', $_SERVER['REQUEST_URI'], $redirect_to));
|
282 |
}
|
718 |
}
|
719 |
|
720 |
/**
|
721 |
+
* Loads a file that will override certain WordPress default widgets withget_pages
|
722 |
* a slightly modified version that allows admins to select it's visibility
|
723 |
* (Members only or non members only).
|
724 |
*/
|