When a video shortcode has content in its body, append it as inner HTML in the resulting <video>.

Reverts [27096].
Fixes #26628.
See #27016.


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


git-svn-id: http://core.svn.wordpress.org/trunk@26968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-02-05 01:43:12 +00:00
parent 5e08452f49
commit 228fc639b9
2 changed files with 10 additions and 2 deletions

View File

@ -1233,6 +1233,14 @@ function wp_video_shortcode( $attr, $content = '' ) {
$html .= sprintf( $source, $type['type'], esc_url( $$fallback ) );
}
}
if ( ! empty( $content ) ) {
if ( false !== strpos( $content, "\n" ) )
$content = str_replace( array( "\r\n", "\n", "\t" ), '', $content );
$html .= trim( $content );
}
if ( 'mediaelement' === $library )
$html .= wp_mediaelement_fallback( $fileurl );
$html .= '</video>';