Make WordPress Core

Ticket #40590: 40590-2.diff

File 40590-2.diff, 708 bytes (added by paulschreiber, 9 years ago)
  • .php

    old new  
    25802580        if ( 'mediaelement' === $library && 1 === $instance ) {
    25812581                $html .= "<!--[if lt IE 9]><script>document.createElement('video');</script><![endif]-->\n";
    25822582        }
    2583         $html .= sprintf( '<video %s controls="controls">', join( ' ', $attr_strings ) );
     2583
     2584
     2585        if ( isset( $attr['controls'] ) && in_array( $attr['controls'], array( 'false', 'off', '0' ), true ) ) {
     2586                $html .= sprintf( '<video %s>', join( ' ', $attr_strings ) );
     2587        } else {
     2588                $html .= sprintf( '<video %s controls="controls">', join( ' ', $attr_strings ) );
     2589        }
    25842590
    25852591        $fileurl = '';
    25862592        $source = '<source type="%s" src="%s" />';