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
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | 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.