bp_member_type_invalid_role_error_callback()
Display error message on edit profile type page.
Description
Source
File: bp-core/admin/bp-core-admin-functions.php
function bp_member_type_invalid_role_error_callback() { // If there are no errors, then we'll exit the function if ( ! ( $errors = get_transient( 'bp_invalid_role_selection' ) ) ) { return; } // Otherwise, build the list of errors that exist in the settings errores $message = '<div id="message" class="error">'; foreach ( $errors as $error ) { $message .= '<p>' . $error['message'] . '</p>'; } $message .= '</div><!-- #error --><style>div.updated{display: none;}</style>'; // Write them out to the screen echo $message; // Clear and the transient and unhook any other notices so we don't see duplicate messages delete_transient( 'bp_invalid_role_selection' ); remove_action( 'admin_notices', 'bp_member_type_invalid_role_error_callback' ); }
Changelog
Version | Description |
---|---|
BuddyBoss 1.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.