diff --git wp-includes/js/media-views.js wp-includes/js/media-views.js
index c932f21..1fc4e7e 100644
|
|
EmbedLink = wp.media.view.Settings.extend({ |
4591 | 4591 | if ( 'abort' === status ) { |
4592 | 4592 | return; |
4593 | 4593 | } |
| 4594 | |
| 4595 | if ( response.data.type === 'not-embeddable' ) { |
| 4596 | this.$( '.embed-container' ).show().find( '.embed-preview' ).html( '<div class="error"><p>' + response.data.message + '</p></div>' ); |
| 4597 | return; |
| 4598 | } |
| 4599 | |
4594 | 4600 | this.$( '.link-text' ).show(); |
4595 | 4601 | }, |
4596 | 4602 | |
4597 | | renderoEmbed: function( response ) { |
4598 | | var html = ( response && response.data && response.data.body ) || ''; |
4599 | | |
4600 | | if ( html ) { |
4601 | | this.$('.embed-container').show().find('.embed-preview').html( html ); |
| 4603 | renderoEmbed: function( response, status ) { |
| 4604 | if ( response.success ) { |
| 4605 | this.$( '.embed-container' ).show().find( '.embed-preview' ).html( response.data.body ); |
4602 | 4606 | } else { |
4603 | | this.renderFail(); |
| 4607 | this.renderFail(response, status); |
4604 | 4608 | } |
4605 | 4609 | } |
4606 | 4610 | }); |