bp_nouveau_user_feedback( string $feedback_id = '' )
Displays a feedback message to the user.
Description
Parameters
- $feedback_id
-
(Optional) The ID of the message to display
Default value: ''
Source
File: bp-templates/bp-nouveau/includes/template-tags.php
function bp_nouveau_user_feedback( $feedback_id = '' ) {
if ( ! isset( $feedback_id ) ) {
return;
}
$bp_nouveau = bp_nouveau();
$feedback = bp_nouveau_get_user_feedback( $feedback_id );
if ( ! $feedback ) {
return;
}
if ( ! empty( $feedback['before'] ) ) {
/**
* Fires before display of a feedback message to the user.
*
* This is a dynamic filter that is dependent on the "before" value provided by bp_nouveau_get_user_feedback().
*
* @since BuddyPress 3.0.0
*/
do_action( $feedback['before'] );
}
$bp_nouveau->user_feedback = $feedback;
bp_get_template_part(
/**
* Filter here if you wish to use a different templates than the notice one.
*
* @since BuddyPress 3.0.0
*
* @param string path to your template part.
*/
apply_filters( 'bp_nouveau_user_feedback_template', 'common/notices/template-notices' )
);
if ( ! empty( $feedback['after'] ) ) {
/**
* Fires before display of a feedback message to the user.
*
* This is a dynamic filter that is dependent on the "after" value provided by bp_nouveau_get_user_feedback().
*
* @since BuddyPress 3.0.0
*/
do_action( $feedback['after'] );
}
// Reset the feedback message.
$bp_nouveau->user_feedback = array();
}
Changelog
| Version | Description |
|---|---|
| BuddyPress 3.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.