我在functions.php中使用以下代码来调整我的IFRAMES
function add_youtube_size($youtubehtml) {
   if (strpos($youtubehtml, "<iframe" ) !== false) {
        $youtubesearch = array( 'width="460"', 'height="310"');
        $youtubereplace = array( 'width="600"', 'height="338"');
        $youtubehtml = str_replace($youtubesearch, $youtubereplace, $youtubehtml);
        return $youtubehtml;
   } else {
        return $youtubehtml;
   }
}
add_filter('the_content', 'add_youtube_size', 10);
但此代码仅编辑 460 x 310 的 iframe 的大小。
有什么办法可以改变那条线$youtube search = array( 'width="460"', 'height="310"');以获得任何可能的尺寸?