Changeset 6805
- Timestamp:
- 02/21/2013 12:27:33 AM (11 years ago)
- Location:
- trunk/bp-templates/bp-legacy
- Files:
-
- 2 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 -
trunk/bp-templates/bp-legacy/css/buddypress.css
r6801 r6805 507 507 clear: both; 508 508 } 509 #buddypress div#message p { 509 #buddypress div#message p, 510 #sitewide-notice p { 510 511 font-size: 90%; 511 512 display: block; … … 546 547 font-weight: bold; 547 548 } 548 549 #sitewide-notice #message { 550 left: 2%; 551 position: fixed; 552 top: 1em; 553 width: 96%; 554 z-index: 9999; 555 } 556 #sitewide-notice.admin-bar-on #message { 557 top: 3.3em; 558 } 559 #sitewide-notice strong { 560 display: block; 561 margin-bottom: -1em; 562 } 549 563 550 564 /*-------------------------------------------------------------- … … 1004 1018 font-weight: bold; 1005 1019 } 1006 #buddypress div#message p { 1020 #buddypress div#message p, 1021 #sitewide-notice p { 1007 1022 border: 1px solid #e1ca82; 1008 1023 -moz-border-radius: 3px;
Note: See TracChangeset
for help on using the changeset viewer.