Widgets: Forcibly limit Video widget to only accept oEmbed URLs from YouTube and Vimeo (for now).
Amends [40640]. Props timmydcrawford. See #34115, #39994. Fixes #40935. Built from https://develop.svn.wordpress.org/trunk@40939 git-svn-id: http://core.svn.wordpress.org/trunk@40789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ae690a3fdf
commit
46551a898a
|
@ -184,6 +184,12 @@ wp.mediaWidgets = ( function( $ ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If video, test for Vimeo and YouTube, otherwise, renderFail(). This should be removed once #34115 is resolved.
|
||||||
|
if ( 'video' === this.controller.options.mimeType && ! /vimeo|youtu\.?be/.test( urlParser.host ) ) {
|
||||||
|
embedLinkView.renderFail();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
embedLinkView.dfd = $.ajax({
|
embedLinkView.dfd = $.ajax({
|
||||||
url: wp.media.view.settings.oEmbedProxyUrl,
|
url: wp.media.view.settings.oEmbedProxyUrl,
|
||||||
data: {
|
data: {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.9-alpha-40938';
|
$wp_version = '4.9-alpha-40939';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue