WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/05/2014 01:42:02 AM (7 years ago)
Author:
wonderboymusic
Message:

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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/media.php

    r27096 r27097  
    369369     * Test [video] shortcode processing
    370370     *
    371      * @ticket 26864
    372371     */
    373372    function test_video_shortcode_body() {
     
    394393
    395394        $expected = '<div style="width: ' . $w . 'px; max-width: 100%;" class="wp-video">' .
    396             "<!--[if lt IE 9]><script>document.createElement(\'video\');</script><![endif]-->\n" .
     395            "<!--[if lt IE 9]><script>document.createElement('video');</script><![endif]-->\n" .
    397396            '<video class="wp-video-shortcode" id="video-0-1" width="' . $w . '" height="' . $h . '" preload="metadata" controls="controls">' .
    398397            '<source type="video/mp4" src="http://domain.tld/wp-content/uploads/2013/12/xyz.mp4" />' .
    399             '<source type="video/webm" src="myvideo.webm" />' .
    400             '<source type="video/ogg" src="myvideo.ogv" />' .
    401             '<track kind="subtitles" src="subtitles.srt" srclang="en" />' .
    402             '<track kind="chapters" src="chapters.srt" srclang="en" />' .
     398            '<!-- WebM/VP8 for Firefox4, Opera, and Chrome --><source type="video/webm" src="myvideo.webm" />' .
     399            '<!-- Ogg/Vorbis for older Firefox and Opera versions --><source type="video/ogg" src="myvideo.ogv" />' .
     400            '<!-- Optional: Add subtitles for each language --><track kind="subtitles" src="subtitles.srt" srclang="en" />' .
     401            '<!-- Optional: Add chapters --><track kind="chapters" src="chapters.srt" srclang="en" />' .
    403402            '<a href="http://domain.tld/wp-content/uploads/2013/12/xyz.mp4">' .
    404403            "http://domain.tld/wp-content/uploads/2013/12/xyz.mp4</a></video></div>\n";
Note: See TracChangeset for help on using the changeset viewer.