WordPress Access Control - Version 4.0.1

Version Description

  • December 14, 2013 =

  • Fix login redirect to remove hard coded URL

Download this release

Release Info

Developer brandon.wamboldt
Plugin Icon wp plugin WordPress Access Control
Version 4.0.1
Comparing to
See all releases

Code changes from version 4.0.0 to 4.0.1

Files changed (2) hide show
  1. readme.txt +5 -1
  2. wordpress-access-control.php +3 -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.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.0 - December 13, 2013 =
68
 
69
  * Rewrote the Nav Walker classes to be more minimalistic and to defer actual functionality to the originally configured walker, allowing for better compatability with themes or plugins that use their own nav walkers
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.1
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.1 - December 14, 2013 =
68
+
69
+ * Fix login redirect to remove hard coded URL
70
+
71
  = 4.0.0 - December 13, 2013 =
72
 
73
  * Rewrote the Nav Walker classes to be more minimalistic and to defer actual functionality to the originally configured walker, allowing for better compatability with themes or plugins that use their own nav walkers
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.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,12 +269,12 @@ class WordPressAccessControl
269
  $redirect_to = get_post_meta($post->ID, '_wpac_members_redirect_to', true);
270
 
271
  if (empty($redirect_to)) {
272
- header('Location: ' . get_bloginfo('wpurl') . '/wp-login.php?redirect_to=' . $_SERVER['REQUEST_URI']);
273
  } else {
274
  header('Location: ' . add_query_arg('redirect_to', $_SERVER['REQUEST_URI'], $redirect_to));
275
  }
276
 
277
- exit();
278
  }
279
  }
280
  }
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.1
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
  $redirect_to = get_post_meta($post->ID, '_wpac_members_redirect_to', true);
270
 
271
  if (empty($redirect_to)) {
272
+ header('Location: ' . wp_login_url(site_url($_SERVER['REQUEST_URI'])));
273
  } else {
274
  header('Location: ' . add_query_arg('redirect_to', $_SERVER['REQUEST_URI'], $redirect_to));
275
  }
276
 
277
+ exit;
278
  }
279
  }
280
  }