Make WordPress Core

Opened 9 months ago

Last modified 9 months ago

#46585 reopened enhancement

Customizer: Add Media to Menus using media manager

Reported by: themightyant Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version: 4.3
Component: Customize Keywords: has-screenshots
Focuses: Cc:
PR Number:


Currently the process of adding Media (e.g. a PDF link) to Menus in the Customizer is a poor user experience that requires several steps including changing between multiple screens. i.e.

  • Navigating away from the Customizer
  • Copy and pasting a URL from the Media Library (which in itself is prone to human error as the box is smaller that the URL it contains)
  • before navigating back to the Customizer to add a Custom Link.

It's pretty inelegant solution and one that end clients often mess up!

Here's my proposal.

  • Have a Media Library Accordion with a file button to directly access the Media Manager from within the Customizer


Change History (4)

#1 @dlh
9 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi @themightyant, and welcome to WordPress Trac!

This issue is being discussed in #32700.

#2 @themightyant
9 months ago

  • Resolution duplicate deleted
  • Status changed from closed to reopened

@dlh Thanks. However #32700 is a similar but slightly different issue. #32700 is to do with nav-menus.php (Appearance -> Menus) my query was related to the Menus in the Customizer (customize.php). Though if that one was fixed I would use the older interface as it would solve the problem for end users.

Last edited 9 months ago by themightyant (previous) (diff)

#3 @SergeyBiryukov
9 months ago

  • Milestone set to Awaiting Review

#4 @dlh
9 months ago

  • Version set to 4.3

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:

        function ( $args, $type ) {
                if ( 'attachment' === $type ) {
                        $args['show_in_nav_menus'] = true;
                return $args;

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.

Note: See TracTickets for help on using tickets.