[wp-trac] [WordPress Trac] #15856: show_admin_bar(false) doesn't work (was: Admin bar shouldn't show in theme preview iframe)

WordPress Trac wp-trac at lists.automattic.com
Fri Dec 17 07:45:36 UTC 2010


#15856: show_admin_bar(false) doesn't work
----------------------------+------------------
 Reporter:  nacin           |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  3.1
Component:  Administration  |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  needs-patch     |
----------------------------+------------------
Changes (by nacin):

 * type:  enhancement => defect (bug)


Old description:

> It takes up space and looks weird. People are trying to preview a theme,
> and the admin bar is an unnecessary constant.

New description:

 show_admin_bar(false) doesn't work. See the first comment for more.

 ----

 My initial report:
 '''Admin bar shouldn't show in theme preview iframe'''
 >It takes up space and looks weird. People are trying to preview a theme,
 and the admin bar is an unnecessary constant.

 This should also be fixed.

--

Comment:

 show_admin_bar() has apparently been crippled.

 You should be able to call show_admin_bar( false ) before the admin bar is
 initiated, and it should kill the admin bar.

 We should either eliminate this function, or fix it. I vote to fix it,
 otherwise putting this simple logic into preview_theme() doesn't work:
 {{{
 if ( isset( $_GET['TB_iframe'] ) )
     show_admin_bar( false );
 }}}

 And the call to show_admin_bar() in iframe_header() is useless.

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


More information about the wp-trac mailing list