WP-Members 3.1.4 is primarily a new feature release with a couple of fixes. Additionally, I spent some time going through the code for some general cleanup of @todo tags as well as some inline documentation updates.
New Features and Improvements
Some new features in 3.1.4 add some functions to the user API. One of these is primarily for extension development (wpmem_is_tab()), but the other two may be useful. Documentation will be coming soon for:
wpmem_is_reg_page() will do a compare of the page the user registered on to determine if it is the registration page set in the plugin’s settings. This can be used for validating pages if using different fields on different pages, or for other uses.
wpmem_load_dropins() is an API function to initiate WP-Members drop-ins. Drop-ins are code snippet files that can be loaded from a specific directory. This is something that I’ve been working on for awhile to allow for simple addition of code snippets without needing to use the theme functions.php file or the need to employ a specific plugin for custom code snippets (although both of those are (1) still supported and (2) very good ways to handle it). Drop-ins will allow simple code snippet management by keeping custom code in a specific directory for WP-Members and just adding the code snippets as individual php files. I will have much more information on this topic in the near future.
Improvements in 3.1.4 include some updates to the way the main plugin handles the PayPal extension. First, changes to the way it checks if it is loaded. The PayPal extension needs some updating and scheduled changes include some file name changes to fit the plugin’s current standards. However, unlike other extensions, the PayPal extension has some specific features that are integrated into the main plugin. The way this was checked for load needed a major overhaul, so 3.1.4 handles that.
I also went through the entire plugin and evaluated all current @todo items. Some where noted for future development. In other cases where completed or outdated, the tags were removed. This lead to some inline documentation updates as well.
The [wpmem_field] shortcode was updated to better handle select (dropdown), checkbox, and radio button field types. These field types have a displayed value and a stored value for each possible selection. Depending on your stored values, these may or may not be appropriate for display when displaying a field value on the site. The shortcode was updated to show the display value rather than the stored value for these field types.
UPDATE: The [wpmem_field] updates noted inadvertently introduced an issue for any fields that are not part of the plugin’s fields settings array. This would include user_login (the username) and user_registered (the user’s registration date), and any meta field displayed that is not included in the fields array; basically any field not set in the Fields tab. This was due to some logic that was intended to prevent errors as part of the updated logic mentioned above. The 126.96.36.199 release fixes this issue.
The only known bug that 3.1.4 needed to address was an issue in the admin.js file. When the forgot username shortcode was added to the menu, there was a comma omitted from the new js. This resulted in a js error which ultimately resulted in the shortcode button not loading into the post editor toolbar. 3.1.4 fixes this issue.
UPDATE: 188.8.131.52 fixes an issue in 3.1.4 where the [wpmem_field] shortcode may return an empty value. See UPDATE note above.