WordPress.org

Make WordPress Core

Ticket #40590: 40590.diff

File 40590.diff, 667 bytes (added by subrataemfluence, 4 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']) && $attr['controls'] == 'false') {
     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" />';