Skip to content


Subversion checkout URL

You can clone with
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.
Commits on Oct 11, 2012
@justintadlock PHP 5.4 fix for creating object error. 8e4e247
@justintadlock Update readme.txt. 13d88d2
@justintadlock Update donate link. 6b6b7d2
@justintadlock Version bump. 4f80c5e
@justintadlock Merge branch 'refs/heads/0.2' 3661110
Commits on Dec 04, 2012
@justintadlock Version bump to 0.2.2. 891be84
@justintadlock Fix the issue where non-editable roles are listed on the edit roles p…
@justintadlock Readme updates. 32cba87
@justintadlock Merge remote-tracking branch 'remotes/origin/0.2' 40fc11a
Commits on Sep 27, 2013
@justintadlock Version bump to 0.2.2-beta-1. 6b116db
@justintadlock Remove the old, PHP4-style Members_Load constructor. Fixes the "Redef…
…ining already defined constructor for class Members_Load" strict standards notice.
@justintadlock Version number should actually be 0.2.3-beta-1. de51034
@justintadlock Use the correct callback function, `members_feed_shortcode()`, for th…
…e [feed] shortcode.
@justintadlock No need for `&` to pass by reference. 30f337e
@justintadlock Update the readme.txt to reflect version 0.2.3 changes. d80cdfe
@justintadlock Version bump to 0.2.3. f946ba6
@justintadlock Merge branch 'refs/heads/0.2' feeb798
Commits on Oct 25, 2013
@justintadlock Version bump to 0.2.4-alpha. a6d1289
@justintadlock Fix for content permissions not saving on the edit attachment screen. e0a85fa
@justintadlock Don't run upgrade script when installing. Props @mikeschinkel. 0d2147c
@justintadlock readme.txt updates. e01f86f
@justintadlock Update the plugin URI. 4068710
@justintadlock Version bump to 0.2.4. 91a73e4
@justintadlock Merge branch 'refs/heads/0.2' 484972e
Commits on Jul 25, 2014
@justintadlock Version bump to 0.2.5-beta-1. c26b31a
Commits on Jul 09, 2015
@justintadlock Use __construct(), not the old PHP4-supported constructor methods for…
… widgets.
@justintadlock Removed the `/components` folder and files. These somehow got re-adde…
…d at some point after removal.
@justintadlock readme.txt updates. d8c0ede
@justintadlock Version bump to 0.2.5. 6950d4c
@justintadlock Merge branch 'refs/heads/0.2' 159e86a
Commits on Jul 13, 2015
@justintadlock Role cloning FTW! f8644ec
@justintadlock Just use wp_filter_post_kses(). 2730005
@justintadlock Allow HTML in the content permissions post meta box. e1cadfc
@justintadlock Don't include user levels in capability count. Fixes: #13 d3ad666
@justintadlock User proper path for translations in case the plugin folder is rename…
…d. Fixes #44
Commits on Jul 14, 2015
@justintadlock Overhaul of the settings screen. First pass. d492e42
@justintadlock Remove file endings. 7de85f5
@justintadlock Overhaul of the main plugin file and class. ccb44a7
@justintadlock Change page header to "Clone %s Role" when cloning a role. 21eeea0
@justintadlock Introduce the members_get_edit_role_url() function. 9d9deba
@justintadlock Use new edit role link URL function. 622f39b
@justintadlock Add AYS? popup box when user clicks the delete role link. d0972b3
@justintadlock Trim old "|User role" rom role name. b01e3b3
@justintadlock Link directly to the default role option. 7f99f52
Commits on Jul 15, 2015
@justintadlock Better error messages. Allow embeds and all other sorts of cool stuff. 84091f5
@justintadlock First pass at integrating editable vs. uneditable roles. In the past,…
… we simply hid uneditable roles. This commit adds two separate nav items for both on the role list table.

