[wp-trac] [WordPress Trac] #25899: Adding mediaelement CSS links outside of head tags breaks HTML5 validation

WordPress Trac noreply at wordpress.org
Thu Jan 2 23:35:36 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:  Awaiting Review
Component:  Media         |     Version:  3.6
 Severity:  minor         |  Resolution:
 Keywords:                |
--------------------------+------------------------------
Changes (by impulsewebdesign):

 * cc: impulsewebdesign (added)


Comment:

 Adding the following code to wp-includes/media.php could be a solution:


 {{{
 function wp_mediaelement_scripts(){
         $library = apply_filters( 'wp_audio_shortcode_library',
 'mediaelement' );
         if ( 'mediaelement' === $library && did_action( 'init' ) ) {
                 wp_enqueue_style( 'wp-mediaelement' );
                 wp_enqueue_script( 'wp-mediaelement' );
         }
 }
 add_action( 'wp_enqueue_scripts', 'wp_mediaelement_scripts' );
 }}}

 then comment out the following from functions wp_audio_shortcode() and
 wp_video_shortcode():

 {{{
 $library = apply_filters( 'wp_audio_shortcode_library', 'mediaelement' );
 if ( 'mediaelement' === $library && did_action( 'init' ) ) {
     wp_enqueue_style( 'wp-mediaelement' );
     wp_enqueue_script( 'wp-mediaelement' );
 }
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/25899#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list