xwp / wp-core-media-widgets

Feature plugin for development of new core media widgets for image, video, and audio (and others)
https://wordpress.org/plugins/wp-core-media-widgets/
35 stars 8 forks source link

Improve Insert by URL frame for various media types #157

Closed westonruter closed 7 years ago

westonruter commented 7 years ago

Fixes #149. Fixes #171.

When an invalid URL is detected either by file extension or oEmbed response, the Add to Widget button is disabled and the URL field gets a red outline.

Attempting to add an MP3 file to a video widget:

image

Attempting to add a YouTube video to an audio widget:

image

Attempting to use a non-image URL for the Image widget shows a broken image now:

image

westonruter commented 7 years ago

Beware I just rebased this branch.

westonruter commented 7 years ago

Now when providing an invalid video URL:

image