Ticket #24449: 24449.6.diff
| File 24449.6.diff, 1.5 KB (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 }, -
wp-includes/media-template.php
297 297 data-user-setting="urlbutton" 298 298 <# } #>> 299 299 300 <# if ( data.model.canEmbed && 'audio' === data.type) { #>300 <# if ( data.model.canEmbed ) { #> 301 301 <option value="embed" selected> 302 <?php esc_attr_e('Embed AudioPlayer'); ?>302 <?php esc_attr_e('Embed Media Player'); ?> 303 303 </option> 304 304 <option value="file"> 305 <# } else if ( data.model.canEmbed && 'video' === data.type ) { #>306 <option value="embed" selected>307 <?php esc_attr_e('Embed Video Player'); ?>308 </option>309 <option value="file">310 305 <# } else { #> 311 306 <option value="file" selected> 312 307 <# } #>