Make WordPress Core


Ignore:
Timestamp:
03/16/2025 06:49:39 PM (8 months ago)
Author:
joedolson
Message:

Media: Add 'muted' attribute and normalize HTML attributes.

Add the 'muted' attribute to the audio shortcode. Fix boolean attributes to meet HTML5 standards. Replaces instances like attr="1" with attr for loop, autoplay, and muted, and improves handling of the preload attribute to only output valid values.

Props shub07, dmsnell, debarghyabanerjee, audrasjb, narenin, apermo, joedolson.
Fixes #61515.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/widgets/wpWidgetMediaAudio.php

    r52248 r59987  
    273273        // Custom attributes.
    274274        $this->assertStringContainsString( 'preload="auto"', $output );
    275         $this->assertStringContainsString( 'loop="1"', $output );
     275        $this->assertStringContainsString( 'loop', $output );
    276276    }
    277277
Note: See TracChangeset for help on using the changeset viewer.