wp-includes/widgets/class-wp-widget-media-video.php:157Inject max-width and remove height for videos too constrained to fit inside sidebars on frontend.
$htmlstringstring public function inject_video_max_width_style( $html ) { $html = preg_replace( '/\sheight="\d+"/', '', $html ); $html = preg_replace( '/\swidth="\d+"/', '', $html ); $html = preg_replace( '/(?<=width:)\s*\d+px(?=;?)/', '100%', $html ); return $html; }Introduced in 4.8.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/widgets/class-wp-widget-media-video.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.