Description
This filter hook allows you to change the heading of the registration form when in the user edit state (on the members area shortcode page).
Similar to wpmem_register_heading.
Home of WP-Members, The Original WordPress Membership Plugin
This filter hook allows you to change the heading of the registration form when in the user edit state (on the members area shortcode page).
Similar to wpmem_register_heading.
This filter allows you to add any string of HTML onto the front of the generated form. This filter is used on all “short” forms (i.e. login, password reset, password change, forgot username). For “long” forms (register, user profile), use wpmem_register_form_before.
$html
(string) (required) The HTML you want to put above the form.
$action
(string) (optional) Specifies the form being displayed (login|pwdreset|pwdchange|getusername)
/**
* This example will add the HTML before all "short forms"
*/
add_filter( 'wpmem_login_form_before', function( $html ) {
return '<p>Some message here</p>';
});
/**
* Specify the action to limit the message to before a
* specific "short form" form.
*
* The possible action switches are:
* - login
* - pwdreset
* - pwdchange
* - getusername
*
* The following example would add a message before
* the login form only:
*/
add_filter( 'wpmem_login_form_before', function( $html, $action ) {
if ( 'login' == $action ) {
return '<p>Some message here</p>';
}
}, 10, 2 );Introduced in version 2.7.4
wpmem_login_form_before is located in /includes/class-wp-members-forms.php
WP-Members™ is a free plugin to make your WordPress® blog a membership driven site. Perfect for newsletters, private blogs, premium content sites, and more! The plugin restricts selected WP content to be viewable by registered site members. Unlike other registration plugins and WordPress® itself, it puts the registration process inline with your content (and thus your branded theme) instead of the native WP login page. WP-Members™ works “out-of-the-box” with no modifications to your theme, but it is fully scalable for those that want to customize the look and feel, or want to restrict only some content. It is a great tool for sites offering premium content to subscribers, and is adaptable to a variety of applications.
The primary support documents I have created are the Quick Start Guide, a visual support document to get you started, and the Complete Users Guide, which documents all of the features of the plugin.
Filters
Tips & Tricks
Filters the required capability for displaying the toolbar. With default WP roles, it will be removed for “subscriber” role, but displayed for all others.
$capability
(string) (required) The capability required for displaying the toolbar (default: edit_posts).
add_filter( 'wpmem_adv_toolbar_capability', function( $capability ) {
return 'manage_options';
});Introduced in version 1.2
wpmem_adv_toolbar_capability is located in includes/class-wp-members-advanced-options.php
Filters the required capability for allowing dashboard access. With default WP roles, it will be removed for “subscriber” role but allowed for all others.
$capability
(string) (required) The capability required for allowing dashboard access (default: edit_posts).
add_filter( 'wpmem_adv_dashboard_capability', function( $capability ) {
return 'manage_options';
});Introduced in version 1.2
wpmem_adv_dashboard_capability is located in includes/class-wp-members-advanced-options.php
Ready to get started?