[wp-trac] [WordPress Trac] #16249: Control of admin bar hiding/display

WordPress Trac wp-trac at lists.automattic.com
Tue Dec 20 15:24:43 UTC 2011


#16249: Control of admin bar hiding/display
----------------------------+-------------------------
 Reporter:  johnhennmacc    |       Owner:
     Type:  defect (bug)    |      Status:  closed
 Priority:  normal          |   Milestone:
Component:  Administration  |     Version:  3.1
 Severity:  normal          |  Resolution:  worksforme
 Keywords:  needs-patch     |
----------------------------+-------------------------

Comment (by jtsternberg):

 And to be as clear as possible, this was my code that was not properly
 removing the space at the top of the page for the admin bar:

 {{{
 // Hide dashboard, admin bar, etc from subscribers
 add_action( 'init', 'aec_hide_admin_stuff' );
 function aec_hide_admin_stuff(  ) {
     if ( !current_user_can('edit_posts') ) {
         show_admin_bar(false);
     }
 }

 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16249#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list