| 167 | | /** |
| 168 | | * bp_core_override_adminbar_css() |
| 169 | | * |
| 170 | | * Overrides the theme's admin bar CSS to hide the adminbar if disabled. |
| 171 | | * |
| 172 | | * @package BuddyPress Core |
| 173 | | */ |
| 174 | | function bp_core_override_adminbar_css() { |
| 175 | | global $bp; |
| 176 | | |
| 177 | | if ( defined( 'BP_DISABLE_ADMIN_BAR' ) || ( (int)get_site_option( 'hide-loggedout-adminbar' ) && !is_user_logged_in() ) ) { |
| 178 | | ?> |
| 179 | | <style type="text/css">body { padding-top: 0 !important; } #wp-admin-bar { display: none; }</style> |
| 180 | | <?php } |
| 181 | | } |
| 182 | | add_action( 'wp_footer', 'bp_core_override_adminbar_css' ); |