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

props wonderboymusic. see #23282.

git-svn-id: http://core.svn.wordpress.org/trunk@23729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Mark Jaquith
2013-03-16 05:25:44 +00:00
parent af4dcdbef0
commit 53d12e91bc
21 changed files with 6150 additions and 23 deletions

View File

@@ -4020,3 +4020,23 @@ $("#wp-auth-check-form iframe").load(function(){
</script>
</div>' ) );
}
/**
* Return RegEx body to liberally match an opening HTML tag that:
* 1. Is self-closing or
* 2. Has no body but has a closing tag of the same name or
* 3. Contains a body and a closing tag of the same name
*
* Note: this RegEx does not balance inner tags and does not attempt to produce valid HTML
*
* @since 3.6.0
*
* @param string $tag An HTML tag name. Example: 'video'
* @return string
*/
function get_tag_regex( $tag ) {
if ( empty( $tag ) )
return;
return sprintf( '(<%1$s[^>]*(?:/?>$|>[\s\S]*?</%1$s>))', tag_escape( $tag ) );
}