I'd still like to allow users to be able to view the uneditable roles' caps on another screen.  So, a "view" link is needed.
Commits on Jul 16, 2015
@justintadlock Extremely rough first pass at utilizing WP_List_Table to list our rol…
…es list table. This commit also introduces a few extra role functions.
Commits on Jul 18, 2015
@justintadlock Role edit page cleanup. Adds the members_sanitize_role() function. 462a3e8
@justintadlock More edit roles page overhauling. Added new "View Role" page so that …
…users could at least view uneditable role capabilities. Adds some extra needed role functions.
Commits on Jul 19, 2015
@justintadlock Change the default roles per page to 30. 6283ad3
@justintadlock Extremely rough first pass at a capability manager. Note that this fe…
…ature doesn't actually work yet. It's just a listing page in the admin.
Commits on Jul 20, 2015
@justintadlock Beefing up the plugin's roles API. Loads of changes. Inline doc updates. 14c817a
@justintadlock Merge "role view" into "role edit" feature. 54e6d9f
@justintadlock Fixes the non-working bulk delete we've had since switching to using …
@justintadlock Introduce members_get_role(). 241b055
@justintadlock Introduce members_validate_boolean() for validating boolean values. c062d5d
@justintadlock Overhaul of the add-new role page. Loads of related cleanup. e8f7169
@justintadlock Better filters for adding custom role views. Third-party plugins that…
… create their own roles can now add a role view so that users can view the roles specific to that plugin.
Commits on Jul 21, 2015
@justintadlock Adding the,, and Removing the old …
…`/docs` folder.
@justintadlock Rename the includes folder to inc. b2bffa0
@justintadlock Rename some of the files for consistency. c5f72c2
@justintadlock Introduce URL getter functions for the various role views in the admi…
…n. Also, pass the edit roles URL to the filters on `members_manage_role_views` so that plugin authors have a URL to use when building their view URL.
@justintadlock Deprecated cleanup. Functions deprecated in 0.2.0 are being removed. fbe6f9a
@justintadlock Introduce the members_user_has_role() and members_current_user_has_ro…
…le() functions.
@justintadlock Cleanup of functions-private-site.php. Introduces the members_is_priv…
…ate_blog() conditional tag.
@justintadlock functions-admin-bar.php cleanup. Make sure to use members_get_new_rol…
@justintadlock functions-content-permissions.php cleanup. 8dac388
@justintadlock Introduce the new `/templates` directory an move comments.php into it. 3a49b55
Commits on Jul 23, 2015
@justintadlock Content permissions should be hierarchical. If you can't view a paren…
…t post, you shouldn't be able to view its children. Added hook for disabling this feature.

