[27640] supported a caption for audio and video shortcodes as part of a UX iteration for the related MCE views. These captions have since be excluded, so the extra code should be removed (it was there for this sole reason).

See #27320.


Built from https://develop.svn.wordpress.org/trunk@27979


git-svn-id: http://core.svn.wordpress.org/trunk@27809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-04-07 06:13:18 +00:00
parent 956301ece7
commit 2c88f6e941
7 changed files with 2 additions and 51 deletions

View File

@ -204,7 +204,6 @@
loop : false,
autoplay : false,
preload : 'none',
caption : '',
width : 400
},
@ -259,7 +258,6 @@
autoplay : false,
preload : 'metadata',
content : '',
caption : '',
width : 640,
height : 360
},

File diff suppressed because one or more lines are too long

View File

@ -202,23 +202,6 @@
}
}
if ( ! _.isEmpty( attachment.caption ) ) {
shortcode.caption = attachment.caption;
} else if ( attachment.meta && attachment.meta.title ) {
shortcode.caption = '“' + attachment.meta.title + '”';
if ( attachment.meta.album ) {
shortcode.caption += ' from ' + attachment.meta.album;
}
if ( attachment.meta.artist ) {
shortcode.caption += ' by ' + attachment.meta.artist;
}
} else if ( ! _.isEmpty( attachment.description ) ) {
shortcode.caption = attachment.description;
} else {
shortcode.caption = attachment.title;
}
extension = attachment.filename.split('.').pop();
if ( _.contains( wp.media.view.settings.embedExts, extension ) ) {

File diff suppressed because one or more lines are too long

View File

@ -297,17 +297,6 @@ audio {
text-align: center;
}
.wpview-type-video .track-details,
.wpview-type-audio .track-details {
position: absolute;
top: 0;
left: 5px;
width: 85%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.wpview-type-gallery:after {
content: '';
display: table;

View File

@ -851,12 +851,6 @@ function wp_print_media_templates() {
<span><?php _e( 'Loop' ); ?></span>
<input type="checkbox" data-setting="loop" />
</label>
<label class="setting">
<span><?php _e( 'Caption' ); ?></span>
<input type="text" data-setting="caption" value="{{ data.model.caption }}" />
</label>
<div class="clear"></div>
</div>
</div>
@ -968,11 +962,6 @@ function wp_print_media_templates() {
<# } #>
<textarea class="hidden content-setting">{{ content }}</textarea>
</label>
<label class="setting">
<span><?php _e( 'Caption' ); ?></span>
<input type="text" data-setting="caption" value="{{ data.model.caption }}" />
</label>
</div>
</div>
</script>
@ -1009,9 +998,6 @@ function wp_print_media_templates() {
<div class="dashicons dashicons-edit edit"></div>
<div class="dashicons dashicons-no-alt remove"></div>
</div>
<# if ( ! _.isEmpty( data.model.caption ) ) { #>
<div class="track-details">{{ data.model.caption }}</div>
<# } #>
<?php wp_underscore_audio_template() ?>
<div class="wpview-overlay"></div>
</script>
@ -1021,9 +1007,6 @@ function wp_print_media_templates() {
<div class="dashicons dashicons-edit edit"></div>
<div class="dashicons dashicons-no-alt remove"></div>
</div>
<# if ( ! _.isEmpty( data.model.caption ) ) { #>
<div class="track-details">{{ data.model.caption }}</div>
<# } #>
<?php wp_underscore_video_template() ?>
<div class="wpview-overlay"></div>
</script>

View File

@ -1392,7 +1392,6 @@ function wp_audio_shortcode( $attr, $content = '' ) {
$default_types = wp_get_audio_extensions();
$defaults_atts = array(
'caption' => '',
'src' => '',
'loop' => '',
'autoplay' => '',
@ -1552,7 +1551,6 @@ function wp_video_shortcode( $attr, $content = '' ) {
$default_types = wp_get_video_extensions();
$defaults_atts = array(
'caption' => '',
'src' => '',
'poster' => '',
'loop' => '',