WordPress.org

Make WordPress Core

Ticket #32700: 32700.diff

File 32700.diff, 560 bytes (added by bobbingwide, 5 years ago)

Allow attachments to be listed in nav menus

  • src/wp-admin/includes/nav-menu.php

     
    11631163                                'order' => 'DESC',
    11641164                        );
    11651165
     1166                // Attachments have a status of 'inherit'
     1167                } elseif ( 'attachment' == $object->name ) {
     1168                        $object->_default_query = array(
     1169                                'post_status' => 'inherit',
     1170                        );
     1171
    11661172                // Custom post types should show only published items.
    11671173                } else {
    11681174                        $object->_default_query = array(