Fixes: #48
@justintadlock Bring in 4 new translations into dev branch. Fixes: #49 5b7bfe5
@justintadlock Set the default items-per-page to 20 for the roles screen. b5c98ef
@justintadlock More iteration over the capability manager in the admin. c324580
Commits on Jul 27, 2015
@justintadlock Handles adding a new capability from the New Capability screen. b37b9ae
Commits on Jul 29, 2015
@justintadlock Better handling of the capability manager. 989a98b
Commits on Jul 30, 2015
@justintadlock Moved all the role management stuff into nice, neater classes. Gettin…
…g closer to something manageable.
@justintadlock Remove unused admin files. c8c57c0
@justintadlock Change how plugin settings are handled. Better method for handling de…
…faults and new options added in the future.
@justintadlock Remove unneeded install/update feature. That's a poor way to handle o…
@justintadlock Add the capability manager as a plugin option. 33f7fce
Commits on Aug 01, 2015
@justintadlock Enqueue admin scripts cleanup. 02e25e2
Commits on Aug 02, 2015
@justintadlock New role admin class. fcf75d7
@justintadlock New options conditional functions and some cleanup. 068b672
@justintadlock jQuery show/hide sub-settings when a feature is enabled/disabled. f833dde
@justintadlock Typo correction. efed840
Commits on Aug 04, 2015
@justintadlock Add the new cap class. 30a9592
@justintadlock Remove unused admin functions. 00564ed
Commits on Aug 05, 2015
@justintadlock Update main plugin file header. This change also moves us from GPL 2-…
…only to GPL 2+.
@justintadlock Drops old constants. fedc861
@justintadlock Drops old $members global. 9465680
@justintadlock Main plugin file cleanup. 099930e
Commits on Aug 07, 2015
@justintadlock Adds post role functions for setting, removing, and deleting meta for…
… content permissions.
@justintadlock Use members_content_permissions_enabled() function. 5d7a728
@justintadlock Functions for getting, deleting, and setting the post access error me…
Commits on Aug 09, 2015
@justintadlock Admin JS cleanup. 1bd449e
Commits on Aug 15, 2015
@justintadlock Big cleanup of capabilities functions. c14b212
@justintadlock Inline docs for role class. 422ae72
@justintadlock File cleanup. e3bcb9b
@justintadlock Move members_list_users() to functions.php into template.php and clea…
…n up.
Commits on Aug 22, 2015
@justintadlock Overhaul of the login widget coding. 00ebcc7
Commits on Aug 23, 2015
@justintadlock Overhaul of the users widget. 1ec1edd
@justintadlock Add members_is_private_feed() function. 50a8dcd
@justintadlock Adds the members_get_private_feed_message() function. e937aff
@justintadlock Exit after redirecting. 8163730
@justintadlock Break out of the foreach loop if the user has one of the roles. No ne…
…ed to continue checking.
@justintadlock General cleanup. 9463e97
@justintadlock Shortcodes code cleanup. af60b92
Commits on Aug 24, 2015
@justintadlock Adds the "WordPress" view to the role list table, which allows users …
…to view WP-specific roles.
@justintadlock Typo fix. 7639ea6
Commits on Aug 25, 2015
@justintadlock Fix deprecated notices. 3fcaf5a
@justintadlock Fix deprecated admin notices. fd5d5ab
Commits on Aug 27, 2015
@justintadlock Multiple roles per user! FTW! First pass at getting this into the plu…
Commits on Aug 29, 2015
@justintadlock Add plugin setting to enable/disable multiple user roles. f4b4fe9
@justintadlock Make a distinction between granted/denied caps. 13c4dcd
Commits on Aug 31, 2015
@justintadlock Extremely rough first pass over the new edit role screen. Note that t…
…his new UI hasn't been ported to the new role screen yet.

This change introduces the ability to grant, deny, or remove individual capabilities for a role.  It also introduces a new method of grouping capabilities.

