WP-Members 3.1.6 has quite a few updates, some fixes, and some new features. There are some new API functions, some new action hooks, and a lot of code improvements. Continue Reading →
WP-Members 3.1.6
Home of WP-Members, The Original WordPress Membership Plugin
Chad Butler · ·
WP-Members 3.1.6 has quite a few updates, some fixes, and some new features. There are some new API functions, some new action hooks, and a lot of code improvements. Continue Reading →
Chad Butler · ·
WP-Members 3.1.5 is both a security and a feature release. Minimum WP version is 3.6.0. Continue Reading →
Chad Butler · ·
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. Continue Reading →
This form will display in place of blocked content if enabled for that post type in the plugin’s main options.
This form can be displayed directly using the shortcode [wpmem_form register]
The following is the default generated HTML for the registration form. All of this can be changed by the use of filters in the functions used to create the form.
<div id="wpmem_reg"><a name="register"></a> <form name="form" method="post" action="http://example.com/register-page/" id="" class="form"> <fieldset> <legend>New User Registration</legend> <label for="user_login" class="text">Choose a Username<span class="req">*</span></label> <div class="div_text"> <input name="user_login" type="text" id="user_login" value="" class="textbox" required=""> </div> <label for="first_name" class="text">First Name<span class="req">*</span></label> <div class="div_text"> <input name="first_name" type="text" id="first_name" value="" class="textbox" required=""> </div> <label for="last_name" class="text">Last Name<span class="req">*</span></label> <div class="div_text"> <input name="last_name" type="text" id="last_name" value="" class="textbox" required=""> </div> <!-- other custom fields removed for brevity --> <label for="user_email" class="text">Email<span class="req">*</span></label> <div class="div_text"> <input name="user_email" type="email" id="user_email" value="" class="textbox" required=""> </div> <input name="a" type="hidden" value="register"> <input name="wpmem_reg_page" type="hidden" value="http://example.com/page-user-is-on/"> <div class="button_div"> <input name="submit" type="submit" value="Register" class="buttons"> </div> <div class="req-text"><span class="req">*</span>Required field</div> </fieldset> </form> </div>
Text and HTML in the login form can be changed by various filters that run during the process of building the form.
This form will display in place of blocked content if enabled for that post type in the plugin’s main options.
This form can be displayed directly using the shortcode [wpmem_form login]
The default HTML markup that is generated when the login form is displayed either in place of blocked content or from the [wpmem_form login] shortcode can be changed by the use of filters in the functions used to create the form.
Text and HTML in the login form can be changed by various filters that run during the process of building the form.
Allows you to filter various defaults for the form including:
wpmem_login_form_args
Filters some of the defaults for the form. Most of these are HTML tags that can be filtered and changed in order to set up custom attributes if you are tying into specific CSS other than WP-Members CSS. Also filters specifc IDs and classes assigned to the form tag and the button tag. Runs in WP_Members_Forms::login_form()
.
wpmem_login_form_rows
Filters components that will build each row in the form (for the login form there are 2 rows – username and password). Rows are a numeric array containing information to assemble the HTML for the form. This includes the label tag, HTML that comes before the input, the input field tag, and any HTML wrapping the row. Runs in WP_Members_Forms::login_form()
.
wpmem_login_hidden_fields
Filters the HTML for hidden fields in the form. Runs in WP_Members_Forms::login_form()
.
wpmem_login_form_button_rows
Allows the “remember me” field to be able to be filtered separately from the submit button when the login form is displayed. For all other short forms, this will generally only contain the submit button. Additional HTML inputs can be added to the array (such as a clear form button).
wpmem_login_form_buttons
Filters the HTML for the form button area. NOTE: if you want to change the button text, do that with wpmem_inc_login_args. Runs in WP_Members_Forms::login_form()
.
wpmem_forgot_link
Filters the forgot password URL used in the forgot password link. Runs in WP_Members_Forms::login_form()
.
wpmem_forgot_link_str
Filters the forgot password link as a string. Runs in WP_Members_Forms::login_form()
.
wpmem_reg_link
Filters the register URL used in the register link. Runs in WP_Members_Forms::login_form()
.
wpmem_reg_link_str
Filters the register link as a string. Runs in WWP_Members_Forms::login_form()
.
wpmem_login_form_before
This filter allows you to add HTML to display before the form. This is an older filter and is generally not used. It remains in the plugin for legacy purposes. Runs in WP_Members_Forms::login_form()
.
wpmem_login_form
Filters the generated form HTML once all of it has been assembled. This filter generally is not used as the previous filters allow direct control over specific text, HTML tags, and properties that might be used for CSS styles. However, it may be helpful in cases where a larger change may be necessary. Runs in WP_Members_Forms::login_form()
.
wpmem_login_form();
This function can be used to display the login form. It sets up the heading, some of the HTML to be used, form field information, and ultimately runs the function to assemble the form HTML. Upon completion, it returns a string of HTML for the form (see above).
[view function]
Ready to get started?