Ticket #24449: 24449.5.diff
| File 24449.5.diff, 710 bytes (added by , 13 years ago) |
|---|
-
wp-includes/js/media-views.js
462 462 }, 463 463 464 464 canEmbed: function( attachment ) { 465 var type = attachment.get('type'); 466 if ( type !== 'audio' && type !== 'video' ) 467 return false; 465 // If uploading, we know the filename but not the mime type. 466 if ( ! attachment.get('uploading') ) { 467 var type = attachment.get('type'); 468 if ( type !== 'audio' && type !== 'video' ) 469 return false; 470 } 468 471 469 472 return _.contains( media.view.settings.embedExts, attachment.get('filename').split('.').pop() ); 470 473 },