Several other key elements are the addition of a meta box system with custom meta boxes added, a tabbed interface for selecting caps, and new method for showing the role and role name.
@justintadlock Minor UI fixes. 6669a40
@justintadlock Separate edit role meta boxes into their own files and classes. 6554cec
@justintadlock Separate cap tabs into its own class. 84738a9
@justintadlock Adjust padding to match rest of box. 2e5c0f6
@justintadlock Add the missing core 'export' and 'delete_themes' caps to our default…
… cap arrays.
@justintadlock Add the Members role-related caps to the "users" category of roles. cfea165
@justintadlock Border color fix for the tfoot border. 01a88b5
Commits on Sep 01, 2015
@justintadlock Copy over edit role functionality and UI the new role screen. ad4b763
@justintadlock Disable the capability manager. This is being punted to a later versi…
…on. @todo Remove the code from the plugin.
@justintadlock Set granted/denied cap counts in the role submit meta box via JS as t…
…he user clicks.
@justintadlock Fix role cloning that got broken with the port of the new UI to the n…
…ew role screen.
Commits on Sep 02, 2015
@justintadlock Underscore JS templating for cap tabs. 5c8e5ae
@justintadlock Check change of correct attribute for the deny cap checkbox. 3db9f95
@justintadlock Introduce capability "groups" feature. This is used to populate the c…
…ap tabs.
@justintadlock Use `<h1>` for admin page titles. 8ac2f96
@justintadlock Further abstraction of the cap tabs. Now have cap section and control…
… classes.
Commits on Sep 03, 2015
@justintadlock Add new cap meta box functionality FTW! @todo Fancy it up with some s…
…ort of better visual indication of "things happening".
@justintadlock Only define new_cap_template once. 447a19c
@justintadlock Copy tab title to the top of the edit caps tab box to give an indicat…
…ion of which tab is being viewed.
@justintadlock Replace admin.js with edit-role.js and settings.js. Only load the scr…
…ipts on the pages that need them. Also cleaned up some of the JS code.
@justintadlock edit-role.js cleanup. Move some duplicate functionality into separate…
… functions.
@justintadlock Fix bug with triggering changes and clicking on checkboxes. 9cdbf07
@justintadlock Move new cap meta box JS to the edit-role.js file. 238dea7
@justintadlock Turn the cap checkbox label into a button. First pass on button styling. 95299e6
Commits on Sep 04, 2015
@justintadlock Move the meta box JS to edit-role.js. ddb5ab4
@justintadlock Remove remaining cap manager code. 6f5849f
@justintadlock Deprecated old nonce function. 897a424
@justintadlock Fix for the members_delete_role() function now that we support multip…
…le roles per user. If a user has the deleted role and no other roles, we'll assign them the default role. If the user does have other roles, we'll simply remove the deleted role.
@justintadlock JS to allow the user to hit "Enter" when adding a new cap. This preve…
…nts the meta box from toggling and the form from submitting in this scenario.
@justintadlock Remove unused capability manager files. de7099c
@justintadlock Add highlight effect when a new cap is added. eecf78d
@justintadlock Dashicons adjustments to match changes in WP trunk. 1b0bcde
@justintadlock Role edit button on the edit role screen. We also copy the role next …
…to the "Role:" text. This behavior is a bit more consistent with how core WP handles post titles and permalinks.
Commits on Sep 05, 2015
@justintadlock Overhaul of the content permissions meta box. Wrapped all of it into …
…a custom class. Also, UI adjustments were made to make it responsive and handle different meta box holders.
@justintadlock Add removed functions from previous commit to functions-deprecated.php. 91a40b8
@justintadlock Rename meta-box-post-content-permissions to class-meta-box-content-pe…
@justintadlock admin.php cleanup. Deprecated members_admin_setup(). a2ae483
@justintadlock Remove old CSS line that was hiding the "Collapse Menu" admin menu item. a351907
@justintadlock Add screen-reader-text for grant/deny checkboxes. 6247827
@justintadlock Add check for duplicate role and output error message if it's a dupli…
@justintadlock Better duplicate role check. Don't rely on JS to reset the role input. 3897451
@justintadlock When clicking the "edit" button for the role, focus on the input. 7f61c8b
@justintadlock Better handling of the edit role button. Single button that toggles t…
…he role input open/closed.
@justintadlock Make sure the array of post type caps returned from members_get_post_…
…type_caps() doesn't have duplicates.
Commits on Sep 06, 2015
@justintadlock Clean up the code for getting post type caps. Always remove both post…
… and page caps.
@justintadlock Clean up the cap tabs file and class. Simplify the tab nav code a bit…
…. Split the Underscore templates to a separate method.
@justintadlock Change `count_added` to `merge_added` for cap groups. 2a7af34
@justintadlock Inline docs cleanup. 8ce958a
@justintadlock Move the Underscore template wrappers to the section/control classes. 0983abd
@justintadlock Change table column names. 3b5dc35
@justintadlock Cap tabs small-screen style adjustments. 625209d
@justintadlock Make sure views with 0 roles doesn't show roles on the roles screen. 504d112
@justintadlock Don't show role views with 0 roles. c420af9
@justintadlock Use a linear gradient to handle the cap tabs background. This way the…
… split between the nav and content is obvious.
@justintadlock Code and inline doc cleanup. c5e6a42
@justintadlock Cut the grant/deny cap button transition time in half. ceda419
@justintadlock Move the icon outside of the grant/deny cap button. Remove focus from…
… button when hovering another button.
Commits on Sep 07, 2015
@justintadlock Code and inline docs cleanup. 5be78ef
@justintadlock Add the print_template() method for the new cap meta box class and ho…
…ok it to the footer.
@justintadlock Call the page object enqueue method for the roles and edit roles screen. 99c02f7
@justintadlock Move delete role link JS to the edit-role.js file. c848b82
@justintadlock Use jQuery's `.trim()` to trim whitespace from the beginning and end …
…of the role and new cap inputs.
@justintadlock Bug fix. Store the new caps to the `$capabilities` property on the ne…
…w role screen so that they're not lost if there was an error.
@justintadlock Adds the add_meta_boxes hook higher up on the edit/new role pages so …
…that meta boxes can be selected in screen options. Adds layout column option.
@justintadlock Add note about where the `pagenow` variable is coming from. 70d329d
@justintadlock Clean up the settings page class and settings handling. Introduces th…
…e `members_login_widget_enabled()` and `members_users_widget_enabled()` functions.
@justintadlock Don't hide private feed setting based on private site setting. 8bf265f
@justintadlock Clean up the Cap Groups API. Introduce functions for getting the defa…
…ult groups' caps.
@justintadlock Make sure user role names are translated. efbb99b
@justintadlock Use translated role names in users widget. d23ee9f
@justintadlock Code and inline docs cleanup. 13e24f0
Commits on Sep 08, 2015
@justintadlock Add a method for translating custom user roles for plugins. This intr…
…oduces the `members_translate_role()` function and the `members_translate_role` filter hook. Plugin authors can hook into this and add an internationalized version of their role names.

