[wp-trac] [WordPress Trac] #25899: Adding mediaelement CSS links outside of head tags breaks HTML5 validation
WordPress Trac
noreply at wordpress.org
Thu Jun 12 19:09:15 UTC 2014
#25899: Adding mediaelement CSS links outside of head tags breaks HTML5 validation
--------------------------+------------------
Reporter: AlphaK | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.0
Component: Media | Version: 3.6
Severity: minor | Resolution:
Keywords: has-patch | Focuses:
--------------------------+------------------
Comment (by Ov3rfly):
In addition currently the `wp_audio_shortcode_library` filter
unfortunately can not be used to block the enqueue'ing (and adding the
script/style/IE9fix to header with some workaround) by returning something
else than `'mediaelement'` from the filter, because `$library` is not only
used for the filter but also later in code...
{{{
$library = apply_filters( 'wp_audio_shortcode_library', 'mediaelement' );
if ( 'mediaelement' === $library && did_action( 'init' ) ) {
wp_enqueue_style( 'wp-mediaelement' );
wp_enqueue_script( 'wp-mediaelement' );
}
[...]
if ( 'mediaelement' === $library )
$html .= wp_mediaelement_fallback( $fileurl );
[...]
return apply_filters( 'wp_audio_shortcode', $html, $atts, $audio,
$post_id, $library );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/25899#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list