Today we take one step closer to WP-Members 3.0! Version 2.9.8 includes some updates that lay the groundwork for moving the plugin into the next major version release.
Please be sure to read the release notes prior to updating to determine how you will be affected by these changes. It is always recommended that you test the update on a staging server prior to updating production.
This update does not make any changes to database settings during the update with the exception of the version number. If you need to roll back, the previous version (2.9.7) is available here.
New block post meta field
Since the plugin’s inception almost 9 years ago, the “block” and “unblock” post meta fields have been a staple of the plugin in order to override the default block setting for individual posts and pages. I have wanted to change this for quite some time but have been hesitant to do so because so many existing installs rely on this field.
What’s changing?
Here’s the biggest change – instead of two separate meta keys (one for blocking, the other for unblocking), it has become apparent that it is more intuitive to offer one single meta key and change the value based on blocking. There are very good reasons for the way it originally was (and if you are interested in ancient WordPress history, feel free to bring this up in the comments forum thread below – I’d be happy to expound on it), but over time it became obvious that it was not intuitive enough. Also, with the addition of the post meta box for setting this value, most people are not creating these meta fields themselves anyway. Which leads me to the other change…
Both “block” and “unblock” will be deprecated in favor of a completely new meta field _wpmem_block. First, adding “wpmem_” identifies the key and also prevents possible namespace collisions. Second, note the leading underscore in the meta key. This means that the meta key will not display in the custom fields editor of the post/page editor window. It is not necessary for them to be displayed there anymore since we have a meta box to handle the setting.
What about my existing posts?
If you don’t use the individual block/unblock settings, there’s nothing to worry about. Even if you do, you don’t have anything to worry about at this point in time.
My initial desire was to force a database update that would automatically update any existing old meta fields to the new format. But everytime I’ve released an update with something like that, it has not gone well and generally results in a lot of support tickets. While that still may happen in this update, it won’t be because of database changes/updates. I’m leaving it up to you to update your own site.
For those of you with tons of posts that may have individual meta needing to be updated, don’t fret too much on this. The plugin update for 2.9.8 is backward compatible with the old metas. So any block or unblock metas will be valid. Any new posts will use the new tag. Any updated post will use the new tag.
However, in the case of updating posts, the new tag will be applied but the old tag will not be removed. Again, I don’t like to manage a tricky process like that. I may release an update script or handle this with the next release. But in the meantime, the best way to update would be to run a couple of direct SQL queries on the postmeta table in the db. I’ll be posting more on that later.
Remember, none of this means that you should skip testing the update. You should test to make sure everything works as it should before you apply it to production. But if you do apply it to production and things don’t work out, not making direct changes to the database means rolling back is not a major issue.
Other new features and updates
- Added wpmem_use_ssl utility function. This utility function is used to determine if https:// or http:// should be delivered for certain URLs. This should eliminate browser messages regarding “unsafe” content loading in these situations (see the next 2 points for specifics).
- Added use of wpmem_use_ssl function to reCAPTCHA to load correctly (previously handled ssl directly).
- Added use of wpmem_use_ssl function for default input text for custom register page, user profile page, and custom stylesheet settings inputs.
- Added new redirect_to parameter to login page shortcode. This allows you to specify a redirect URL directly in the login shortcode.
- Added underscores parameter to the fields shortcode to strip underscores. Defaults to off. This will remove underscores when field data is displayed using the shortcode. Especially helpful for dropdown select fields where spaces are removed by default when the field is saved. This new feature defaults to “off” (which removes underscores). It can be turned on if desired (to leave underscores in place) with the parameter underscores=on.
- Added new stylesheets based on Twenty Fifteen theme. Please note that these are “early editions” and are subject to change in the future.
Fixes in this update
- Fixed bug in settings update that caused the stored version number to be erased.
- Fixed bug with new email function that causes the wpmem_email_newreg not to apply any filtered changes to the email body.
- Fixed bug in the All Pages bulk action that caused the result to end up on the All Posts page. Settings were stored correctly but the user ended up on the All Posts page instead of All Pages.
- Fixed checkbox for checked by default on the Users > Add New User screen.
- Fixed “admin only” fields to display on the Users > Add New User screen.
- Updated excerpt logic to not show excerpts on multipage posts if not the first page. This corrects a previous issue where multipage posts displayed an excerpt from the page being displayed.