/ Published in: PHP
Takes a string of HTML and resizes all of the embed/objects to a specific size. Handy for resizing videos to a specific size.
Expand |
Embed | Plain Text
function resizeEmbeds($html='', $width=400, $height=300) { foreach ($objects as $key => $obj) { $html_block[1] = preg_replace("/height=\"[0-9]+\"/smi", "height=\"" . $height . "\"", $html_block[1]); } } } }
You need to login to post a comment.
