Version Description
December 18, 2013 =
Fixing syntax errors (forgot to turn WP_DEBUG back on)
Download this release
Release Info
Developer | brandon.wamboldt |
Plugin | WordPress Access Control |
Version | 4.0.8 |
Comparing to | |
See all releases |
Code changes from version 4.0.7 to 4.0.8
- lib/Walker.php +5 -2
- readme.txt +5 -1
- wordpress-access-control.php +1 -1
lib/Walker.php
CHANGED
@@ -71,7 +71,7 @@ class WpacSecureWalker extends Walker_Nav_Menu
|
|
71 |
}
|
72 |
|
73 |
if (WordPressAccessControl::check_conditions($object_id) || get_option('wpac_show_in_menus', 'with_access') == 'always') {
|
74 |
-
if (in_array($
|
75 |
$this->track_ids[] = $element->{$this->db_fields['id']};
|
76 |
$this->filter_children($element->{$this->db_fields['id']}, $children_elements);
|
77 |
$this->original_walker->display_element($element, $children_elements, $max_depth, $depth, $args, $output);
|
@@ -131,6 +131,9 @@ class WpacSecureWalker extends Walker_Nav_Menu
|
|
131 |
/**
|
132 |
* Recursively removes any child nav menu item that the user doesn't have the
|
133 |
* correct permission to view.
|
|
|
|
|
|
|
134 |
*/
|
135 |
protected function filter_children($id, &$children_elements)
|
136 |
{
|
@@ -150,7 +153,7 @@ class WpacSecureWalker extends Walker_Nav_Menu
|
|
150 |
if (WordPressAccessControl::check_conditions($object_id) || get_option('wpac_show_in_menus', 'with_access') == 'always') {
|
151 |
if (in_array($element->{$this->db_fields['parent']}, $this->track_ids) || $element->{$this->db_fields['parent']} == 0) {
|
152 |
$this->track_ids[] = $element->{$this->db_fields['id']};
|
153 |
-
$this->
|
154 |
} else {
|
155 |
$this->truncate_children($element->{$this->db_fields['id']}, $children_elements);
|
156 |
unset($children_elements[$id][$index]);
|
71 |
}
|
72 |
|
73 |
if (WordPressAccessControl::check_conditions($object_id) || get_option('wpac_show_in_menus', 'with_access') == 'always') {
|
74 |
+
if (in_array($element->{$this->db_fields['parent']}, $this->track_ids) || $element->{$this->db_fields['parent']} == 0) {
|
75 |
$this->track_ids[] = $element->{$this->db_fields['id']};
|
76 |
$this->filter_children($element->{$this->db_fields['id']}, $children_elements);
|
77 |
$this->original_walker->display_element($element, $children_elements, $max_depth, $depth, $args, $output);
|
131 |
/**
|
132 |
* Recursively removes any child nav menu item that the user doesn't have the
|
133 |
* correct permission to view.
|
134 |
+
*
|
135 |
+
* @param integer $id
|
136 |
+
* @param array $children
|
137 |
*/
|
138 |
protected function filter_children($id, &$children_elements)
|
139 |
{
|
153 |
if (WordPressAccessControl::check_conditions($object_id) || get_option('wpac_show_in_menus', 'with_access') == 'always') {
|
154 |
if (in_array($element->{$this->db_fields['parent']}, $this->track_ids) || $element->{$this->db_fields['parent']} == 0) {
|
155 |
$this->track_ids[] = $element->{$this->db_fields['id']};
|
156 |
+
$this->filter_children($element->{$this->db_fields['id']}, $children_elements);
|
157 |
} else {
|
158 |
$this->truncate_children($element->{$this->db_fields['id']}, $children_elements);
|
159 |
unset($children_elements[$id][$index]);
|
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.7 - December 18, 2013 =
|
68 |
|
69 |
* Fixed faulty code which cause menu items to show up when they shouldn't
|
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
|
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.8 - December 18, 2013 =
|
68 |
+
|
69 |
+
* Fixing syntax errors (forgot to turn WP_DEBUG back on)
|
70 |
+
|
71 |
= 4.0.7 - December 18, 2013 =
|
72 |
|
73 |
* Fixed faulty code which cause menu items to show up when they shouldn't
|
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 |
|
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
|
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 |
|