This change also gets rid of the Role Manager role shipped with Members. This is rarely added b/c most users will not have a missing Administrator role.
@justintadlock POT file update. Note that text strings are not finalized for this re…
@justintadlock Update old language files from POT. Drop the unnecessary en_EN langua…
…ge files.
@justintadlock Enabled/disable the add new role button based on whether we have a ro…
…le name.
@justintadlock Updated screenshots. 29bb2a6
@justintadlock Allow for the possibility of non-dashicons icons to be used by plugin…
… developers.
@justintadlock Split Underscore JS templates into a separate file and into their own…
… functions. Also, reuse the same capability control template for cap controls and new caps.
@justintadlock Minor cleanup. aef4164
@justintadlock Add Underscore templates to their own files. This just feels easier t…
…o maintain to me.
@justintadlock Handle the loop through the json template data via JS rather than PHP. fec0326
Commits on Sep 09, 2015
@justintadlock Pass sections/controls data to the `edit-role.js` file. 0e9e682
@justintadlock Prefix the `i18n` JS global with `members_`. 15e0893
@justintadlock Handle the tabs *after* the templates are handled. We need them set u…
…p first.
@justintadlock Overhaul of the help tabs for the plugin settings screen to utilize t…
…he newer `$screen->add_help_tab()` and `$screen->set_help_sidebar()` methods.
@justintadlock Separate the help sidebar into a single function. Overhaul of the Rol…
…es screen help tabs.
@justintadlock Handle the edit/new role help tabs. c6a55f4
@justintadlock Help tab cleanup. Move help tab callback functions to separate functi…
…ons-help.php file.
@justintadlock Rename admin.php to functions-admin.php. Also, add inline comments ab…
…out which admin files are being loaded.
@justintadlock Readme file updates. 21bb670
Commits on Sep 10, 2015
@justintadlock No need to pass the cap section data as json. We can just output thos…
…e since they always stay the same.
@justintadlock CSS file cleanup. Getting rid of some old stuff and organizing the ne…
…w stuff.
@justintadlock Add `.min` CSS and JS files. 13e6e2d
@justintadlock Change "Themes" label to "Appearance". dbc5a0c
@justintadlock Update members.pot file. c8378b0
@justintadlock Remove old language files. These are pretty much no good at this poin…
…t. With a complete overhaul of the plugin, we need a complete overhaul of translations.
Commits on Sep 11, 2015
@justintadlock Update plugin description. 4ffd618
@justintadlock Change Author URI to ``. 5da17ae
@justintadlock Add `` file for contributing guidelines. 40ea3fc
@justintadlock Update `members.pot` to get the latest text string changes. With any …
…luck, we can call this a string freeze.
@justintadlock Role Groups API. FTW! Now, instead of having to filer the edit roles …
…views and roles, plugin devs can simply register a role group on the `members_register_role_groups` hook with the `members_register_role_group()` function.

