[wp-trac] [WordPress Trac] #12812: New Nav Menu needs to have ancestor class

WordPress Trac wp-trac at lists.automattic.com
Mon May 3 23:26:55 UTC 2010


#12812: New Nav Menu needs to have ancestor class
-------------------------+--------------------------------------------------
 Reporter:  joostdevalk  |       Owner:  filosofo                            
     Type:  enhancement  |      Status:  new                                 
 Priority:  normal       |   Milestone:  3.0                                 
Component:  Menus        |     Version:                                      
 Severity:  normal       |    Keywords:  has-patch dev-feedback needs-testing
-------------------------+--------------------------------------------------

Comment(by filosofo):

 I think the proposed patch is the wrong way to do this.
 {{{wp_setup_nav_menu_item}}} decorates a menu object.  If you think of
 menus in terms of MVC such objects are part of the model, not the view
 (and it's the view that handles things like context-specific HTML
 classes).

 I'm not just objecting out of academic concern for architectural purity or
 good software design. {{{wp_setup_nav_menu_item}}} has a clear, discrete
 purpose which is independent of global state.  Trying to account for
 global state here almost guarantees bugs or hacks to get around bugs in
 the future.

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


More information about the wp-trac mailing list