[wp-trac] [WordPress Trac] #46585: Customizer: Add Media to Menus using media manager
WordPress Trac
noreply at wordpress.org
Fri Mar 22 14:06:45 UTC 2019
#46585: Customizer: Add Media to Menus using media manager
-----------------------------+------------------------------
Reporter: themightyant | Owner: (none)
Type: enhancement | Status: reopened
Priority: normal | Milestone: Awaiting Review
Component: Customize | Version: 4.3
Severity: minor | Resolution:
Keywords: has-screenshots | Focuses:
-----------------------------+------------------------------
Changes (by dlh):
* version: => 4.3
Comment:
It's true that most of the discussion in #32700 is about `nav-menus.php`,
but (if I'm getting my dates right) that ticket was also created before
nav menus were added to the Customizer in WordPress 4.3.
In fact, it's possible to make attachments available in the Customizer
today by filtering `register_post_type_args`:
{{{#!php
<?php
add_filter(
'register_post_type_args',
function ( $args, $type ) {
if ( 'attachment' === $type ) {
$args['show_in_nav_menus'] = true;
}
return $args;
},
10,
2
);
}}}
However, in my testing, searching for attachments still fails for the same
reasons outlined in #32700 related to `post_status`. So, for parity
between `nav-menus.php` and `customize.php`, I was hoping that any fix to
#32700 would cover both cases before the ticket was officially closed.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46585#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list