This update re-works a couple of behind-the-scenes functions; most notably the non-admin email function and the user export.
The re-work of the wpmem_inc_regemail function doesn’t change much around the end result of the function (if at all), but makes a huge difference in the ability of the email content to be filtered and changed. The new version of the function shifts around some of the steps into a more logical order in order to give a single filter hook for all emails that passes not only the email body content (as before), but also also the subject, the user ID, and a number of other settings, along with the WP-Members fields array and the user’s raw registration data. This now gives you anything you need to make adjustments to the email based on what the user registered as, what their ID is, or any other criteria. The new hook is wpmem_email_filter and it is located in wp-members-email.php.
User Export
The other big change was a new export function. Previously, there were two separate functions – one for exporting just selected users and the other for exporting all users. The new function combines these two processes since they were very similar. There is a new filter hook in the process that will allow filtering certain arguments (settings) for the export process. I’ll be documenting that later. The process from start to finish with the new function is intended to provide the same end result as the previous two functions. The new function is intended to be expandable and with the new filter hook for settings, it will be able to be called directly for specific exports if you want to do something custom.
Other Updates
Some other minor changes and fixes include:
- Fixed the comparison logic for the CSS class for checkbox fields in the wpmem_create_formfield function.
- Updated native registration function for use on localized sites.
- Added redirect_to parameter in the registration form, similar to login.
- Fixed plugin admin page for multisite, if user has theme options edit capabilities.