From d11d19a2b7829727f192a264b46e38343b9f3dd9 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Mon, 7 Apr 2014 06:12:06 +0000 Subject: [PATCH] [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. git-svn-id: https://develop.svn.wordpress.org/trunk@27979 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/media-audiovideo.js | 2 -- src/wp-includes/js/media-editor.js | 17 ----------------- .../js/tinymce/skins/wordpress/wp-content.css | 11 ----------- src/wp-includes/media-template.php | 17 ----------------- src/wp-includes/media.php | 2 -- 5 files changed, 49 deletions(-) diff --git a/src/wp-includes/js/media-audiovideo.js b/src/wp-includes/js/media-audiovideo.js index a1ee78f6ce..3f659da968 100644 --- a/src/wp-includes/js/media-audiovideo.js +++ b/src/wp-includes/js/media-audiovideo.js @@ -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 }, diff --git a/src/wp-includes/js/media-editor.js b/src/wp-includes/js/media-editor.js index 293d7f8060..884b1bd92f 100644 --- a/src/wp-includes/js/media-editor.js +++ b/src/wp-includes/js/media-editor.js @@ -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 ) ) { diff --git a/src/wp-includes/js/tinymce/skins/wordpress/wp-content.css b/src/wp-includes/js/tinymce/skins/wordpress/wp-content.css index bffb4b5ff6..fe84a39da3 100644 --- a/src/wp-includes/js/tinymce/skins/wordpress/wp-content.css +++ b/src/wp-includes/js/tinymce/skins/wordpress/wp-content.css @@ -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; diff --git a/src/wp-includes/media-template.php b/src/wp-includes/media-template.php index f38638d22b..4e20c049e9 100644 --- a/src/wp-includes/media-template.php +++ b/src/wp-includes/media-template.php @@ -851,12 +851,6 @@ function wp_print_media_templates() { - - -
@@ -968,11 +962,6 @@ function wp_print_media_templates() { <# } #> - - @@ -1009,9 +998,6 @@ function wp_print_media_templates() {
- <# if ( ! _.isEmpty( data.model.caption ) ) { #> -
{{ data.model.caption }}
- <# } #>
@@ -1021,9 +1007,6 @@ function wp_print_media_templates() {
- <# if ( ! _.isEmpty( data.model.caption ) ) { #> -
{{ data.model.caption }}
- <# } #>
diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php index adeaed4ca3..4b12c5bd04 100644 --- a/src/wp-includes/media.php +++ b/src/wp-includes/media.php @@ -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' => '',