Skip to:
Content

BuddyPress.org

Changeset 2013


Ignore:
Timestamp:
09/30/2009 05:56:08 PM (15 years ago)
Author:
apeatling
Message:

Fixes #1128

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-cssjs.php

    r1961 r2013  
    179179add_action( 'wp_head', 'bp_core_add_ajax_url_js' );
    180180
     181/**
     182 * bp_core_override_adminbar_css()
     183 *
     184 * Overrides the theme's admin bar CSS to hide the adminbar if disabled.
     185 *
     186 * @package BuddyPress Core
     187 */
     188function bp_core_override_adminbar_css() {
     189    if ( defined( 'BP_DISABLE_ADMIN_BAR' ) || ( get_site_option( 'hide-loggedout-adminbar' ) && !is_user_logged_in() ) ) {
     190    ?>
     191<style type="text/css">body { padding-top: 0 !important; } #wp-admin-bar { display: none; }</style>
     192    <?php }
     193}
     194add_action( 'wp_footer', 'bp_core_override_adminbar_css' );
    181195?>
  • trunk/bp-themes/bp-sn-parent/functions.php

    r2006 r2013  
    6868add_action( 'wp', 'bp_dtheme_show_home_blog', 2 );
    6969
    70 /* Override the Admin Bar CSS if it has been disabled */
    71 function bp_dtheme_override_adminbar_css() {
    72     if ( defined( 'BP_DISABLE_ADMIN_BAR' ) || ( get_site_option( 'hide-loggedout-adminbar' ) && !is_user_logged_in() ) ) {
    73     ?>
    74 <style type="text/css">body { padding-top: 0 !important; }</style>
    75     <?php }
    76 }
    77 add_action( 'wp_footer', 'bp_dtheme_override_adminbar_css' );
    78 
    7970?>
Note: See TracChangeset for help on using the changeset viewer.