[wp-trac] [WordPress Trac] #32700: Allow media attachments in nav menus

WordPress Trac noreply at wordpress.org
Wed Jun 24 12:39:40 UTC 2015


#32700: Allow media attachments in nav menus
-------------------------+------------------------------
 Reporter:  bobbingwide  |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Menus        |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |     Focuses:
-------------------------+------------------------------

Comment (by bobbingwide):

 I've uploaded a patch file that changes _wp_nav_menu_meta_box_object().

 In order to test it you need to set show_in_nav_menus to true against the
 attachment post type object, in response to "init".

 {{{
 $post_type_object = get_post_type_object( "attachment" );
 $post_type_object->show_in_nav_menus = true;
 }}}

 You also need to create some attachments.

 I'm not sure where to develop a unit test for this :-)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32700#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list