WP-Members 3.1.5 is both a security and a feature release. Minimum WP version is 3.6.0.
Before I get into the specifics of this update, I want to mention that this release begins a gradual process of changing the plugin’s fields settings array, both in how it is stored and how it is handled. When complete, this will make customizing forms easier.
This change is the final step in a settings upgrade process that began with new general settings in 3.0.0. The process will begin gradually, but eventually, before the 3.1 lifecycle is complete, it will be in place.
What does this mean for you?
For most people, this should be a seamless process without any trouble. The plugin will leave the stored fields array alone for now and will include a process for getting the new fields format from the old. That will give us time to make sure that everything is updated throughout the plugin where the fields array is used. At that point, it will shift to storing in the new format, but keeping the legacy settings loaded as well. This will give some time for anyone that needs to transition custom scripts to meet the new format.
For most people, this will be no big deal because most users don’t apply filters until wpmem_register_form_rows as which point the form fields are already assembled.
This version improves the API function wpmem_fields(). So wpmem_fields() should be used to get the form fields array instead of accessing the $wpmem->fields object directly.
Security Updates
There was a small security update in 3.1.4 and another in 3.1.5. While not specifically large risks, there were a couple of small issues that needed to be addressed.
When it comes to vulnerabilities, I do not generally speak about specifics. If we speak in specifics, that provides opportunity for hackers to exploit things. Suffice to say that even though the risk is a small one, you should update to make sure that these potential issues are completely closed.
Shortcode Updates
There were a number of updates to shortcodes. No new shortcodes, but improvements to some existing ones.
[wpmem_show_count] was updated to show more than just counts by meta key. Now you can show a total count of all users, or a count of users by role. See the documentation for more information and examples.
[wpmem_field] had several improvements. First, for users who may need to use or display the raw field value for dropdowns, multi select or checkbox, or radio groups, there was an attribute added for that. Additionally, there were attributes added specifically for image and file fields. Images now display the image and there is a size attribute for specifying the image size if desired. See the documentation for more information and examples.
[wpmem_loginout] was updated to include some new attributes. You can now change the default link text for both login and logout state. It also accepts a redirect attribute for the login. See the documentation for more information and examples.
Other Updates
There was a pretty large overhaul of the auto excerpt function. Previously, the auto excerpt had code to generate its own excerpt from the content by breaking up the content string and counting words. This was a less than perfect process because if there was HTML or shortcodes in the excerpt, then that was handled as a word. So the depending on specific implementation, this could result in an imperfect word count. A few versions ago, WP-Members minimum WP version was moved up to 3.6. This allows us to use more native WP functions. In this instance we can now use wp_trim_words() to handle building the automatic excerpt. This is a much more precise function.
The hidden field field type had been selectable in the field type dropdown for awhile but was not fully functional. This actually was a piece of development code that was inadvertently left in. Since then, I’ve had a few questions about how to add a value to it. Since it was intended to be added at some point in the future anyway, those questions led to completion of supporting this as a field type. So now you will find that when you create a hidden field, you can add a value to the field to make it useable.
There were a number of improvements in the installation functions. First, all of the initial settings are now compartmentalized in separate functions. This allows any of them to be called individually. That leads to improving plugin handling if there has been a failed install of any of the default settings. Also, when the plugin upgraded the dialogs settings array, there was a downgrade feature in case a user rolled back to a previous version. This actually has caused some problems when downgrading was not specifically necessary. It is not generally necessary anymore so 3.1.5 disables this process altogether.