[wp-trac] [WordPress Trac] #26946: Decouple the Menu System from Posts and Taxonomies

WordPress Trac noreply at wordpress.org
Sun Jan 26 17:10:55 UTC 2014


#26946: Decouple the Menu System from Posts and Taxonomies
--------------------------+-----------------------------
 Reporter:  MikeSchinkel  |      Owner:
     Type:  enhancement   |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Menus         |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 I'm proposing this idea for consideration, and hope that it will be taken
 seriously and at least contemplated rather than have someone close it
 reflexively.

 I'd like to propose we consider create menu classes and then decoupling
 the menu system from the post types and taxonomy systems and store menus
 in the options table as serialized objects/arrays. This could probably be
 done in a mostly backward compatible manner such that it could mirror the
 menu data into the existing structure, it would only fail if someone
 updates the menu information in the posts and taxonomy structures using
 direct SQL.

 Having used the menu system in a variety of projects I've come to the
 conclusion that the added complexity of using posts and taxonomy for menus
 provides no benefit over having a much simpler serialized object hierarchy
 such that we have always abandoned the built-in system and rolled our own;
 if anyone knows of use-cases where the current system is preferrable,
 please advise.

 The reason I posted this ticket today is because of
 [https://core.trac.wordpress.org/ticket/5809?replyto=30#comment:31
 @voilamedia's issue with edits to taxonomy terms breaking his or her
 menu]. Here are the relevant comments from that ticket:

 > ''When you create a custom taxonomy, (post types most likely would do
 this too but I didn't want to test it) then add terms to the taxonomy as
 you would. Then add a term of that taxonomy as the name of custom menu
 that you set up with the new menu manager feature, than add menu items it
 modifies the term and the menu it modifies both the menu term and the
 custom taxonomy term.''

 I know this would be a big change from how the existing system stores
 menus but I think it could make working with menus significantly easier
 for themers and plugin developers and get them to use the menu system in
 their own works more frequently than they currently do. **It would solve
 at least one user issue** that won't be solved before significant surgery
 to much of the core and it's database tables which isn't going to happen
 quickly.

 I hope you'll give this ticket some serious consideration as I think it
 could really improve the WordPress API.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/26946>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list