[wp-trac] [WordPress Trac] #23805: wp_ajax_add_menu_item() closed to user-created menu item types

WordPress Trac noreply at wordpress.org
Mon Mar 18 01:41:53 UTC 2013


#23805: wp_ajax_add_menu_item() closed to user-created menu item types
-----------------------------+--------------------------
 Reporter:  GaryJ            |       Type:  defect (bug)
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  Menus
  Version:                   |   Severity:  normal
 Keywords:  has-patch        |
-----------------------------+--------------------------
 I'm building a new Menus meta box, that can add a new type of menu item,
 lets call it 'foobar'.

 The conditional inside `wp_ajax_add_menu_item()` is slightly off. It
 checks that the menu item type is not 'custom', then proceeds to assume
 that it's either post-type or taxonomy so it can do some DB look-ups and
 create an `$_object` variable which is then used. This means it's closed
 to other types of menu items.

 I've chosen 'foobar', so I can distinguish those items later on when
 walking through the front-end output.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23805>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list