[wp-trac] [WordPress Trac] #21562: Twenty Twelve: Hide the "Show navigation" button when there is no navigation to show.

WordPress Trac wp-trac at lists.automattic.com
Tue Aug 14 15:38:20 UTC 2012


#21562: Twenty Twelve: Hide the "Show navigation" button when there is no
navigation to show.
---------------------------+------------------------------
 Reporter:  cfinke         |       Owner:
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Bundled Theme  |     Version:
 Severity:  minor          |  Resolution:
 Keywords:  has-patch      |
---------------------------+------------------------------

Comment (by obenland):

 After spending like 3h trying to find the best way to fix this issue,
 [attachment:21562.2.diff] and #21576 are what I came up with.

 We can loose the `functions.php` callback once #21576 is in core. Until
 then, this is the only possibility I could think of, to prevent a markup
 flash and not have the margin and the menu borders collapse on the empty
 menu.

 In `theme.js` I just wrapped most of the JS with the menu-item-check from
 @cfinke and changed the window check to check for true instead of not
 false.

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


More information about the wp-trac mailing list