WP-Members 3.0 is nearing the testing stage. This update to the plugin is really exciting because I have been working on moving the plugin to be more Object Oriented. The current version of the plugin is very extensible. But I want to move that forward to be even more so. The new Object Oriented approach and the new settings array is going to leverage the extensibility of the plugin to a fully customizable framework.
As usual, I want to update process to be seamless for existing users.
Because of the changes to the way the core settings are stored, this means lots of testing. I am hoping there are users out there that are interested in testing out the new version.
Before you jump up and raise your hand, let me emphasize that the current package is still in the alpha stages. This is not yet a beta release and there will be some bumps in the road. So before I give all of the caveats and tell you that you should not install this on a production site just yet, let me start by saying do not install this on a production site just yet.
With that in mind, here are the caveats, install information, and some brief info on some of the new features.
IMPORTANT:
This is an alpha version release of WP-Members 3.0. I do not recommend using this on a production site! If you use it on a live production site, consider that it is unsupported. What I really need (and why this is being released) is for users who maintain a staging site or a dev site to test out (1) how updating from 2.x to 3.0 goes, (2) do their existing settings, customizations, and features used still function as they did in 2.9 without making changes, and (3) testing out some of the new features (more on that below).
There is a very significant change to the plugin’s settings array. While this alpha release should allow you to roll back to 2.x, I can’t guarantee that will be easy. When fully released as a production version, several of the old settings will be moved into the new settings array as part of the update and some options will be deleted as they are no longer used. This test version leaves those old settings intact so that rolling back should be possible. But please note that I can’t guarantee that would be successful in every case and that is why I am telling you that using this on a site that you can’t break (i.e. your live production site) is at your own risk.
For anyone testing this version out, if you want to test out rolling back to 2.x, that would be valuable feedback as well.
With that in mind, here is the recommended update process for testing:
- Get the download for 3.0 testing. It is available on bitbucket. Make sure you are choosing the “master” branch and not “3.0”. Master has a slightly different install script that allows for 2.x rollback.
- Deactivate the plugin.
- Via FTP (NOT via the WP Plugin Panel), you may want to delete current files in the /wp-members/ plugin folder. This is optional, but recommended.
- Load the new files to the /wp-members/ folder via FTP.
- Activate the plugin.
Differences:
Compatibility with current extensions:
Any of the add-on extensions from rocketgeek.com that utilize constants will need to be updated. I am aware of all incompatibilities related to the extensions at this point. I recommend that you test with these disabled at present. Some of these may be able to be overcome with a code snippet or two and I will be working on something of that nature first for the alpha testing period since I would like to get some feedback from extension users with regards to compatibility. But for now, testing without extensions enabled is recommended.
This code snippet can be added to your functions.php file to enable testing with the User List extension enabled:
add_action( 'wpmem_settings_loaded', function() { global $wpmem; define( 'WPMEM_CSSURL', $wpmem->cssurl ); });
The main difference you will notice in the plugin is in the options tab.
First, you will notice the content blocking section offers a dropdown selector for posts and pages. In this selector, you can select the standard block or unblock for default. But there is a new designation – hide. This feature is not complete yet and is not yet functional. Don’t bother trying it. Hopefully, it will be functional by the time I release the beta test version of 3.0. The idea is that you will be able to hide all posts or pages from view. At present, things are not working the way I want them to and this feature may end up being something that is not globally selectable for posts or pages, but will be for custom post types and also by category or tag.
You will also notice that there are some options that were formerly global for posts and pages that now allow a different setting for posts and pages. All of these plus the content blocking selections will eventually be settings for not just posts and pages, but any custom post types as well. That may not make it in the 3.0 release, but I am building toward that.
The following are some new features that can be tested out in the 3.0 alpha version:
New shortcodes:
[wpmem_logged_in]] now accepts parameters for “id” and “role”:
[[wpmem_logged_in id="123,456"]This is content that can be viewed by users with ID 123 or 456[/wpmem_logged_in]
[wpmem_logged_in role=administrator]This is content that can only be viewed by an administrator role[/wpmem_logged_in]
[wpmem_logged_in role="administrator,editor"]This is content that can only be viewed by an administrator or editor role[/wpmem_logged_in]
New form shortcodes, take the place of “page” shortcodes:
To gain full access to WP-Members premium content, a current support subscription is required. You can purchase
an annual support subscription for as little as $59, which provides you with access to priority support, a
customer support forum, access to code snippets, and more.
Why wait? Choose your subscription option here.
[Why join?]
Drop-ins:
This new feature will eventually mature into “plugins for the plugin”. This is a way to load custom code snippets without needing to modify the functions.php file. While this is still in the experimental stages, and thus subject to some changes, the concept in the current alpha release works like this:
- create a new folder in /wp-content/plugins/ named “wp-members-dropins”.
- any code snippet added to the folder will be picked up (custom snippets must be .php files and start with <?php ).
- add the following to functions.php to enable the experimental feature:
add_action( 'wpmem_settings_loaded', function(){ WP_Members::load_dropins(); });
- remember this is experimental and I may ultimately change the location and/or folder name.
There are some new actions:
- wpmem_load_shortcodes
- wpmem_load_hooks
- wpmem_load_dropins
These allow you to run functions hooked to these actions to load additional shortcodes, hooks, and dropins.
Rolling back to 2.x:
1. Deactivate the plugin.
2. Delete all files in the /wp-members/ plugin folder.
3. Load rollback version via FTP to /wp-members/
4. Activate the plugin.
Note: as previously mentioned, rolling back will leave some residual plugin settings in the main settings array. These should not effect functionality of the plugin, but I can’t guarantee that, so it is not recommended that you test this on a live production site.