Make WordPress Core

Opened 8 years ago

Last modified 6 years ago

#40200 new enhancement

Introduce WP_Customize_Embed_Control

Reported by: celloexpressions's profile celloexpressions Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 4.7
Component: Customize Keywords: needs-patch
Focuses: javascript Cc:

Description

Similar to the previously-introduced WP_Customize_Media_Control, WP_Customize_Embed_Control would offer a UI framework for options that store media information. For this control, associated settings would always store the embed URL, whereas the media control stores an associated local attachment ID. This control would be used to add and manage options that use externally-hosted media via oembed. The initial core usage would be for the external header video control, and this would facilitate showing the embed within the customize pane so that you can directly see what the embed is in the pane, similarly to how the media controls show small previews in the pane to complement the full previews in the customize preview.

Change History (4)

#1 @westonruter
8 years ago

I think @melchoyce is intending that the current video header controls for internal and external video to be combined into one control, similar to how the video widget control allows you to select a video from the media library or an external video by URL (including oEmbeds).

That being the case, perhaps it would mean the underlying WP_Customize_Media_Control should have a new flag for whether or not it should allow supplying media by URL. The underlying setting would then toggle between an attachment ID and a media URL.

This ticket was mentioned in Slack in #core-customize by westonruter. View the logs.


7 years ago

#3 @paaljoachim
7 years ago

Looking at the Header Media section today.
One clicks "Select Video" to add a local video.
Then another text box exists just below it to insert a YouTube URL.
That seems clunky to me.

It would be better to have the option to list some of the options in the standard left column area that we see when adding media through a page or post. The options we see in this list are: Insert Media, Create Gallery, Create Audio Playlist, Create Video Playlist, Featured Image and Insert from URL.

Having a way to add the left column but to decide which of these list items to include would give a broader range of possibility then what we have today. It would basically give more options for the developer in what can be included when adding media.

Last edited 7 years ago by paaljoachim (previous) (diff)

#4 @celloexpressions
6 years ago

I like the idea of merging embed functionality with the media controls; however, this would probably best be done by introducing a new control (such as WP_Customize_Embed_Control, or something else) that is oriented toward embedded content first. For backwards compatibility, WP_Customize_Media_Control should always store attachment IDs to the associated setting, and this strategy is fundamentally rooted in management of local media.

The new control can bring the media widget functionality to customize controls, introducing embed controls and wrapping in functionality for media controls with shared-handling output functions for the frontend.

Note: See TracTickets for help on using tickets.