Currently I have many many posts and pages in a WordPress database many of which have iframes on them. The Iframe width
and height
are different for almost all of them. I want them to be uniform. They currently look like this:
[tab:Just A short code]
<iframe width="560" height="315" src="https://www.youtube.com/embed/aD4grQXZPfg" frameborder="0" allowfullscreen></iframe>
[tab:Another shortcode]
<IFRAME SRC="http://some-other-video-host.com/embed-ksq9vn3gwc16.html" FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=NO WIDTH=250 HEIGHT=180></IFRAME>
So the iframes are on the pages in different ways such as the width and height being before the src and on some posts/pages it being after the src. Also it may vary in case as you can see on the second iframe width, height etc are in capitals. I want to go through all the posts and change height to 600 and width to 360.
The result output would look like this:
[tab:Just A short code]
<iframe width="600" height="360" src="https://www.youtube.com/embed/aD4grQXZPfg" frameborder="0" allowfullscreen></iframe>
[tab:Another shortcode]
<IFRAME SRC="http://some-other-video-host.com/embed-ksq9vn3gwc16.html" FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=NO WIDTH=600 HEIGHT=360></IFRAME>
Additional information:
I don't use iframes in the database for anything else so this might simplify the regex that I'm blindly assuming is needed to perform the query.
Any help or suggestions are warmly appreciated.