Changeset 6805 for trunk/bp-templates/bp-legacy/buddypress-functions.php
- Timestamp:
- 02/21/2013 12:27:33 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-templates/bp-legacy/buddypress-functions.php
r6790 r6805 125 125 add_action( 'bp_directory_blogs_actions', 'bp_blogs_visit_blog_button' ); 126 126 127 } 128 129 /** Notices ***********************************************************/ 130 131 if ( bp_is_active( 'messages' ) ) { 132 add_action( 'wp_footer', array( $this, 'sitewide_notices' ), 9999 ); 127 133 } 128 134 … … 294 300 */ 295 301 public function localize_scripts() { 296 302 } 303 304 /** 305 * Outputs sitewide notices markup in the footer. 306 * 307 * @since BuddyPress (1.7) 308 * 309 * @see https://buddypress.trac.wordpress.org/ticket/4802 310 */ 311 public function sitewide_notices() { 312 // Do not show notices if user is not logged in 313 if ( ! is_user_logged_in() ) 314 return; 315 316 // add a class to determine if the admin bar is on or not 317 $class = did_action( 'admin_bar_menu' ) ? 'admin-bar-on' : 'admin-bar-off'; 318 319 echo '<div id="sitewide-notice" class="' . $class . '">'; 320 bp_message_get_notices(); 321 echo '</div>'; 297 322 } 298 323
Note: See TracChangeset
for help on using the changeset viewer.