Permalink
Browse files

Make sure the $settings are all returned instead of only things speci…

…fic to the plugin settings. We want other plugins to be able to hook into it.

git-svn-id: http://svn.locallylost.com/plugins/members/trunk@764 dba0f204-706d-4bc1-bc29-8b92e0485636
  • Loading branch information...
1 parent dc32dbd commit a224100c92c441b046670cf88dd8c5b41b21dce1 greenshady committed Jun 16, 2011
Showing with 18 additions and 18 deletions.
  1. +15 −15 admin/settings.php
  2. +3 −3 members.php
View
30 admin/settings.php
@@ -73,35 +73,35 @@ function members_settings_page_load_meta_boxes() {
*
* @since 0.2.0
*/
-function members_validate_settings( $input ) {
+function members_validate_settings( $settings ) {
/* Check if the role manager is active. */
- $settings['role_manager'] = ( isset( $input['role_manager'] ) ? 1 : 0 );
+ $settings['role_manager'] = ( isset( $settings['role_manager'] ) ? 1 : 0 );
/* Check if the content permissions feature is active. */
- $settings['content_permissions'] = ( isset( $input['content_permissions'] ) ? 1 : 0 );
+ $settings['content_permissions'] = ( isset( $settings['content_permissions'] ) ? 1 : 0 );
/* Set the content permissions error text and kill evil scripts. */
- if ( current_user_can( 'unfiltered_html' ) && isset( $input['content_permissions_error'] ) )
- $settings['content_permissions_error'] = stripslashes( wp_filter_post_kses( addslashes( $input['content_permissions_error'] ) ) );
+ if ( current_user_can( 'unfiltered_html' ) && isset( $settings['content_permissions_error'] ) )
+ $settings['content_permissions_error'] = stripslashes( wp_filter_post_kses( addslashes( $settings['content_permissions_error'] ) ) );
- elseif ( isset( $input['content_permissions_error'] ) )
- $settings['content_permissions_error'] = $input['content_permissions_error'];
+ elseif ( isset( $settings['content_permissions_error'] ) )
+ $settings['content_permissions_error'] = $settings['content_permissions_error'];
/* Check if the login form and users widgets are active. */
- $settings['login_form_widget'] = ( isset( $input['login_form_widget'] ) ? 1 : 0 );
- $settings['users_widget'] = ( isset( $input['users_widget'] ) ? 1 : 0 );
+ $settings['login_form_widget'] = ( isset( $settings['login_form_widget'] ) ? 1 : 0 );
+ $settings['users_widget'] = ( isset( $settings['users_widget'] ) ? 1 : 0 );
/* Check if the private blog and private feed features are active. */
- $settings['private_blog'] = ( isset( $input['private_blog'] ) ? 1 : 0 );
- $settings['private_feed'] = ( isset( $input['private_feed'] ) ? 1 : 0 );
+ $settings['private_blog'] = ( isset( $settings['private_blog'] ) ? 1 : 0 );
+ $settings['private_feed'] = ( isset( $settings['private_feed'] ) ? 1 : 0 );
/* Set the private feed error text and kill evil scripts. */
- if ( current_user_can( 'unfiltered_html' ) && isset( $input['private_feed_error'] ) )
- $settings['private_feed_error'] = stripslashes( wp_filter_post_kses( addslashes( $input['private_feed_error'] ) ) );
+ if ( current_user_can( 'unfiltered_html' ) && isset( $settings['private_feed_error'] ) )
+ $settings['private_feed_error'] = stripslashes( wp_filter_post_kses( addslashes( $settings['private_feed_error'] ) ) );
- elseif ( isset( $input['private_feed_error'] ) )
- $settings['private_feed_error'] = $input['private_feed_error'];
+ elseif ( isset( $settings['private_feed_error'] ) )
+ $settings['private_feed_error'] = $settings['private_feed_error'];
/* Return the validated/sanitized settings. */
return $settings;
View
6 members.php
@@ -3,7 +3,7 @@
* Plugin Name: Members
* Plugin URI: http://justintadlock.com/archives/2009/09/17/members-wordpress-plugin
* 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>.
- * Version: 0.2
+ * Version: 0.3 Alpha
* Author: Justin Tadlock
* Author URI: http://justintadlock.com
*
@@ -20,7 +20,7 @@
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @package Members
- * @version 0.2.0
+ * @version 0.3.0 Alpha
* @author Justin Tadlock <justin@justintadlock.com>
* @copyright Copyright (c) 2009 - 2011, Justin Tadlock
* @link http://justintadlock.com/archives/2009/09/17/members-wordpress-plugin
@@ -73,7 +73,7 @@ function __construct() {
function constants() {
/* Set the version number of the plugin. */
- define( 'MEMBERS_VERSION', '0.2.0' );
+ define( 'MEMBERS_VERSION', '0.3.0' );
/* Set the database version number of the plugin. */
define( 'MEMBERS_DB_VERSION', 2 );

0 comments on commit a224100

Please sign in to comment.