There’s always a filter you can use to hook into the output, see embed_oembed_html
. Try this in a custom plugin or child theme’s functions file, it will add any other query strings to the iframe
src
attribute:
add_filter("embed_oembed_html", function( $html, $url, $attr ) {
parse_str(parse_url($url, PHP_URL_QUERY), $url);
if ( $url ) {
foreach ( $url as $q=>$v ) {
preg_match('/src="https://wordpress.stackexchange.com/questions/250140/([^"]+)"https://wordpress.stackexchange.com/", $html, $src);
if ( isset( $src[1] ) ) {
$html = str_replace(
$src[1],
add_query_arg( array( $q=>$v ), $src[1] ),
$html
);
}
}
}
return $html;
}, 10, 3);
Make sure there are no query strings you don’t want to add to the iframe
src
and skip them with a continue;
in the loop.
Hope that helps.