Make WordPress Core

Opened 6 years ago

Closed 4 years ago

#46585 closed enhancement (duplicate)

Customizer: Add Media to Menus using media manager

Reported by: themightyant's profile themightyant Owned by:
Milestone: Priority: normal
Severity: minor Version: 4.3
Component: Customize Keywords: has-screenshots close
Focuses: Cc:

Description

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

https://i.stack.imgur.com/JiVhZ.jpg

Change History (6)

#1 @dlh
6 years 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
6 years 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.

Version 0, edited 6 years ago by themightyant (next)

#3 @SergeyBiryukov
6 years ago

  • Milestone set to Awaiting Review

#4 @dlh
6 years 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:

<?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.

#5 @dlh
5 years ago

  • Keywords close added
  • Milestone changed from Awaiting Review to Future Release

I'm still of the opinion that it would be preferable to try to ensure that #32700 covers the post_status issue for both nav-menus.php and customize.php, rather than separate tickets for each. If #32700 were fixed without Customizer support, then it seems like that would open a new route where where a user wouldn't be able to create the same menu on customize.php that they could on nav-menus.php. For that reason, I would suggest that this be marked back as a duplicate, but suggestions for other approaches are welcome.

#6 @dlh
4 years ago

  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from reopened to closed

Closing in favor of #32700 per comment:5.

Note: See TracTickets for help on using tickets.