pmpro_bbp_error_msg
Add membership level required message if user does not have access.
Description
apply_filters( 'pmpro_bbp_error_msg', (string) $you_do_not_have_the_required_membership_level_to_access_that_forum );
Parameters (1)
- 0. $you_do_not_have_the_required_membership_level_to_access_that_forum (string) =>
'You do not have the required membership level to access that forum.'
- The you do not have the required membership level to access that forum.
Usage
- To run the hook, copy the example below.
- $you_do_not_have_the_required_membership_level_to_access_that_forum = apply_filters( 'pmpro_bbp_error_msg', $you_do_not_have_the_required_membership_level_to_access_that_forum );
- if ( !empty( $you_do_not_have_the_required_membership_level_to_access_that_forum ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the pmpro_bbp_error_msg callback
- function filter_pmpro_bbp_error_msg( $you_do_not_have_the_required_membership_level_to_access_that_forum ) {
- // make filter magic happen here...
- return $you_do_not_have_the_required_membership_level_to_access_that_forum;
- };
- // add the filter
- add_filter( 'pmpro_bbp_error_msg', 'filter_pmpro_bbp_error_msg', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'pmpro_bbp_error_msg', 'filter_pmpro_bbp_error_msg', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /pmpro-bbpress.php
- $pmpro_bbp_error_msg = apply_filters('pmpro_bbp_error_msg', 'You do not have the required membership level to access that forum.'); // error message to display