gilgimech
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: 3.3 admin bar Covers ErrorsThis seems to work.
if ((error_reporting() && is_admin())) { echo '<style>body{ padding-top: 28px !important; }</style>'; return; }
If there is an error it adds padding to the body pushing everything down except the tool bar.
Forum: Fixing WordPress
In reply to: 3.3 admin bar Covers ErrorsAnd yes, the core team thought about that. They do this instead: https://nacin.com/tag/wp_debug/
Which part are you referring to? I didn’t see anything that would solve the toolbar covering the errors issue.
Forum: Fixing WordPress
In reply to: 3.3 admin bar Covers ErrorsYou can turn it off in the backend.
this worked for me.
if (!function_exists('disableAdminBar')) { function disableAdminBar() { // begin disableAdminBar function remove_action( 'admin_footer', 'wp_admin_bar_render', 1000 ); function remove_admin_bar_style_backend() { echo '<style>body.admin-bar #wpcontent, body.admin-bar #adminmenu { padding-top: 0px !important; }</style>'; } add_filter('admin_head','remove_admin_bar_style_backend'); } } add_action('init','disableAdminBar');
I know it’s not the best way of doing it, but when your developing themes and plugins you need to be able to see those errors. So the toolbar has to go (for developing anyway). I don’t recommend doing something like that for a live site.
I don’t think they thought about that when the core team designed this new toolbar.
Forum: Alpha/Beta/RC
In reply to: Cannot remove admin bar from wp-admin in 3.3Oh wait, sorry I just noticed that the code was right there. try this.
if (!function_exists('disableAdminBar')) { function disableAdminBar() { // begin disableAdminBar function remove_action( 'admin_footer', 'wp_admin_bar_render', 1000 ); function remove_admin_bar_style_backend() { echo '<style>body.admin-bar #wpcontent, body.admin-bar #adminmenu { padding-top: 0px !important; }</style>'; } add_filter('admin_head','remove_admin_bar_style_backend'); } } add_action('init','disableAdminBar');
But the real problem is that the admin bar is also the header now, so if you remove it’ll remove the login stuff in the right corner. I’m working on a way to restore the header to the way it was in vs 3.2. I don’t like the admin bar either, but I’m going to live with it for now.
Forum: Alpha/Beta/RC
In reply to: Cannot remove admin bar from wp-admin in 3.3Try putting this in you functions.php file.
if (!function_exists('disableAdminBar')) { function disableAdminBar(){ remove_action( 'admin_footer', 'wp_admin_bar_render', 1000 ); function remove_admin_bar_style_backend() { echo '<style>body.admin-bar #wpcontent, body.admin-bar #adminmenu { padding-top: 0px !important; }</style>'; } add_filter('admin_head','remove_admin_bar_style_backend'); } } add_filter('admin_head','remove_admin_bar_style_backend');