Introduce [audio] and [video] shortcodes, and use MediaElement.js to play them.

props wonderboymusic. see #23282.

git-svn-id: https://develop.svn.wordpress.org/trunk@23729 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2013-03-16 05:25:44 +00:00
parent 050124e6ce
commit 0132e8100c
21 changed files with 6150 additions and 23 deletions

View File

@@ -2019,6 +2019,8 @@ function wp_ajax_send_attachment_to_editor() {
$caption = isset( $attachment['post_excerpt'] ) ? $attachment['post_excerpt'] : '';
$title = ''; // We no longer insert title tags into <img> tags, as they are redundant.
$html = get_image_send_to_editor( $id, $caption, $title, $align, $url, (bool) $rel, $size, $alt );
} elseif ( 'video' === substr( $post->post_mime_type, 0, 5 ) || 'audio' === substr( $post->post_mime_type, 0, 5 ) ) {
$html = stripslashes_deep( $_POST['html'] );
}
$html = apply_filters( 'media_send_to_editor', $html, $id, $attachment );