bp_core_render_message()
Render the ‘template_notices’ feedback message.
Description
The hook action ‘template_notices’ is used to call this function, it is not called directly.
Source
File: bp-core/bp-core-functions.php
1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 | function bp_core_render_message() { // Get BuddyPress. $bp = buddypress(); if ( ! empty ( $bp ->template_message ) ) : $type = ( 'success' === $bp ->template_message_type ) ? 'updated' : 'error' ; /** * Filters the 'template_notices' feedback message content. * * @since BuddyPress 1.5.5 * * @param string $template_message Feedback message content. * @param string $type The type of message being displayed. * Either 'updated' or 'error'. */ $content = apply_filters( 'bp_core_render_message_content' , $bp ->template_message, $type ); ?> <div id= "message" class = "bp-template-notice <?php echo esc_attr( $type ); ?>" > <?php echo $content ; ?> </div> <?php /** * Fires after the display of any template_notices feedback messages. * * @since BuddyPress 1.1.0 */ do_action( 'bp_core_render_message' ); endif ; } |
Changelog
Version | Description |
---|---|
BuddyPress 1.1.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.