WordPress Access Control - Version 4.0.2

Version Description

  • December 15, 2013 =

  • Fixing more compatability bugs

  • Fixing PHP notices & warnings

  • Fixed bug when using page navigation fallback (no menu selected)

Download this release

Release Info

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

Code changes from version 4.0.1 to 4.0.2

Files changed (3) hide show
  1. lib/Walker.php +1 -1
  2. readme.txt +7 -1
  3. wordpress-access-control.php +7 -3
lib/Walker.php CHANGED
@@ -32,7 +32,7 @@ class WpacSecureWalker extends Walker_Nav_Menu
32
  *
33
  * @param Walker_Nav_Menu $original_walker
34
  */
35
- public function __construct($original_walker)
36
  {
37
  if (empty($original_walker)) {
38
  $original_walker = new Walker_Nav_Menu;
32
  *
33
  * @param Walker_Nav_Menu $original_walker
34
  */
35
+ public function __construct($original_walker = null)
36
  {
37
  if (empty($original_walker)) {
38
  $original_walker = new Walker_Nav_Menu;
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.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,6 +64,12 @@ Yes, this is a new feature in 3.1.3. Use the syntax [members role="administrator
64
 
65
  == Changelog ==
66
 
 
 
 
 
 
 
67
  = 4.0.1 - December 14, 2013 =
68
 
69
  * Fix login redirect to remove hard coded URL
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.2
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.2 - December 15, 2013 =
68
+
69
+ * Fixing more compatability bugs
70
+ * Fixing PHP notices & warnings
71
+ * Fixed bug when using page navigation fallback (no menu selected)
72
+
73
  = 4.0.1 - December 14, 2013 =
74
 
75
  * Fix login redirect to remove hard coded URL
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.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
 
@@ -248,7 +248,9 @@ class WordPressAccessControl
248
  {
249
  global $post;
250
 
251
- if (is_admin()) return;
 
 
252
 
253
  // Check for a members only blog
254
  $blog_is_members_only = get_option('wpac_members_only_blog', false);
@@ -562,8 +564,10 @@ class WordPressAccessControl
562
  // Only remove the walker if it is ours
563
  if (isset($args['walker']) && get_class($args['walker']) == 'WpacSecureWalker') {
564
  $args['walker'] = new WpacSecureWalker(new Walker_Page());
565
- } else {
566
  $args['walker'] = new WpacSecureWalker($args['walker']);
 
 
567
  }
568
 
569
  return $args;
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.2
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
 
248
  {
249
  global $post;
250
 
251
+ if (is_admin() || !$post) {
252
+ return;
253
+ }
254
 
255
  // Check for a members only blog
256
  $blog_is_members_only = get_option('wpac_members_only_blog', false);
564
  // Only remove the walker if it is ours
565
  if (isset($args['walker']) && get_class($args['walker']) == 'WpacSecureWalker') {
566
  $args['walker'] = new WpacSecureWalker(new Walker_Page());
567
+ } elseif (isset($args['walker'])) {
568
  $args['walker'] = new WpacSecureWalker($args['walker']);
569
+ } else {
570
+ $args['walker'] = new WpacSecureWalker(new Walker_Page());
571
  }
572
 
573
  return $args;