The $url = substr( $url, 0, -5 ); on line 109 was breaking the Google Maps URL, because line 106 did not have & appended to it. So I put that in line 106.
I also changed the elseif on line 89 to allow for other types of Google Maps URLs (this is how the Jetpack plugin does it). We had a user who wanted to embed a custom map, whose URL was formatted like " https://www.google.com/maps/d/embed", and since that didn't meet the condition on line 89, so the plugin had been converting the
The
$url = substr( $url, 0, -5 );
on line 109 was breaking the Google Maps URL, because line 106 did not have&
appended to it. So I put that in line 106.I also changed the elseif on line 89 to allow for other types of Google Maps URLs (this is how the Jetpack plugin does it). We had a user who wanted to embed a custom map, whose URL was formatted like " https://www.google.com/maps/d/embed", and since that didn't meet the condition on line 89, so the plugin had been converting the