bp_nouveau_template_notices()
Template tag to display feedback notices to users, if there are to display
Source Source
File: bp-templates/bp-nouveau/includes/template-tags.php
function bp_nouveau_template_notices() { $bp = buddypress(); $bp_nouveau = bp_nouveau(); if ( ! empty( $bp->template_message ) ) { // Clone BuddyPress template message to avoid altering it. $template_message = array( 'message' => $bp->template_message ); if ( ! empty( $bp->template_message_type ) ) { $template_message['type'] = $bp->template_message_type; } // Adds a 'dimiss' (button) key to array - set true/false. $template_message['dismiss'] = false; // Set dismiss button true for sitewide notices if ( 'bp-sitewide-notice' == $template_message['type'] ) { $template_message['dismiss'] = true; } $bp_nouveau->template_message = $template_message; bp_get_template_part( 'common/notices/template-notices' ); // Reset just after rendering it. $bp_nouveau->template_message = array(); /** * Fires after the display of any template_notices feedback messages. * * @since 3.0.0 */ do_action( 'bp_core_render_message' ); } /** * Fires towards the top of template pages for notice display. * * @since 3.0.0 */ do_action( 'template_notices' ); }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |