← All changes
|
includes/elementor-widgets/property-embedded-virtual-tours.php
+4
-2
2.2.3
→
2.4.0
View file →
| @@ -127,8 +127,9 @@ | ||
| 127 | 127 | { |
| 128 | 128 | if ( isset($settings['oembed']) && $settings['oembed'] == 'yes' ) |
| 129 | 129 | { |
| 130 | 130 | $embed_code = wp_oembed_get($virtual_tour['url']); |
| 131 | + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- wp_oembed_get() uses WordPress provider trust and sanitization; preserve supported provider scripts and trusted PHP filters. | |
| 131 | 132 | echo $embed_code; |
| 132 | 133 | } |
| 133 | 134 | else |
| 134 | 135 | { |
| @@ -133,13 +134,14 @@ | ||
| 133 | 134 | else |
| 134 | 135 | { |
| 135 | 136 | if ( strpos($virtual_tour['url'], 'instagram.com/reel') !== false ) |
| 136 | 137 | { |
| 138 | + // phpcs:ignore PluginCheck.CodeAnalysis.EnqueuedResourceOffloading.OffloadedContent, WordPress.WP.EnqueuedResourceParameters.MissingVersion -- Provider maintains this API endpoint without a plugin version. Required Instagram SDK for the property's configured Reel embed. | |
| 139 | + wp_enqueue_script( 'propertyhive-instagram-embed', 'https://www.instagram.com/embed.js', array(), null, true ); | |
| 137 | 140 | echo ' |
| 138 | 141 | <blockquote class="instagram-media" |
| 139 | 142 | data-instgrm-permalink="' . esc_url($virtual_tour['url']) . '" |
| 140 | 143 | data-instgrm-version="14"></blockquote> |
| 141 | - <script async src="https://www.instagram.com/embed.js"></script> | |
| 142 | 144 | '; |
| 143 | 145 | } |
| 144 | 146 | else |
| 145 | 147 | { |
| @@ -170,5 +172,5 @@ | ||
| 170 | 172 | } |
| 171 | 173 | |
| 172 | 174 | } |
| 173 | 175 | |
| 174 | -} | |
| 176 | +} | |