WordPress Access Control - Version 4.0.10

Version Description

  • September 13, 2014 =

  • Get the localized roles using translate_user_role

Download this release

Release Info

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

Code changes from version 4.0.9 to 4.0.10

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: 4.0
7
- Stable tag: 4.0.9
8
 
9
  Restrict pages, posts, custom post types, menus and widgets to members, nonmembers or specific roles and still add to navigation
10
 
@@ -64,7 +64,11 @@ Yes, this is a new feature in 3.1.3. Use the syntax [members role="administrator
64
 
65
  == Changelog ==
66
 
67
- = 4.0.9 - December 18, 2013 =
 
 
 
 
68
 
69
  * Mark as compatible with WordPress 4.0
70
  * Fix some checkboxes (for roles) not having label tags
4
  Tags: members, only, plugin, restricted, access, menus, 3.3, wp_nav_menu, nonmembers
5
  Requires at least: 3.0
6
  Tested up to: 4.0
7
+ Stable tag: 4.0.10
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.10 - September 13, 2014 =
68
+
69
+ * Get the localized roles using translate_user_role
70
+
71
+ = 4.0.9 - September 11, 2014 =
72
 
73
  * Mark as compatible with WordPress 4.0
74
  * Fix some checkboxes (for roles) not having label tags
templates/meta_box.php CHANGED
@@ -11,7 +11,7 @@
11
 
12
  <?php
13
  global $wp_roles;
14
- $roles = $wp_roles->get_names();
15
  $checked_roles = (array) maybe_unserialize( get_post_meta( $post->ID, '_wpac_restricted_to', TRUE ) );
16
 
17
  if ( $post->post_status == 'auto-draft' && $post->post_type == 'post' ) {
11
 
12
  <?php
13
  global $wp_roles;
14
+ $roles = array_map('translate_user_role', $wp_roles->get_names());
15
  $checked_roles = (array) maybe_unserialize( get_post_meta( $post->ID, '_wpac_restricted_to', TRUE ) );
16
 
17
  if ( $post->post_status == 'auto-draft' && $post->post_type == 'post' ) {
templates/options.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- global $wp_post_types;
3
 
4
  $custom_post_types = array();
5
 
@@ -102,8 +102,7 @@ After a user logs in they will be redirected back to the blog', 'wpac' ), '<br
102
  </th>
103
  <td>
104
  <?php
105
- global $wp_roles;
106
- $roles = $wp_roles->get_names();
107
  $checked_roles = (array) maybe_unserialize( get_option( 'wpac_always_accessible_by', array( 0 => 'administrator' ) ) );
108
 
109
  foreach ( $roles as $role => $label ) {
@@ -161,8 +160,7 @@ After a user logs in they will be redirected back to the blog', 'wpac' ), '<br
161
  </th>
162
  <td>
163
  <?php
164
- global $wp_roles;
165
- $roles = $wp_roles->get_names();
166
  $checked_roles = (array) get_option( 'wpac_posts_default_restricted_to', array() );
167
 
168
  foreach ( $roles as $role => $label ) {
@@ -194,8 +192,7 @@ After a user logs in they will be redirected back to the blog', 'wpac' ), '<br
194
  </th>
195
  <td>
196
  <?php
197
- global $wp_roles;
198
- $roles = $wp_roles->get_names();
199
  $checked_roles = (array) get_option( 'wpac_pages_default_restricted_to', array() );
200
 
201
  foreach ( $roles as $role => $label ) {
1
  <?php
2
+ global $wp_post_types, $wp_roles;
3
 
4
  $custom_post_types = array();
5
 
102
  </th>
103
  <td>
104
  <?php
105
+ $roles = array_map('translate_user_role', $wp_roles->get_names());
 
106
  $checked_roles = (array) maybe_unserialize( get_option( 'wpac_always_accessible_by', array( 0 => 'administrator' ) ) );
107
 
108
  foreach ( $roles as $role => $label ) {
160
  </th>
161
  <td>
162
  <?php
163
+ $roles = array_map('translate_user_role', $wp_roles->get_names());
 
164
  $checked_roles = (array) get_option( 'wpac_posts_default_restricted_to', array() );
165
 
166
  foreach ( $roles as $role => $label ) {
192
  </th>
193
  <td>
194
  <?php
195
+ $roles = array_map('translate_user_role', $wp_roles->get_names());
 
196
  $checked_roles = (array) get_option( 'wpac_pages_default_restricted_to', array() );
197
 
198
  foreach ( $roles as $role => $label ) {
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.9
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.10
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