WP-Members 2.7.7 has been released. This minor update includes some very nice new features and also a few fixes.
Bug Fixes
- First, a minor bug fix. With the re-working of some of the shortcodes and breaking the wpmem_securify function into two separate functions, it seems that the error checking for the reCAPTCHA did not make it into the page shortcode function wpmem_do_sc_pages. The reCAPTCHA was working in terms of requiring a valid result, and if it was invalid on a post or a page, the error message was correct. However, if an invalid entry was made on the shortcode register or members-area pages, the error message was blank. This version corrects that.
- The other bug fix, if you could call it that, corrects the redirect on the sidebar login widget when forcing a redirect through the wp-login.php. The process included in version 2.7.6 which allows you to redirect calls to the wp-login.php to a front end login page and include redirect information to pass a successful login back through to the admin panel (or wherever) did not include the sidebar – only the main body login. So if you were using this and your login page displayed the body login and the sidebar login widget, only the body login would redirect correctly. This version corrects this behavior. (NOTE: this is not the same as any of the internal WP-Members redirects such as the wpmem_login_redirect filter hook, etc. This is only referring to passing redirect information to the login such as you would see in wp-login.php and are redirecting calls to wp-login.php to a front end login page. If you have no idea what I’m talking about – don’t worry, you probably don’t need the fix then 😉 )
Code Improvement
- I gave this version a rebuild of the login function wpmem_login. This involved a little cleanup of the function, switching the cookie process from the deprecated function wp_setcookie to wp_set_auth_cookie and moving the wpmem_redirect hook to after the user’s credentials have been validated. This will allow you to use that filter hook to do things based on the user’s login information without having to validate the user in your filter function.
New Features
- Added a new filter hook wpmem_securify. This hook applies a filter to the $content variable at the end of the wpmem_securify function. The primary reason for this hook is to be able to run filters on $content that would give you the ability to block content even if the user is logged in (the wpmem_block filter only works for non-logged in state). This will bring in the ability to block users from content based on defined criteria such as content is for members of “group A” but the user is does not have access to “group A” content.
- Added wpmem_email_headers filter hook. This will allow you to easily filter the headers for the email process of the plugin giving you the ability to send HTML email without modifying the plugin.
- Added wpmem_user_activated action hook. This hook will give you the ability to run actions at the end of user activation. For sites that moderate registration, this gives you the ability to hook in actions that you might not want to do before approval of the registration (such as would normally be done with wpmem_post_register_data).
- Added new shortcode for creating a user list/member directory. This shortcode requires installation of the premium add-on module WP-Members User List. The shortcode has parameters for including a member search function as well as filter hooks for filtering the layout of the directory elements.
- Added new shortcode for protecting inline content with the premium add-on module WP-Members PayPal Subscription.