This also opens up other future possibilities for doing cool stuff with role groups. An add-on plugin could even potentially allow users to create and manage their own role groups.
@justintadlock Register role and cap groups on `init` with a priority of `15`. This …
…gives time for post types and taxonomies to be set first in case a plugin dev needs them registered.
@justintadlock Add a `show_in_view_list` argument for role groups. Set to `false` to…
… remove the group from the view list on the manage roles screen.
@justintadlock Change "Granted/Denied Caps" text to simply "Granted/Denied" and adju…
…st the column width.
@justintadlock The default/all view shouldn't be a role group. 5fcb037
@justintadlock Add role getter functions that just returns the roles/slugs. 910e117
@justintadlock URL getter functions should be escape on output, not on return. b1e6774
@justintadlock Change the `Members_Role` property `$role` to `$slug` for less confus…
@justintadlock Only count role users when specifically called for. If we don't need …
…the info, don't run the function to get it.
@justintadlock The `Members_Role_Factory::get_role()` method shouldn't add a role if…
… it doesn't exist. This was some hacky code that's no longer needed.
@justintadlock Use the `members_role_exists()` and `members_translate_role()` functi…
…ons on the manage users screen.
@justintadlock Use `get_editable_roles()` if the function exists (only in WP admin).…
… Else, apply the filters ourself.

Note: This commit fixes a bug where we were passing the role names array rather than the roles array, which is an array with the role name and capabilities, to our custom `apply_filters()` call.
@justintadlock Rename role/cap group factory functions. 04d65b6
Commits on Sep 12, 2015
@justintadlock When cloning a role, show the cloned role slug but don't add it to th…
…e role input box.
@justintadlock Change `members_load_roles` hook to `members_load_manage_roles` for n…
…aming consistency with other hooks.
@justintadlock Update text on denying caps. ddb4738
@justintadlock Remove hidden capabilities (things not allowed on the installed based…
… on `wp-config.php` settings) from the cap lists.
Commits on Sep 13, 2015
@justintadlock Add setting to make sure denied capabilities always overrule granted …
…capabilities. This way, there's no ambiguity over whether a user with multiple roles with conflicting cap definitions has permission to perform a specific action.
@justintadlock Move some user-specific functions to the functions-users.php file. 646178c
@justintadlock Update Settings page help text to explain denied caps override setting. e0f489c
@justintadlock Update to explain the denied caps override setting. 2256c8b
@justintadlock This reverts a previous commit. We must get the role user count early…
… to pass to the role factory.
@justintadlock Don't count a role's users until we specifically need to count them. …
…The best course here is just move that out of the Members role object.
Commits on Sep 14, 2015
@justintadlock 1.0.0 change log now updated. 4ce1193
@justintadlock Update `members.pot` file. 329f9d4
@justintadlock Readme file updates. fd81cf3
@justintadlock Readme file final updates. 992abbe
@justintadlock Version bump to 1.0.0. 565004b
Commits on Sep 15, 2015
@justintadlock Bug fix. Make sure `edit-role.js` is only loaded on the role manageme…
…nt screens.
@justintadlock Version bump to 1.0.1. 3b63ee5
@justintadlock Access shortcode fixes. Make sure `$attr` gets assigned and use `memb…
@justintadlock Use `! empty()` instead of `isset()` to check against the checkbox se…
@justintadlock Update ``. 37d4b72
@justintadlock Version bump to 1.0.2. c8c46b0