[wp-trac] [WordPress Trac] #17821: wp_get_nav_menu_object() doesn't check when passing to get_term()

WordPress Trac wp-trac at lists.automattic.com
Sun Nov 20 23:14:07 UTC 2011


#17821: wp_get_nav_menu_object() doesn't check when passing to get_term()
--------------------------+--------------------
 Reporter:  kawauso       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.3
Component:  Menus         |     Version:  3.1.4
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+--------------------

Comment (by duck_):

 Replying to [comment:3 kawauso]:
 > `wp_get_nav_menu_to_edit()` incorrectly passed the menu object to
 `is_nav_menu()` (it is only meant to take an id, slug or name). Following
 patch adds check logic from `is_nav_menu()` in place of the
 `is_nav_menu()` call.

 Although passing an object was undocumented should we be careful about
 backwards compatibility here? As you say even core passed an object to
 is_nav_menu() / wp_get_nav_menu_object().

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


More information about the wp-trac mailing list