Skip to content

Commit dd5bf9e

Browse files
committed
fix: bug, google maps not displaying on front end.
1 parent 8605727 commit dd5bf9e

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

inc/class-sqc-googlemaps-embed.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ class SQC_GoogleMaps_Embed extends SQC_Embed {
2525
'replaceRegex' => '', // not needed, custom process
2626
'replacePre' => '',
2727
'replacePost' => '',
28-
'custom_js' => "sqcGoogleMapsProcess = function( pastedData ) {
29-
const iframeOpen = /(?:&lt;|<)iframe/;
30-
const iframeClose = /(?:&gt;&lt;|><)\/iframe(?:&gt;|>)/;
31-
newText = pastedData.replace( iframeOpen, '[sqc-gmaps ' );
28+
'custom_js' => "sqcGoogleMapsProcess = function( pastedData ) {
29+
const iframeOpen = /(?:&lt;|<)iframe/;
30+
const iframeClose = /(?:&gt;&lt;|><)\/iframe(?:&gt;|>)/;
31+
newText = pastedData.replace( iframeOpen, '[sqc-gmaps ' );
3232
console.log( 'newText', newText );
33-
newText = newText.replace( iframeClose, ']' );
34-
return newText;
33+
newText = newText.replace( iframeClose, ']' );
34+
return newText;
3535
};",
3636
);
3737

@@ -58,7 +58,7 @@ public function create_iframe( $attr ) {
5858
'src' // accepts single att
5959
);
6060

61-
if ( ! $src ) :
61+
if ( ! $attr['src'] ) :
6262
return false;
6363
endif;
6464

0 commit comments

Comments
 (0)