WP-Members 2.9.0 is nearly done and is now available for testing. This version has been in the works for quite some time. I started the build early last fall. It has taken some time to get everything up to the point where the package is really ready because I have incorporated a number of new features that required some major code overhaul in a few places.
New Form Building Functions
The most exciting thing about this release is the new form building functions. You may have already seen on the site that the functions themselves were available as pluggable functions for testing.
There are many new filters in the form building process. What this means is that the sections of the form can be filtered as it is being built. That means you don’t have to wait for the form to be built and then do some complicated code gymnastics to str_replace one string.
I have tried to make things functional for those of you who have some good design skills. I honestly have been blown away by some of the custom forms I have seen some users put together with the plugin up to this point. I can’t wait to see what is in store now that you can get more control.
All forms will have defaults that can be changed before the form is even built, so if you want a div wrapper for the entire row – you got it! You want to remove the wrapper around the input tags – done. You want to filter a single specific row’s tag directly without filtering the entire form – can do.
Now, I understand that from the non-coders side of things, you rely on code snippets for customization. So out of the gate, I am pretty sure that unless you already know how to hook into WP arguments, there will need to be more detail to get you as excited as I am. Rest assured, that is coming. Once this version is out in the wild, I’ll be going back and re-doing a lot of the examples in the code snippet library. Trust me when I tell you the new examples will deliver the same results with less effort.
Speaking of delivering the same results…
Some of you might test the beta and say, “I don’t see the difference.” That, my friend, is a good thing; especially if you already have custom filters on the login or registration forms. Where possible, I have tried to keep the output as close to the original as possible. Seamless updates is my motto.
HOWEVER, I must caution you that even when this is out as the full production release, you MUST remember that you should test the update first, before you load it on a production site – especially if that site is your business.
You should be able to roll back if something goes wrong, but seriously, site management best practices dictate that you not blindly update any plugin on your productions site without testing first.
For those of you with complicated filters and you want to test to be sure this is going to work, the form functions are pluggable, so you can load a pluggable file to test and roll back without touching the original plugin. That’s pretty cool in my book.
So What’s New In 2.9?
I’ll be updating/revising this part of the post – I need to get some better detail, but I wanted to get this release out there as some people are asking for it.
Major updates
- New form building functions include new hooks and a more customizable form building process.
- Form functions moved from wp-members-dialogs.php to new file forms.php
- Sidebar login form also rebuilt in the same way the login and register forms were changed.
- Legacy (old table based) forms completely removed in 2.9
- Updates to error and dialog messages – removed unnecessary html tags (<p>,<b>)
Changes in wp-members-core.php
- updated calling of wpmem_test_shortcode, now it works like has_shortcode, put off deprecating at this time.
- updated shortcode to include tos page, allow for new tags (wpmem_field, wpmem_logged_in) (added new shortcode calls in wp-members.php), and accept id attribute for fields. Added $tag argument, can use shortcode_atts_{$shortcode} filter
- moved wpmem_test_shortcode to utilities.php
- added new action hooks: wpmem_pwd_change and wpmem_pwd_reset
- added new filter hook: wpmem_regchk
Changes in wp-members.php
- a pretty major overhaul of this file. Moved all but four declarations that weren’t already in functions into the init function. Only two constants are declared before the function. This initialization comes after the theme is setup, so pre-initilization needs, such as loading pluggable functions can be declared in the theme’s functions.php file. Pluggable functions do not need to be loaded only from the wp-members-pluggable.php file.
- The file name of the wp-members-pluggable.php file is loaded in a filter hook – wpmem_plugins_file, so you could call it something else or load it from another location.
- New action hooks: wpmem_pre_init, wpmem_after_init, wpmem_pre_admin_init, wpmem_after_admin_init
- New filter hook: wpmem_settings
Miscellaneous Changes
- Updates to the html for some of the admin to better fit the new WP admin layout. Old html was compatible, but the new works better.
- Updates to the options tab to better group options
- Review of output, localized a few missed strings
- Implementation of changes in localization of field names. English values are now stored in the db (except for custom fields – that would be whatever language the user creates the field as). Fields are then translated when displayed, rather than stored as translated strings.
- updated user profile to fix some issues with checkbox and required fields – users.php
- updated user export to include wp_users table fields user_url, user_nicename, and display_name fields
- Code cleanup in wpmem_block function
- Updated autoexcerpt function
Downloads
- Beta Release Candidate 2
- Pluggable File for Form Function Test Only (remove if/when running the beta)
Posts With Info On Changes, Updates, and Some Code Samples
- WP-Members 2.9 Alpha Release Available for Testing
- WP-Members 2.9 Project: wpmem_login_form Function
- WP-Members 2.9 Project: wpmem_inc_registration_form Function
- WP-Members 2.9 Project: wpmem_inc_login, wpmem_inc_changepassword, and wpmem_inc_resetpassword Functions
- WP-Members 2.9 Project (If you are wondering how to use the pluggable file for testing, this is the post to read)