WordPress.org

Support

Support » Plugins and Hacks » Front-End Users » [Plugin: Front-End Users] Disable _admin_bar_bump_cb?

[Plugin: Front-End Users] Disable _admin_bar_bump_cb?

  • My theme uses a 0px margin for the body of my page. By default when the admin bar is displayed wordpress adds a 28px top margin to the body so the admin bar has room to be displayed. This function is defined in the admin-bar.php wp-includes.

    /**
     * Default admin bar callback.
     *
     * @since 3.1.0
     *
     */
    function _admin_bar_bump_cb() { ?>
    <style type="text/css">
    	html { margin-top: 28px !important; }
    	* html body { margin-top: 28px !important; }
    </style>
    <?php
    }

    When I use FEU your script hides the admin bar but the bump function still pushes down my page messing up my layout. Is it possible to remove that action as part of the disable_wp_admin_bar functions in FEU?

    private function disable_wp_admin_bar() {
    		remove_action('init','wp_admin_bar_init');
    		remove_filter('init','wp_admin_bar_init');
    		remove_action('wp_head','wp_admin_bar_render',1000);
    		remove_filter('wp_head','wp_admin_bar_render',1000);

    etc…

    Thanks.

    http://wordpress.org/extend/plugins/front-end-users/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Front-End Users] Disable _admin_bar_bump_cb?’ is closed to new replies.
Skip to toolbar