[wp-trac] [WordPress Trac] #22307: Twenty Twelve: JavaScript error if navigation wrapper markup is removed from header

WordPress Trac noreply at wordpress.org
Wed Oct 31 04:41:20 UTC 2012


#22307: Twenty Twelve: JavaScript error if navigation wrapper markup is removed
from header
---------------------------+------------------
 Reporter:  sswells        |       Owner:
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  3.5
Component:  Bundled Theme  |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |
---------------------------+------------------
Changes (by DrewAPicture):

 * cc: xoodrew@… (added)


Comment:

 Replying to [comment:14 obenland]:
 > Why not now? :)

 OK, I'll bite.

 I'm strongly in agreement with the idea that themes should not have to
 support outside forces (such as plugins) modifying their markup. However,
 I ''do'' believe it is the job of the theme to fail gracefully, just as
 most well-coded functions do when absent all their requirements.

 If an error is going to get tossed when the selector is no longer
 available, we might as well toss a helpful one, al a `_doing_it_wrong()`.
 OR, we can fail silently and show nothing at all, al a
 [attachment:22307.diff].

 From a "best practices" point of view, the former has the ability to
 educate and improve. The latter allows everything to continue working
 together without rocking the boat. At this point in the cycle, I'm tempted
 to go with the second choice even though I think the first sets a better
 example.

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


More information about the wp-trac mailing list