bp_message_get_notices()
Generate markup for currently active notices.
Description
Source
File: bp-messages/bp-messages-template.php
function bp_message_get_notices() { $notice = BP_Messages_Notice::get_active(); if ( empty( $notice ) ) { return false; } $closed_notices = bp_get_user_meta( bp_loggedin_user_id(), 'closed_notices', true ); if ( empty( $closed_notices ) ) { $closed_notices = array(); } if ( is_array( $closed_notices ) ) { if ( !in_array( $notice->id, $closed_notices ) && $notice->id ) { ?> <div id="message" class="info notice" rel="n-<?php echo esc_attr( $notice->id ); ?>"> <p> <strong><?php echo stripslashes( wp_filter_kses( $notice->subject ) ) ?></strong><br /> <?php echo stripslashes( wp_filter_kses( $notice->message) ) ?> <button type="button" id="close-notice" class="bp-tooltip" data-bp-tooltip-pos="up" data-bp-tooltip="<?php esc_attr_e( 'Dismiss this notice', 'buddyboss' ) ?>"><span class="bp-screen-reader-text"><?php _e( 'Dismiss this notice', 'buddyboss' ) ?></span> <span aria-hidden="true">Χ</span></button> <?php wp_nonce_field( 'bp_messages_close_notice', 'close-notice-nonce' ); ?> </p> </div> <?php } } }
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.