Welcome to Access 2.0, AKA Access Granted.
Integration with the shared Toolset menu and export/import page
Access 2.0 is integrated in the new Toolset shared menu. It should appear just after the Types admin pages, as the Access Control entry.
We also moved the export/import page for Access to the shared Toolset page:
This new location for exporting and importing comes with another little update. From now on, importing messages are displayed as native admin notices.
As a final note, we also removed the Help page. We will be adding specific promotional and help instructions in coming iterations.
New Access Control page
Access 2.0 also packs a revamped Access Control page.
One of the ugliest problems we faced with the old Access Control page is that it contained too many checkboxes. When your site has many custom post types or custom taxonomies, or has too many custom groups or language groups, or custom field groups, the admin page can have a huge amount of checkboxes. As all settings were saved at once, you could reach the maximum limit that PHP can handle, hence saving partial settings and becoming unable to completely set some of them.
We did two things to improve this.
First, we moved to a section saving mechanism. Each set of checkboxes, be it for controlling access to a post type, taxonomy or group has been decoupled, and we added a dedicated Save button That means that you will be able to save just those settings and will never suffer from a problem because you have too many sections.
Second, we moved to a tabbed interface, where you can access directly to the relevant settings without scrolling endlessly. We added tabs for post types, taxonomies, custom fields, post groups, WPML groups (if WPML is available) and custom roles.
Note that when first loading the Access Control page, only the first tab is fully loaded. Switching to another tab will trigger an AJAX call and the new tab content will be filled on-the-fly. This way you only load the settings that you actually want to see or edit. Also note that each tab is itself a link with the proper URL pointing to the appropriate tab, so you can reference and link to specific tabs.
In addition, each section inside any tab (but the Custom roles one), is loaded collapsed, with an indicator to whether it is controlled by Access or not. Clicking the row will open the settings container, where you can enable or disable Access control, change settings, etc.
In future iterations we will improve the feedback when saving a group. By now, the group itself flashes in green.
Regarding Custom Roles, we also improved the management by adding AJAX refresh. You can see it when adding a new role, or editing or removing an existing one, or when enabling or disabling the advanced mode. Everything is saved and the new settings are applied without a page reload.
As a final note, we removed lots of code that was executed here. We lost some small feature, like the links to the custom groups that contain posts of a given type which was replaced by a generic link that loads the Custom Groups tab:
Finally, we unified the messages shown in some tabs when no there is no content to display.
Review the order of execution of the initialization hooks
We have had problems with specific post types (like posts or pages) or with specific user roles (like guests) for some time. We also had some compatibility issues with WPML and bbPress. They all, named as bugs below, are related to the same thing.
Access hooks into the native system of actions and filters that WordPress provides. It needs to initialize some things too early, listen to some events – and add those listeners early enough to catch them every time they are fired, but not too early to avoid bad practices – and apply tons of settings as soon as possible.
We had a hard time getting this right, but we do think we did it finally.
Transform the dialog to insert the Access shortcode into an actual dialog
Access provides a nice shortcode to set chunks of content that can or cannot be seen by specific roles.
The dialog to insert such shortcode was not an actual dialog, but a hidden container that switched its visibility based on the click on the toolbar button. But from now on, it will be a proper dialog. It also has some extra styling.
In future iterations we will improve this styling and also bring this button and dialog to other editors and the Toolset shortcodes admin bar menu.
Removed some WPML dependencies by using their API instead
That is: we removed some checks and direct calls against WPML functions and replaced them with the hooks system that WPML provides. Still, this is a work in progress.
- Fixed a problem with native post types settings.
As stated above, there was an issue here, and we solved it. Props to us!
- Fixed problems with guest users and frontend permissions.
As stated above, there were some problems here that should not be there anymore.
Fixed a problem on the import process.
When exporting the Access settings just after activating the plugin, some of the groups of data are empty. Trying to import them raised some PHP notices and errors. We checked why and where, and fixed this.