Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 16 commits
  • 8 files changed
  • 0 commit comments
  • 1 contributor
View
8 admin/meta-box-post-content-permissions.php
@@ -11,6 +11,8 @@
/* Saves the content permissions metabox data to a custom field. */
add_action( 'save_post', 'members_content_permissions_save_meta', 10, 2 );
+add_action( 'add_attachment', 'members_content_permissions_save_meta' );
+add_action( 'edit_attachment', 'members_content_permissions_save_meta' );
/**
* @since 0.1.0
@@ -88,9 +90,13 @@ function members_content_permissions_meta_box( $object, $box ) {
/**
* @since 0.1.0
*/
-function members_content_permissions_save_meta( $post_id, $post ) {
+function members_content_permissions_save_meta( $post_id, $post = '' ) {
global $wp_roles;
+ /* Fix for attachment save issue in WordPress 3.5. @link http://core.trac.wordpress.org/ticket/21963 */
+ if ( !is_object( $post ) )
+ $post = get_post();
+
/* Verify the nonce. */
if ( !isset( $_POST['content_permissions_meta_nonce'] ) || !wp_verify_nonce( $_POST['content_permissions_meta_nonce'], plugin_basename( __FILE__ ) ) )
return false;
View
5 admin/roles-list-table.php
@@ -6,9 +6,6 @@
* @subpackage Admin
*/
-/* Get the global $wp_roles variable. */
-global $wp_roles;
-
/* Get a count of all the roles available. */
$roles_count = members_count_roles();
@@ -40,7 +37,7 @@
$role_status = 'all';
/* Set up the roles array. */
- $list_roles = $wp_roles->role_names;
+ $list_roles = array_merge( $active_roles, $inactive_roles );
/* Set the current page URL. */
$current_page = $current_page = admin_url( 'users.php?page=roles' );
View
4 docs/readme.html
@@ -234,7 +234,7 @@ <h2 id="old-levels">Need the old user levels system?</h2>
<h2 id="plugin-support">Plugin support</h2>
-<p>I run a WordPress community called <a href="http://themehybrid.com" title="Theme Hybrid">Theme Hybrid</a>, which is where I fully support all of my WordPress projects, including plugins. You can sign up for an account to get plugin support for a small yearly fee ($25 <acronym title="United States Dollars">USD</acronym> at the time of writing).</p>
+<p>I run a WordPress community called <a href="http://themehybrid.com" title="Theme Hybrid">Theme Hybrid</a>, which is where I fully support all of my WordPress projects, including plugins. You can sign up for an account to get plugin support for a small yearly fee ($29 <acronym title="United States Dollars">USD</acronym> at the time of writing).</p>
<p>I know. I know. You might not want to pay for support, but just consider it a donation to the project. To continue making cool, <acronym title="GNU General Public License">GPL</acronym>-licensed plugins and having the time to support them, I must pay the bills.</p>
@@ -244,7 +244,7 @@ <h2 id="copyright">Copyright &amp; license</h2>
<p>This plugin is copyrighted to <a href="http://justintadlock.com" title="Justin Tadlock">Justin Tadlock</a>.</p>
-<p>2009&thinsp;&ndash;&thinsp;2011 &copy; Justin Tadlock</p>
+<p>2009&thinsp;&ndash;&thinsp;2012 &copy; Justin Tadlock</p>
</body>
</html>
View
6 includes/functions.php
@@ -35,7 +35,7 @@ function members_count_roles() {
global $wp_roles;
if ( !empty( $wp_roles->role_names ) )
- return count( $wp_roles->role_names );
+ return count( apply_filters( 'editable_roles', $wp_roles->role_names ) );
return false;
}
@@ -52,7 +52,7 @@ function members_get_active_roles() {
$active = array();
- foreach ( $wp_roles->role_names as $role => $name ) {
+ foreach ( apply_filters( 'editable_roles', $wp_roles->role_names ) as $role => $name ) {
$count = members_get_role_user_count( $role );
@@ -78,7 +78,7 @@ function members_get_inactive_roles() {
$inactive = array();
- foreach ( $wp_roles->role_names as $role => $name ) {
+ foreach ( apply_filters( 'editable_roles', $wp_roles->role_names ) as $role => $name ) {
$count = members_get_role_user_count( $role );
View
2  includes/shortcodes.php
@@ -23,7 +23,7 @@ function members_register_shortcodes() {
add_shortcode( 'access', 'members_access_check_shortcode' );
/* Add the [feed] shortcode. */
- add_shortcode( 'feed', 'members_access_check_shortcode' );
+ add_shortcode( 'feed', 'members_feed_shortcode' );
/* Add the [is_user_logged_in] shortcode. */
add_shortcode( 'is_user_logged_in', 'members_is_user_logged_in_shortcode' );
View
4 includes/update.php
@@ -6,6 +6,10 @@
* @subpackage Includes
*/
+/* Don't run when installing. */
+if ( defined( 'WP_INSTALLING' ) && WP_INSTALLING )
+ return;
+
/* Hook our version check to 'init'. */
add_action( 'init', 'members_version_check' );
View
22 members.php
@@ -1,9 +1,9 @@
<?php
/**
* Plugin Name: Members
- * Plugin URI: http://justintadlock.com/archives/2009/09/17/members-wordpress-plugin
+ * Plugin URI: http://themehybrid.com/plugins/members
* 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.1
+ * Version: 0.2.4
* Author: Justin Tadlock
* Author URI: http://justintadlock.com
*
@@ -20,9 +20,9 @@
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @package Members
- * @version 0.2.1
+ * @version 0.2.4
* @author Justin Tadlock <justin@justintadlock.com>
- * @copyright Copyright (c) 2009 - 2012, Justin Tadlock
+ * @copyright Copyright (c) 2009 - 2013, Justin Tadlock
* @link http://justintadlock.com/archives/2009/09/17/members-wordpress-plugin
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
@@ -33,16 +33,6 @@
class Members_Load {
/**
- * PHP4 constructor method. This will be removed once the plugin only supports WordPress 3.2,
- * which is the version that drops PHP4 support.
- *
- * @since 0.2.0
- */
- function Members_Load() {
- $this->__construct();
- }
-
- /**
* PHP5 constructor method.
*
* @since 0.2.0
@@ -77,7 +67,7 @@ function __construct() {
function constants() {
/* Set the version number of the plugin. */
- define( 'MEMBERS_VERSION', '0.2.0' );
+ define( 'MEMBERS_VERSION', '0.2.4' );
/* Set the database version number of the plugin. */
define( 'MEMBERS_DB_VERSION', 2 );
@@ -170,7 +160,7 @@ function admin() {
function activation() {
/* Get the administrator role. */
- $role =& get_role( 'administrator' );
+ $role = get_role( 'administrator' );
/* If the administrator role exists, add required capabilities for the plugin. */
if ( !empty( $role ) ) {
View
62 readme.txt
@@ -1,20 +1,21 @@
=== Members ===
+
Contributors: greenshady
Donate link: http://themehybrid.com/donate
Tags: admin, role, roles, member, members, profile, shortcode, user, users, widget, widgets
Requires at least: 3.4
-Tested up to: 3.5
-Stable tag: 0.2.1
+Tested up to: 3.7
+Stable tag: 0.2.4
A user, role, and content management plugin that makes WordPress a more powerful CMS.
== Description ==
-*Members* is a plugin that extends your control over your blog. It's a user, role, and content management plugin that was created to make WordPress a more powerful CMS.
+Members is a plugin that extends your control over your blog. It's a user, role, and content management plugin that was created to make WordPress a more powerful CMS.
The foundation of the plugin is its extensive role and capability management system. This is the backbone of all the current features and planned future features.
-**Plugin Features:**
+### Plugin Features:
* Role Manager: Allows you to edit, create, and delete roles as well as capabilities for these roles.
* Content Permissions: Gives you control over which users (by role) have access to post content.
@@ -22,27 +23,35 @@ The foundation of the plugin is its extensive role and capability management sys
* Widgets: A login form widget and users widget to show in your theme's sidebars.
* Private Site: You can make your site and its feed completely private if you want.
-**If updating from a previous version:**
+### Professional Support
+
+If you need professional plugin support from me, the plugin author, you can access the support forums at [Theme Hybrid](http://themehybrid.com/support), which is a professional WordPress help/support site where I handle support for all my plugins and themes for a community of 40,000+ users (and growing).
+
+### Plugin Development
-If you've used a previous version of the Members plugin, please check your settings under Settings > Members and reset your Users and Login Form widgets (if you were using them).
+If you're a theme author, plugin author, or just a code hobbyist, you can follow the development of this plugin on it's [GitHub repository](https://github.com/justintadlock/members).
+
+### Donations
+
+Yes, I do accept donations. If you want to buy me a beer or whatever, you can do so from my [donations page](http://themehybrid.com/donate). I appreciate all donations, no matter the size. Further development of this plugin is not contingent on donations, but they are always a nice incentive.
== Installation ==
1. Upload `members` to the `/wp-content/plugins/` directory.
-1. Activate the plugin through the 'Plugins' menu in WordPress.
-1. Go to <em>Settings > Members Components</em> to select which components you'd like to use.
+2. Activate the plugin through the 'Plugins' menu in WordPress.
+3. Go to <em>Settings > Members</em> to select which settings you'd like to use.
More detailed instructions are included in the plugin's `readme.html` file.
== Frequently Asked Questions ==
-= Why was this plugin created? =
+### Why was this plugin created?
I wasn't satisfied with the current user, role, and permissions plugins available. Yes, some of them are good, but nothing fit what I had in mind perfectly. Some offered few features. Some worked completely outside of the WordPress APIs. Others lacked the GPL license.
This plugin is still a long way away from my goals, but it'll get there eventually.
-= How do I use it? =
+### How do I use it?
Most things should be fairly straightforward, but I've included an in-depth guide in the plugin download. It's a file called `readme.html` in the `/docs` folder.
@@ -50,13 +59,13 @@ You'll want to look over that. It's probably the most in-depth plugin documenta
Now, open up the `/docs/readme.html` file included in the plugin download and read the documentation.
-= I can't access the "Role Manager" features. =
+### I can't access the "Role Manager" features.
When the plugin is first activated, it runs a script that sets specific capabilities to the "Administrator" role on your site that grants you access to this feature. So, you must be logged in with the administrator account to access the role manager.
-If, for some reason, you do have the administrator role and the role manager is still inaccesible to you, deactivate the plugin. Then, reactivate it.
+If, for some reason, you do have the administrator role and the role manager is still inaccessible to you, deactivate the plugin. Then, reactivate it.
-= Help! I've locked myself out of my site! =
+### Help! I've locked myself out of my site!
Well, that's why you really need to read the documentation for the plugin before actually using it, especially a plugin that controls permissions for your site.
@@ -70,16 +79,31 @@ Well, that's why you really need to read the documentation for the plugin before
== Changelog ==
-**Version 0.2.1**
+### Version 0.2.4
+
+* Fixed content permissions not saving for attachments. Note that this only protects **content** and not media files.
+* No longer runs the upgrade script when `WP_INSTALLING` is `TRUE`.
+
+### Version 0.2.3
+
+* Fixes the strict standards notice "Redefining already defined constructor for class Members_Load".
+* No longer uses `&` for passing the role name by reference on plugin activation.
+* Fixes the `[feed]` shortcode, which was using the wrong callback function.
+
+### Version 0.2.2
+
+* No longer displays non-editable roles on the edit roles screen.
+
+### Version 0.2.1
* Fixes the " Creating default object from empty value" error.
-**Version 0.2**
+### Version 0.2.0
* Updated everything. Nearly all the code was rewritten from the ground up to make for a better user experience.
* Plugin users should check their plugin settings.
-**Version 0.1.1**
+### Version 0.1.1
* Fixed a bug with the Content Permissions component that restricted access to everyone.
* Added missing internationalization function call: `load_plugin_textdomain()`.
@@ -87,12 +111,12 @@ Well, that's why you really need to read the documentation for the plugin before
* Added `members-en_EN.po`, `members-en_EN.mo`, and `members.pot` to the `/languages` folder.
* Updated some non-internationalized strings.
-**Version 0.1**
+### Version 0.1.0
* Plugin launch. Everything's new!
== Upgrade Notice ==
-= Version 0.2 =
+### If upgrading from a version earlier than 0.2.0
-Version 0.2 is a complete overhaul of the plugin. It includes security fixes, bug fixes, and a few new features. Please check your plugin settings and widget settings.
+Version 0.2.0 included a complete overhaul of the plugin. Please check your plugin and widget settings.

No commit comments for this range

Something went wrong with that request. Please try again.