Members - Version 0.2.3

Version Description

Download this release

Release Info

Developer greenshady
Plugin Icon 128x128 Members
Version 0.2.3
Comparing to
See all releases

Code changes from version 0.2.2 to 0.2.3

Files changed (4) hide show
  1. admin/settings.php +15 -15
  2. includes/shortcodes.php +1 -1
  3. members.php +4 -14
  4. readme.txt +10 -3
admin/settings.php CHANGED
@@ -73,35 +73,35 @@ function members_settings_page_load_meta_boxes() {
73
  *
74
  * @since 0.2.0
75
  */
76
- function members_validate_settings( $input ) {
77
 
78
  /* Check if the role manager is active. */
79
- $settings['role_manager'] = ( isset( $input['role_manager'] ) ? 1 : 0 );
80
 
81
  /* Check if the content permissions feature is active. */
82
- $settings['content_permissions'] = ( isset( $input['content_permissions'] ) ? 1 : 0 );
83
 
84
  /* Set the content permissions error text and kill evil scripts. */
85
- if ( current_user_can( 'unfiltered_html' ) && isset( $input['content_permissions_error'] ) )
86
- $settings['content_permissions_error'] = stripslashes( wp_filter_post_kses( addslashes( $input['content_permissions_error'] ) ) );
87
 
88
- elseif ( isset( $input['content_permissions_error'] ) )
89
- $settings['content_permissions_error'] = $input['content_permissions_error'];
90
 
91
  /* Check if the login form and users widgets are active. */
92
- $settings['login_form_widget'] = ( isset( $input['login_form_widget'] ) ? 1 : 0 );
93
- $settings['users_widget'] = ( isset( $input['users_widget'] ) ? 1 : 0 );
94
 
95
  /* Check if the private blog and private feed features are active. */
96
- $settings['private_blog'] = ( isset( $input['private_blog'] ) ? 1 : 0 );
97
- $settings['private_feed'] = ( isset( $input['private_feed'] ) ? 1 : 0 );
98
 
99
  /* Set the private feed error text and kill evil scripts. */
100
- if ( current_user_can( 'unfiltered_html' ) && isset( $input['private_feed_error'] ) )
101
- $settings['private_feed_error'] = stripslashes( wp_filter_post_kses( addslashes( $input['private_feed_error'] ) ) );
102
 
103
- elseif ( isset( $input['private_feed_error'] ) )
104
- $settings['private_feed_error'] = $input['private_feed_error'];
105
 
106
  /* Return the validated/sanitized settings. */
107
  return $settings;
73
  *
74
  * @since 0.2.0
75
  */
76
+ function members_validate_settings( $settings ) {
77
 
78
  /* Check if the role manager is active. */
79
+ $settings['role_manager'] = ( isset( $settings['role_manager'] ) ? 1 : 0 );
80
 
81
  /* Check if the content permissions feature is active. */
82
+ $settings['content_permissions'] = ( isset( $settings['content_permissions'] ) ? 1 : 0 );
83
 
84
  /* Set the content permissions error text and kill evil scripts. */
85
+ if ( current_user_can( 'unfiltered_html' ) && isset( $settings['content_permissions_error'] ) )
86
+ $settings['content_permissions_error'] = stripslashes( wp_filter_post_kses( addslashes( $settings['content_permissions_error'] ) ) );
87
 
88
+ elseif ( isset( $settings['content_permissions_error'] ) )
89
+ $settings['content_permissions_error'] = $settings['content_permissions_error'];
90
 
91
  /* Check if the login form and users widgets are active. */
92
+ $settings['login_form_widget'] = ( isset( $settings['login_form_widget'] ) ? 1 : 0 );
93
+ $settings['users_widget'] = ( isset( $settings['users_widget'] ) ? 1 : 0 );
94
 
95
  /* Check if the private blog and private feed features are active. */
96
+ $settings['private_blog'] = ( isset( $settings['private_blog'] ) ? 1 : 0 );
97
+ $settings['private_feed'] = ( isset( $settings['private_feed'] ) ? 1 : 0 );
98
 
99
  /* Set the private feed error text and kill evil scripts. */
100
+ if ( current_user_can( 'unfiltered_html' ) && isset( $settings['private_feed_error'] ) )
101
+ $settings['private_feed_error'] = stripslashes( wp_filter_post_kses( addslashes( $settings['private_feed_error'] ) ) );
102
 
103
+ elseif ( isset( $settings['private_feed_error'] ) )
104
+ $settings['private_feed_error'] = $settings['private_feed_error'];
105
 
106
  /* Return the validated/sanitized settings. */
107
  return $settings;
includes/shortcodes.php CHANGED
@@ -23,7 +23,7 @@ function members_register_shortcodes() {
23
  add_shortcode( 'access', 'members_access_check_shortcode' );
24
 
25
  /* Add the [feed] shortcode. */
26
- add_shortcode( 'feed', 'members_access_check_shortcode' );
27
 
28
  /* Add the [is_user_logged_in] shortcode. */
29
  add_shortcode( 'is_user_logged_in', 'members_is_user_logged_in_shortcode' );
23
  add_shortcode( 'access', 'members_access_check_shortcode' );
24
 
25
  /* Add the [feed] shortcode. */
26
+ add_shortcode( 'feed', 'members_feed_shortcode' );
27
 
28
  /* Add the [is_user_logged_in] shortcode. */
29
  add_shortcode( 'is_user_logged_in', 'members_is_user_logged_in_shortcode' );
members.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Members
4
  * Plugin URI: http://justintadlock.com/archives/2009/09/17/members-wordpress-plugin
5
  * Description: A user, role, and content management plugin for controlling permissions and access. A plugin for making WordPress a more powerful <acronym title="Content Management System">CMS</acronym>.
6
- * Version: 0.2.2
7
  * Author: Justin Tadlock
8
  * Author URI: http://justintadlock.com
9
  *
@@ -20,9 +20,9 @@
20
  * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21
  *
22
  * @package Members
23
- * @version 0.2.2
24
  * @author Justin Tadlock <justin@justintadlock.com>
25
- * @copyright Copyright (c) 2009 - 2012, Justin Tadlock
26
  * @link http://justintadlock.com/archives/2009/09/17/members-wordpress-plugin
27
  * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
28
  */
@@ -32,16 +32,6 @@
32
  */
33
  class Members_Load {
34
 
35
- /**
36
- * PHP4 constructor method. This will be removed once the plugin only supports WordPress 3.2,
37
- * which is the version that drops PHP4 support.
38
- *
39
- * @since 0.2.0
40
- */
41
- function Members_Load() {
42
- $this->__construct();
43
- }
44
-
45
  /**
46
  * PHP5 constructor method.
47
  *
@@ -170,7 +160,7 @@ class Members_Load {
170
  function activation() {
171
 
172
  /* Get the administrator role. */
173
- $role =& get_role( 'administrator' );
174
 
175
  /* If the administrator role exists, add required capabilities for the plugin. */
176
  if ( !empty( $role ) ) {
3
  * Plugin Name: Members
4
  * Plugin URI: http://justintadlock.com/archives/2009/09/17/members-wordpress-plugin
5
  * Description: A user, role, and content management plugin for controlling permissions and access. A plugin for making WordPress a more powerful <acronym title="Content Management System">CMS</acronym>.
6
+ * Version: 0.2.3
7
  * Author: Justin Tadlock
8
  * Author URI: http://justintadlock.com
9
  *
20
  * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21
  *
22
  * @package Members
23
+ * @version 0.2.3
24
  * @author Justin Tadlock <justin@justintadlock.com>
25
+ * @copyright Copyright (c) 2009 - 2013, Justin Tadlock
26
  * @link http://justintadlock.com/archives/2009/09/17/members-wordpress-plugin
27
  * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
28
  */
32
  */
33
  class Members_Load {
34
 
 
 
 
 
 
 
 
 
 
 
35
  /**
36
  * PHP5 constructor method.
37
  *
160
  function activation() {
161
 
162
  /* Get the administrator role. */
163
+ $role = get_role( 'administrator' );
164
 
165
  /* If the administrator role exists, add required capabilities for the plugin. */
166
  if ( !empty( $role ) ) {
readme.txt CHANGED
@@ -1,10 +1,11 @@
1
  === Members ===
 
2
  Contributors: greenshady
3
  Donate link: http://themehybrid.com/donate
4
  Tags: admin, role, roles, member, members, profile, shortcode, user, users, widget, widgets
5
  Requires at least: 3.4
6
- Tested up to: 3.5
7
- Stable tag: 0.2.2
8
 
9
  A user, role, and content management plugin that makes WordPress a more powerful CMS.
10
 
@@ -30,7 +31,7 @@ If you've used a previous version of the Members plugin, please check your setti
30
 
31
  1. Upload `members` to the `/wp-content/plugins/` directory.
32
  1. Activate the plugin through the 'Plugins' menu in WordPress.
33
- 1. Go to <em>Settings > Members Components</em> to select which components you'd like to use.
34
 
35
  More detailed instructions are included in the plugin's `readme.html` file.
36
 
@@ -70,6 +71,12 @@ Well, that's why you really need to read the documentation for the plugin before
70
 
71
  == Changelog ==
72
 
 
 
 
 
 
 
73
  **Version 0.2.2**
74
 
75
  * No longer displays non-editable roles on the edit roles screen.
1
  === Members ===
2
+
3
  Contributors: greenshady
4
  Donate link: http://themehybrid.com/donate
5
  Tags: admin, role, roles, member, members, profile, shortcode, user, users, widget, widgets
6
  Requires at least: 3.4
7
+ Tested up to: 3.7
8
+ Stable tag: 0.2.3
9
 
10
  A user, role, and content management plugin that makes WordPress a more powerful CMS.
11
 
31
 
32
  1. Upload `members` to the `/wp-content/plugins/` directory.
33
  1. Activate the plugin through the 'Plugins' menu in WordPress.
34
+ 1. Go to <em>Settings > Members</em> to select which settings you'd like to use.
35
 
36
  More detailed instructions are included in the plugin's `readme.html` file.
37
 
71
 
72
  == Changelog ==
73
 
74
+ **Version 0.2.3**
75
+
76
+ * Fixes the strict standards notice "Redefining already defined constructor for class Members_Load".
77
+ * No longer uses `&` for passing the role name by reference on plugin activation.
78
+ * Fixes the `[feed]` shortcode, which was using the wrong callback function.
79
+
80
  **Version 0.2.2**
81
 
82
  * No longer displays non-editable roles on the edit roles screen.