I think you added this filter too late (on init
?), so that the initialization does happen, but the rest does not.
The three places that check show_admin_bar
(via is_admin_bar_showing()
) are:
Because _wp_admin_bar_init()
is called on init
, you will be too late if you also add the show_admin_bar
filter on init
, unless you change the priority.
This will not render the admin bar, but still add the 28px margin:
add_filter( 'init', 'wpse13875_init' );
function wpse13875_init()
{
add_filter( 'show_admin_bar', '__return_false' );
}
This will completely disable the admin bar, because it will be executed before _wp_admin_bar_init()
:
add_filter( 'init', 'wpse13875_init', 9 );
function wpse13875_init()
{
add_filter( 'show_admin_bar', '__return_false' );
}
__return_false
snippet should kill all CSS and JS that admin bar uses.