diff --git src/wp-admin/js/widgets/media-widgets.js src/wp-admin/js/widgets/media-widgets.js
index cd03b09633..1408b35d01 100644
|
|
|
wp.mediaWidgets = ( function( $ ) { |
| 142 | 142 | /** |
| 143 | 143 | * Fetch media. |
| 144 | 144 | * |
| 145 | | * This is a TEMPORARY measure until the WP API supports an oEmbed proxy endpoint. See #40450. |
| 146 | | * |
| 147 | | * @see https://core.trac.wordpress.org/ticket/40450 |
| 148 | 145 | * @returns {void} |
| 149 | 146 | */ |
| 150 | 147 | fetch: function() { |
diff --git src/wp-includes/js/media-views.js src/wp-includes/js/media-views.js
index 1bdc6e6575..f8dc498484 100644
|
|
|
EmbedLink = wp.media.view.Settings.extend({ |
| 4605 | 4605 | |
| 4606 | 4606 | initialize: function() { |
| 4607 | 4607 | this.listenTo( this.model, 'change:url', this.updateoEmbed ); |
| | 4608 | |
| | 4609 | this.listenTo( this.model, 'change:url', function() { |
| | 4610 | var trimmedUrl = $.trim( this.model.get( 'url' ) ); |
| | 4611 | if ( trimmedUrl !== this.model.get( 'url' ) ) { |
| | 4612 | this.model.set( 'url', trimmedUrl ); |
| | 4613 | } |
| | 4614 | }); |
| 4608 | 4615 | }, |
| 4609 | 4616 | |
| 4610 | 4617 | updateoEmbed: _.debounce( function() { |
diff --git src/wp-includes/js/media/views/embed/link.js src/wp-includes/js/media/views/embed/link.js
index 1af96cfa5d..69df05aaa8 100644
|
|
|
EmbedLink = wp.media.view.Settings.extend({ |
| 16 | 16 | |
| 17 | 17 | initialize: function() { |
| 18 | 18 | this.listenTo( this.model, 'change:url', this.updateoEmbed ); |
| | 19 | |
| | 20 | this.listenTo( this.model, 'change:url', function() { |
| | 21 | var trimmedUrl = $.trim( this.model.get( 'url' ) ); |
| | 22 | if ( trimmedUrl !== this.model.get( 'url' ) ) { |
| | 23 | this.model.set( 'url', trimmedUrl ); |
| | 24 | } |
| | 25 | }); |
| 19 | 26 | }, |
| 20 | 27 | |
| 21 | 28 | updateoEmbed: _.debounce( function() { |