Make WordPress Core


Ignore:
Timestamp:
03/19/2014 07:01:56 AM (12 years ago)
Author:
wonderboymusic
Message:

Add MCE views for audio and video shortcodes. When the shortcode does not contain a source that supports native playback, just show the filename.

  • Remove the audio/video shortcode parsing from the wpgallery plugin.
  • Make mce-view a dependency of media-audiovideo
  • Introduce wp.mce.video, wp.mce.audio, wp.mce.media, and wp.mce.media.View
  • Rename wp.media.audio|video.shortcode() to wp.media.audio|video.update() since it is called on Update and returns a wp.shortcode object now.
  • In wp.mce.View.render(), fire a ready event when the placeholder is being parsed and pass the current node to the event handler.

See #27389, #27437.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media-template.php

    r27608 r27615  
    962962        </div>
    963963    </script>
     964
     965    <script type="text/html" id="tmpl-editor-audio">
     966        <div class="toolbar">
     967            <div class="dashicons dashicons-format-audio edit"></div>
     968            <div class="dashicons dashicons-no-alt remove"></div>
     969        </div>
     970        <?php wp_underscore_audio_template() ?>
     971    </script>
     972
     973    <script type="text/html" id="tmpl-editor-video">
     974        <div class="toolbar">
     975            <div class="dashicons dashicons-format-video edit"></div>
     976            <div class="dashicons dashicons-no-alt remove"></div>
     977        </div>
     978        <?php wp_underscore_video_template() ?>
     979    </script>
     980
    964981    <?php
    965982
Note: See TracChangeset for help on using the changeset viewer.