WP-Members 3.1.7 Update – What you need to know
-
WP-Members 3.1.7 has some changes that are significant in a couple of areas. For many users, these are going to be unnoticed and have no effect. However, it’s important to know if you are in the group that will be effected, what the effects are, and if they matter.
do_login Action & Captchas
First, the addition of WP’s do_login action to the WP-Members login form, which allows integration with many of the captcha plugins that are much more prevalent now than when the plugin was first launched. So if you are using any plugins or customizations that hook something to the WP login form, this will also affect the WP-Members login form.
In many cases, this won’t be an issue. However, not every CAPTCHA plugin was designed for front-end use. So some will work and others won’t. It all depends on whether that particular plugin loads its scripts on the front end or not.
Another captcha quirk is that depending on how the captcha plugin generates and codes its question/solution, you may run into problems where there are two on a page (i.e. if there is a main body login and the widget both displayed). Again, every plugin is a little different and some work in this regard and other do not.
If you find that the captcha you are using does not work (and/or cannot be customized to work), you can disable the do_login action from the widget and main body login forms by filtering the forms defaults (wpmem_login_form_args and wpmem_sb_login_args) as follows:
add_filter( 'wpmem_login_form_args', 'remove_do_login_action' ); add_filter( 'wpmem_sb_login_args', 'remove_do_login_action' ); function remove_do_login_action( $args ) { $args['login_form_action'] = false; return $args; }
That would remove the action from the form so that the captcha is not included. This means you’ll need to apply the workaround for wp-login.php captchas (which you may already have applied if you are upgrading the plugin and have a captcha on the wp-login.php).
login_redirect Integrated into WP-Members login function
Another important update to note with regards to the login process is the addition of WP’s login_redirect filter. This filter hook has been added to the login process as of 3.1.7. It fires before the wpmem_login_redirect filter, so if you have customizations in place already that may use both filters, keep in mind this addition in which case you’ll want to test out your login redirects to make sure everything is going where you want it.
Change to Dynamic Texturization (and wpautop)
The last major change to note is a change to a filter that WP-Members applies to its forms (login and register). This process applied a shortcode around the forms on-the-fly and used the shortcode to make sure that WP’s wpautop function did not run on the forms. This prevented WP from inserting HTML <p> tags for line breaks, thus messing with the form layout.
In the plugin’s early days, this was absolutely necessary. However, in more modern WordPress and modern themes, it hasn’t been necessary. In fact, in some instances with more advanced themes and builders, it has caused some layout issues when applied, instead of the intended solution which is the other way around.
So, I’m leaving the possibility to apply this fix in the plugin. However, unlike previously, it is now turn OFF by default instead of ON.
If after updating you find that your login and registration forms have HTML <p> tags in the generated HTML, you can turn the texturization process back with the following:
add_action( 'wpmem_after_init', function(){ global $wpmem; $wpmem->texturize = true; });
Noting the Changes
This covers the major changes with regards to display and output. I’ve done my best to make sure these have been noted and announced well in advance, as I’ve been talking about this update for over 3 months.
The update should be a smooth one if these items are noted. Again, not everyone is affected by these changes – but the universe of affected users is larger than past updates so I’ve tried to be quite vocal about the changes. Once we get through the bumpiness of updating, I think people will find that these changes expand the plugin’s capabilities and compatibilities in a positive manner.
If you’re updating – it’s always a good idea to test the update first before applying to a production site. But if you do apply it to a production site, then test out the update after updating.
No Database Changes – Rollback is Possible
Also, keep in mind that this update makes NO database changes. You can roll back to the previous version by loading the previous version files.
Take Note of All Changes – New Features
There are two posts on the premium support site blog about the update that have more information on the update:
Updating to 3.1.7 – What You Need To Know
WP-Members 3.1.7 Release AnnouncementPlease take a moment to read those posts and the plugin’s changelog to see all of the changes. I’ve only noted the ones that I believe will be the most noticeable in terms of output. But this update includes a lot of updates and new features in the API and shortcodes that you may want to be aware of as well.
- The topic ‘WP-Members 3.1.7 Update – What you need to know’ is closed to new replies.