Description
Filters the required capability for allowing dashboard access. With default WP roles, it will be removed for “subscriber” role, but allowed for all others.
Parameters
$capability
(string) (required) The capability required for allowing dashboard access (default: edit_posts).
Usage
Example changes default subject line, adds username to the email subject line.
add_filter( 'wpmem_adv_update_notify_args', function( $settings, $chk_fields, $fields ) { global $userdata; $settings['subject'] = $userdata->user_login . ' updated their profile info!'; return $settings; }, 10, 3 );
Changelog
Introduced in version 1.2
Source
wpmem_adv_dashboard_capability is located in includes/class-wp-members-advanced-options.php
Usage
add_filter( 'wpmem_adv_dashboard_capability', 'my_dashboard_capability' ); function my_dashboard_capability( $capability ) { // Change the required capability for allowing dashboard access. $capability = 'manage_options'; return $capability; }
See a list of all filter and action hooks