bp_message_get_notices()
Generate markup for currently active notices.
Description
Source
File: bp-messages/bp-messages-template.php
1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 | 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.