mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-29 23:57:41 +02:00
[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:
parent
956301ece7
commit
2c88f6e941
@ -204,7 +204,6 @@
|
|||||||
loop : false,
|
loop : false,
|
||||||
autoplay : false,
|
autoplay : false,
|
||||||
preload : 'none',
|
preload : 'none',
|
||||||
caption : '',
|
|
||||||
width : 400
|
width : 400
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -259,7 +258,6 @@
|
|||||||
autoplay : false,
|
autoplay : false,
|
||||||
preload : 'metadata',
|
preload : 'metadata',
|
||||||
content : '',
|
content : '',
|
||||||
caption : '',
|
|
||||||
width : 640,
|
width : 640,
|
||||||
height : 360
|
height : 360
|
||||||
},
|
},
|
||||||
|
2
wp-includes/js/media-audiovideo.min.js
vendored
2
wp-includes/js/media-audiovideo.min.js
vendored
File diff suppressed because one or more lines are too long
@ -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();
|
extension = attachment.filename.split('.').pop();
|
||||||
|
|
||||||
if ( _.contains( wp.media.view.settings.embedExts, extension ) ) {
|
if ( _.contains( wp.media.view.settings.embedExts, extension ) ) {
|
||||||
|
2
wp-includes/js/media-editor.min.js
vendored
2
wp-includes/js/media-editor.min.js
vendored
File diff suppressed because one or more lines are too long
@ -297,17 +297,6 @@ audio {
|
|||||||
text-align: center;
|
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 {
|
.wpview-type-gallery:after {
|
||||||
content: '';
|
content: '';
|
||||||
display: table;
|
display: table;
|
||||||
|
@ -851,12 +851,6 @@ function wp_print_media_templates() {
|
|||||||
<span><?php _e( 'Loop' ); ?></span>
|
<span><?php _e( 'Loop' ); ?></span>
|
||||||
<input type="checkbox" data-setting="loop" />
|
<input type="checkbox" data-setting="loop" />
|
||||||
</label>
|
</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 class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -968,11 +962,6 @@ function wp_print_media_templates() {
|
|||||||
<# } #>
|
<# } #>
|
||||||
<textarea class="hidden content-setting">{{ content }}</textarea>
|
<textarea class="hidden content-setting">{{ content }}</textarea>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label class="setting">
|
|
||||||
<span><?php _e( 'Caption' ); ?></span>
|
|
||||||
<input type="text" data-setting="caption" value="{{ data.model.caption }}" />
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
@ -1009,9 +998,6 @@ function wp_print_media_templates() {
|
|||||||
<div class="dashicons dashicons-edit edit"></div>
|
<div class="dashicons dashicons-edit edit"></div>
|
||||||
<div class="dashicons dashicons-no-alt remove"></div>
|
<div class="dashicons dashicons-no-alt remove"></div>
|
||||||
</div>
|
</div>
|
||||||
<# if ( ! _.isEmpty( data.model.caption ) ) { #>
|
|
||||||
<div class="track-details">{{ data.model.caption }}</div>
|
|
||||||
<# } #>
|
|
||||||
<?php wp_underscore_audio_template() ?>
|
<?php wp_underscore_audio_template() ?>
|
||||||
<div class="wpview-overlay"></div>
|
<div class="wpview-overlay"></div>
|
||||||
</script>
|
</script>
|
||||||
@ -1021,9 +1007,6 @@ function wp_print_media_templates() {
|
|||||||
<div class="dashicons dashicons-edit edit"></div>
|
<div class="dashicons dashicons-edit edit"></div>
|
||||||
<div class="dashicons dashicons-no-alt remove"></div>
|
<div class="dashicons dashicons-no-alt remove"></div>
|
||||||
</div>
|
</div>
|
||||||
<# if ( ! _.isEmpty( data.model.caption ) ) { #>
|
|
||||||
<div class="track-details">{{ data.model.caption }}</div>
|
|
||||||
<# } #>
|
|
||||||
<?php wp_underscore_video_template() ?>
|
<?php wp_underscore_video_template() ?>
|
||||||
<div class="wpview-overlay"></div>
|
<div class="wpview-overlay"></div>
|
||||||
</script>
|
</script>
|
||||||
|
@ -1392,7 +1392,6 @@ function wp_audio_shortcode( $attr, $content = '' ) {
|
|||||||
|
|
||||||
$default_types = wp_get_audio_extensions();
|
$default_types = wp_get_audio_extensions();
|
||||||
$defaults_atts = array(
|
$defaults_atts = array(
|
||||||
'caption' => '',
|
|
||||||
'src' => '',
|
'src' => '',
|
||||||
'loop' => '',
|
'loop' => '',
|
||||||
'autoplay' => '',
|
'autoplay' => '',
|
||||||
@ -1552,7 +1551,6 @@ function wp_video_shortcode( $attr, $content = '' ) {
|
|||||||
|
|
||||||
$default_types = wp_get_video_extensions();
|
$default_types = wp_get_video_extensions();
|
||||||
$defaults_atts = array(
|
$defaults_atts = array(
|
||||||
'caption' => '',
|
|
||||||
'src' => '',
|
'src' => '',
|
||||||
'poster' => '',
|
'poster' => '',
|
||||||
'loop' => '',
|
'loop' => '',
|
||||||
|
Loading…
Reference in New Issue
Block a user