PluginProbe ʕ •ᴥ•ʔ
EmbedPress – PDF Embedder, 3D PDF FlipBook, Google Reviews, YouTube Videos, Upload & Embed PDF documents / 4.1.10
EmbedPress – PDF Embedder, 3D PDF FlipBook, Google Reviews, YouTube Videos, Upload & Embed PDF documents v4.1.10
4.6.5 4.6.4 4.6.3 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 trunk 1.0.0 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.3.0 1.3.1 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.5.0 1.6.0 1.6.1 1.6.2 1.6.3 1.7.0 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 2.0.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.2.0 2.2.1 2.2.2 2.3.0 2.3.1 2.3.2 2.3.3 2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.6.0 2.6.1 2.6.2 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.1.2 3.1.3 3.2.0 3.2.1 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.4.0 3.4.1 3.4.2 3.4.3 3.5.0 3.5.1 3.5.2 3.5.3 3.6.0 3.6.1 3.6.2 3.6.3 3.6.4 3.6.5 3.6.6 3.6.7 3.6.8 3.7.0 3.7.1 3.7.2 3.7.3 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.9.0 3.9.1 3.9.10 3.9.11 3.9.12 3.9.13 3.9.14 3.9.15 3.9.16 3.9.17 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 3.9.7 3.9.8 3.9.9 4.0.0 4.0.1 4.0.10 4.0.11 4.0.12 4.0.13 4.0.14 4.0.2 4.0.3 4.0.4 4.0.5 4.0.6 4.0.7 4.0.8 4.0.9 4.1.0 4.1.1 4.1.10 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.1.8 4.1.9 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.2.7 4.2.8 4.2.9 4.3.0 4.3.1 4.4.0 4.4.1 4.4.10 4.4.11 4.4.2 4.4.3 4.4.4 4.4.5 4.4.6 4.4.7 4.4.8 4.4.9 4.5.0 4.5.1
embedpress / Gutenberg / block-backend / block-embedpress.php
embedpress / Gutenberg / block-backend Last commit date
block-embedpress.php 1 year ago block-wistia.php 2 years ago block-youtube.php 2 years ago
block-embedpress.php
548 lines
1 <?php
2
3 use EmbedPress\Includes\Classes\Helper;
4
5 // Exit if accessed directly.
6 if (!defined('ABSPATH')) {
7 exit;
8 }
9 /**
10 * It renders gutenberg block of embedpress on the frontend
11 * @param array $attributes
12 */
13
14 if(!function_exists('lock_content_form_handler')){
15 add_action('wp_ajax_lock_content_form_handler', 'lock_content_form_handler');
16 add_action('wp_ajax_nopriv_lock_content_form_handler', 'lock_content_form_handler');
17
18 function lock_content_form_handler() {
19 // print_r($embedHTML);
20
21 $client_id = isset($_POST['client_id']) ? sanitize_text_field($_POST['client_id']) : '';
22 $password = isset($_POST['password']) ? sanitize_text_field($_POST['password']) : '';
23 $post_id = isset($_POST['post_id']) ? absint($_POST['post_id']) : 0;
24
25 $epbase64 = get_post_meta( $post_id, 'ep_base_' .$client_id, true );
26 $hash_key = get_post_meta( $post_id, 'hash_key_' .$client_id, true );
27
28 // Set the decryption key and initialization vector (IV)
29 $key = Helper::get_hash();
30
31 // Decode the base64 encoded cipher
32 $cipher = base64_decode($epbase64);
33 // Decrypt the cipher using AES-128-CBC encryption
34
35 $wp_pass_key = hash('sha256', wp_salt(32) . md5($password));
36 $iv = substr($wp_pass_key, 0, 16);
37
38 if ($wp_pass_key === $hash_key) {
39 setcookie("password_correct_", $password, time()+3600);
40
41 $embed = openssl_decrypt($cipher, 'AES-128-CBC', $key, OPENSSL_RAW_DATA, $iv) . '<script>
42 var now = new Date();
43 var time = now.getTime();
44 var expireTime = time + 1000 * 60 * 60 * 24 * 30;
45 now.setTime(expireTime);
46 document.cookie = "password_correct_'.esc_js($client_id).'='.esc_js($hash_key).'; expires=" + now.toUTCString() + "; path=/";
47 </script>';
48
49 }
50 else{
51 $embed = 0;
52 }
53
54 // Process the form data and return a response
55 $response = array(
56 'success' => true,
57 'password' => $password,
58 'embedHtml' => $embed,
59 'post_id' => $post_id
60 );
61
62 wp_send_json($response);
63
64 }
65 }
66
67 if (!function_exists('has_content_allowed_roles')) {
68 function has_content_allowed_roles($allowed_roles = []) {
69 if ((count($allowed_roles) === 1 && empty($allowed_roles[0]))) {
70 return true;
71 }
72
73 $current_user = wp_get_current_user();
74 $user_roles = $current_user->roles;
75
76 return !empty(array_intersect($user_roles, $allowed_roles));
77 }
78 }
79
80 function embedpress_block_scripts($attributes) {
81
82 $script_handles = [];
83
84 if(!empty($attributes['customPlayer'])){
85 $script_handles[] = 'plyr.polyfilled';
86 $script_handles[] = 'initplyr';
87 $script_handles[] = 'vimeo-player';
88 }
89
90 $script_handles[] = 'embedpress-google-photos-album';
91 $script_handles[] = 'embedpress-front';
92
93 if(!empty($attributes['adManager'])){
94 $script_handles[] = 'embedpress-ads';
95 }
96
97 if((!empty($attributes['instaLayout']) && $attributes['instaLayout'] == 'insta-carousel') || (!empty($attributes['ytChannelLayout']) && $attributes['ytChannelLayout'] == 'carousel')){
98 $script_handles[] = 'cg-carousel';
99 }
100
101 foreach ($script_handles as $handle) {
102 wp_enqueue_script($handle);
103 }
104
105 $style_handles = [];
106
107 if(!empty($attributes['customPlayer'])){
108 $style_handles[] = 'plyr';
109 }
110
111 if((!empty($attributes['instaLayout']) && $attributes['instaLayout'] == 'insta-carousel') || (!empty($attributes['ytChannelLayout']) && $attributes['ytChannelLayout'] == 'carousel')){
112 $style_handles[] = 'cg-carousel';
113 }
114
115 $style_handles[] = 'embedpress_blocks-cgb-style-css';
116 $style_handles[] = 'embedpress-style';
117
118 foreach ($style_handles as $handle) {
119 wp_enqueue_style($handle);
120 }
121 }
122
123 function embedpress_render_block($attributes)
124 {
125
126 embedpress_block_scripts($attributes);
127
128
129 $client_id = !empty($attributes['clientId']) ? md5($attributes['clientId']) : '';
130 $block_id = !empty($attributes['clientId']) ? $attributes['clientId'] : '';
131 $custom_player = !empty($attributes['customPlayer']) ? $attributes['customPlayer'] : 0;
132 $instaLayout = !empty($attributes['instaLayout']) ? ' '.$attributes['instaLayout'] : ' insta-grid';
133
134 $_carousel_options = '';
135 $_carousel_id = '';
136 if(!empty($attributes['instaLayout']) && $attributes['instaLayout'] === 'insta-carousel'){
137 $_carousel_id = 'data-carouselid=' . esc_attr($client_id) . '';
138
139 $layout = $attributes['instaLayout'];
140 $slidesShow = !empty($attributes['slidesShow']) ? $attributes['slidesShow'] : 5;
141 $carouselAutoplay = !empty($attributes['carouselAutoplay']) ? $attributes['carouselAutoplay'] : 0;
142 $autoplaySpeed = !empty($attributes['autoplaySpeed']) ? $attributes['autoplaySpeed'] : 3000;
143 $transitionSpeed = !empty($attributes['transitionSpeed']) ? $attributes['transitionSpeed'] : 1000;
144 $carouselLoop = !empty($attributes['carouselLoop']) ? $attributes['carouselLoop'] : 0;
145 $carouselArrows = !empty($attributes['carouselArrows']) ? $attributes['carouselArrows'] : 0;
146 $spacing = !empty($attributes['carouselSpacing']) ? $attributes['carouselSpacing'] : 0;
147
148 // print_r($attributes);
149
150 $carousel_options = [
151 'layout' => $layout,
152 'slideshow' => $slidesShow,
153 'autoplay' => $carouselAutoplay,
154 'autoplayspeed' => $autoplaySpeed,
155 'transitionspeed' => $transitionSpeed,
156 'loop' => $carouselLoop,
157 'arrows' => $carouselArrows,
158 'spacing' => $spacing
159 ];
160
161 $carousel_options_string = json_encode($carousel_options);
162 $_carousel_options = 'data-carousel-options='. htmlentities($carousel_options_string, ENT_QUOTES) .'';
163 }
164
165 $cEmbedType = !empty($attributes['cEmbedType']) ? ' '.$attributes['cEmbedType'] : '';
166
167 $_custom_player = '';
168 $_player_options = '';
169
170 if (!empty($custom_player)) {
171
172 $is_self_hosted = Helper::check_media_format($attributes['url']);
173
174 $_custom_player = 'data-playerid=' . esc_attr($client_id);
175 $player_preset = !empty($attributes['playerPreset']) ? $attributes['playerPreset'] : 'preset-default';
176 $player_color = !empty($attributes['playerColor']) ? $attributes['playerColor'] : '';
177 $poster_thumbnail = !empty($attributes['posterThumbnail']) ? $attributes['posterThumbnail'] : '';
178 $player_pip = !empty($attributes['playerPip']) ? true : false;
179 $player_restart = !empty($attributes['playerRestart']) ? true : false;
180 $player_rewind = !empty($attributes['playerRewind']) ? true : false;
181 $player_fastForward = !empty($attributes['playerFastForward']) ? true : false;
182 $player_tooltip = !empty($attributes['playerTooltip']) ? true : false;
183 $player_hide_controls = !empty($attributes['playerHideControls']) ? true : false;
184 $player_download = !empty($attributes['playerDownload']) ? true : false;
185
186 $playerOptions = [
187 'rewind' => $player_rewind,
188 'restart' => $player_restart,
189 'pip' => $player_pip,
190 'poster_thumbnail' => $poster_thumbnail,
191 'player_color' => $player_color,
192 'player_preset' => $player_preset,
193 'fast_forward' => $player_fastForward,
194 'player_tooltip' => $player_tooltip,
195 'hide_controls' => $player_hide_controls,
196 'download' => $player_download,
197 ];
198
199 if(!empty($attributes['fullscreen'])){
200 $playerOptions['fullscreen'] = $attributes['fullscreen'];
201 }
202
203 if(!empty($is_self_hosted['selhosted'])){
204 $playerOptions['self_hosted'] = $is_self_hosted['selhosted'];
205 $playerOptions['hosted_format'] = $is_self_hosted['format'];
206 }
207
208 //Youtube options
209 if(!empty($attributes['starttime'])){
210 $playerOptions['start'] = $attributes['starttime'];
211 }
212 if(!empty($attributes['endtime'])){
213 $playerOptions['end'] = $attributes['endtime'];
214 }
215 if(!empty($attributes['relatedvideos'])){
216 $playerOptions['rel'] = $attributes['relatedvideos'];
217 }
218
219 //vimeo options
220 if(!empty($attributes['vstarttime'])){
221 $playerOptions['t'] = $attributes['vstarttime'];
222 }
223 if(!empty($attributes['vautoplay'])){
224 $playerOptions['vautoplay'] = $attributes['vautoplay'];
225 }
226 if(!empty($attributes['vautopause'])){
227 $playerOptions['autopause'] = $attributes['vautopause'];
228 }
229 if(!empty($attributes['vdnt'])){
230 $playerOptions['dnt'] = $attributes['vdnt'];
231 }
232
233 $playerOptionsString = json_encode($playerOptions);
234 $_player_options = 'data-options='. htmlentities($playerOptionsString, ENT_QUOTES);
235 }
236
237 $pass_hash_key = isset($attributes['contentPassword']) ? md5($attributes['contentPassword']): '';
238
239
240
241 if (!empty($attributes['embedHTML'])) {
242 $embed = apply_filters('embedpress_gutenberg_embed', $attributes['embedHTML'], $attributes);
243
244 $content_share_class = '';
245 $share_position_class = '';
246 $share_position = isset($attributes['sharePosition']) ? $attributes['sharePosition'] : 'right';
247
248 if(!empty($attributes['contentShare'])) {
249 $content_share_class = 'ep-content-share-enabled';
250 $share_position_class = 'ep-share-position-'.$share_position;
251 }
252
253 $password_correct = isset($_COOKIE['password_correct_'.$client_id]) ? $_COOKIE['password_correct_'.$client_id] : '';
254 $hash_pass = hash('sha256', wp_salt(32) . md5(isset($attributes['contentPassword']) ? $attributes['contentPassword'] : ''));
255
256 $content_protection_class = 'ep-content-protection-enabled';
257 if(empty($attributes['lockContent']) || empty($attributes['contentPassword']) || $hash_pass === $password_correct) {
258 $content_protection_class = 'ep-content-protection-disabled';
259 }
260
261 $aligns = [
262 'left' => 'alignleft',
263 'right' => 'alignright',
264 'wide' => 'alignwide',
265 'full' => 'alignfull',
266 'center' => 'aligncenter',
267 ];
268 if (isset($attributes['align'])) {
269 $alignment = isset($aligns[$attributes['align']]) ? $aligns[$attributes['align']] . ' clear' : '';
270 } else {
271 $alignment = 'aligncenter'; // default alignment is center in js, so keeping same here
272 }
273 $embed = Helper::customLogo($embed, $attributes);
274 $url = !empty($attributes['href']) ? $attributes['href'] : '';
275
276 $adsAtts = '';
277
278 if(!empty($attributes['adManager'])) {
279 $ad = base64_encode(json_encode($attributes));
280 $adsAtts = "data-sponsored-id=$client_id data-sponsored-attrs=$ad class=sponsored-mask";
281 }
282
283 $hosted_format = '';
284 if (!empty($custom_player)) {
285 $self_hosted = Helper::check_media_format($attributes['url']);
286 $hosted_format = isset($self_hosted['format']) ? $self_hosted['format'] : '';
287 }
288
289 $yt_channel_class = '';
290 if(Helper::is_youtube_channel($attributes['url'])){
291 $yt_channel_class = 'embedded-youtube-channel';
292 }
293
294 $autoPause = '';
295 if(!empty($attributes['autoPause'])){
296 $autoPause = ' enabled-auto-pause';
297 }
298
299 ob_start();
300 ?>
301 <div class="embedpress-gutenberg-wrapper <?php echo esc_attr( $alignment.' '.$content_share_class.' '.$share_position_class.' '.$content_protection_class); echo esc_attr( $cEmbedType ); ?>" id="<?php echo esc_attr($block_id); ?>">
302 <?php
303 $share_position = isset($attributes['sharePosition']) ? $attributes['sharePosition'] : 'right';
304 $custom_thumbnail = isset($attributes['customThumbnail']) ? $attributes['customThumbnail'] : '';
305 ?>
306 <div class="wp-block-embed__wrapper <?php if(!empty($attributes['contentShare'])) echo esc_attr( 'position-'.$share_position.'-wraper'); ?> <?php if($attributes['videosize'] == 'responsive') echo esc_attr( 'ep-video-responsive' ); ?>">
307 <div id="ep-gutenberg-content-<?php echo esc_attr( $client_id )?>" class="ep-gutenberg-content<?php echo esc_attr($autoPause); ?>">
308 <div
309 <?php echo esc_attr( $adsAtts ); ?> >
310 <div class="ep-embed-content-wraper <?php
311 if (!empty($custom_player)) {
312 echo esc_attr($player_preset);
313 }
314 echo esc_attr($instaLayout);
315 ?> <?php echo esc_attr($hosted_format); ?> <?php echo esc_attr($yt_channel_class); ?>"
316 <?php echo esc_attr($_custom_player); ?>
317 <?php echo esc_attr($_player_options); ?>
318 <?php echo esc_attr( $_carousel_id ); ?>
319 <?php echo esc_attr($_carousel_options); ?>
320 >
321 <?php
322 $hash_pass = hash('sha256', wp_salt(32) . md5($attributes['contentPassword']));
323 $password_correct = isset($_COOKIE['password_correct_'.$client_id]) ? $_COOKIE['password_correct_'.$client_id] : '';
324 if(
325 !apply_filters('embedpress/is_allow_rander', false) ||
326 empty($attributes['lockContent']) ||
327 ($attributes['protectionType'] == 'password' && empty($attributes['contentPassword'])) ||
328 ($attributes['protectionType'] == 'password' && (!empty(Helper::is_password_correct($client_id))) && ($hash_pass === $password_correct)) ||
329 ($attributes['protectionType'] == 'user-role' && has_content_allowed_roles($attributes['userRole']))
330 ){
331
332 if(!empty($attributes['contentShare'])) {
333 $content_id = $attributes['clientId'];
334 $embed .= Helper::embed_content_share($content_id, $attributes);
335 }
336 echo $embed;
337 } else {
338 if(!empty($attributes['contentShare'])) {
339 $content_id = $attributes['clientId'];
340 $embed .= Helper::embed_content_share($content_id, $attributes);
341 }
342
343 if ($attributes['protectionType'] == 'password') {
344 do_action('embedpress/display_password_form', $client_id, $embed, $pass_hash_key, $attributes);
345 } else {
346 do_action('embedpress/content_protection_content', $client_id, $attributes['protectionMessage'], $attributes['userRole']);
347 }
348
349 }
350 ?>
351 </div>
352 <?php
353 if(!empty($attributes['adManager'])) {
354 $embed = apply_filters('embedpress/generate_ad_template', $embed, $client_id, $attributes, 'gutenberg');
355
356 }
357 ?>
358 </div>
359 </div>
360 </div>
361 </div>
362 <?php
363
364 echo embedpress_render_block_style($attributes);
365
366
367 return ob_get_clean();
368
369
370 }
371 }
372
373 /**
374 * Make style function for embedpress render block
375 */
376
377 function embedpress_render_block_style($attributes)
378 {
379 $uniqid = !empty($attributes['url']) ? '.ose-uid-' . md5($attributes['url']) : '';
380 $client_id = !empty($attributes['clientId']) ? $attributes['clientId'] : '';
381
382 $custom_player = !empty($attributes['customPlayer']) ? $attributes['customPlayer'] : 0;
383 $player_color = !empty($attributes['playerColor']) ? $attributes['playerColor'] : '';
384 $player_pip = !empty($attributes['playerPip']) ? 'block' : 'none';
385 $logoX = !empty($attributes['logoX']) ? $attributes['logoX'] : 5;
386 $logoY = !empty($attributes['logoY']) ? $attributes['logoY'] : 10;
387 $logoOpacity = !empty($attributes['logoOpacity']) ? $attributes['logoOpacity'] : '1';
388 $player_pip = !empty($attributes['playerPip']) ? 'block' : 'none';
389
390 $playerStyle = '';
391
392 if (!empty($custom_player)) {
393 $playerStyle = '
394 [data-playerid="' . md5($client_id). '"] {
395 --plyr-color-main: ' . ($player_color && strlen($player_color) === 7
396 ? 'rgba(' . hexdec(substr($player_color, 1, 2)) . ', ' . hexdec(substr($player_color, 3, 2)) . ', ' . hexdec(substr($player_color, 5, 2)) . ', .8)!important;'
397 : 'rgba(0, 0, 0, .8)!important;'
398 ) . ';
399 }
400 [data-playerid="' . md5($client_id). '"].custom-player-preset-3, [data-playerid="' . md5($client_id). '"].custom-player-preset-4 {
401 --plyr-color-main: ' . ($player_color && strlen($player_color) === 7
402 ? 'rgb(' . hexdec(substr($player_color, 1, 2)) . ', ' . hexdec(substr($player_color, 3, 2)) . ', ' . hexdec(substr($player_color, 5, 2)) . ')!important;'
403 : 'rgba(0, 0, 0, .8)!important;'
404 ) . ';
405 }
406 [data-playerid="' . md5($client_id). '"] [data-plyr="pip"] {
407 display: '.$player_pip.';
408 }
409
410 [data-playerid="' . md5($client_id). '"] .plyr{
411 width: ' . esc_attr($attributes['width']) . 'px !important;
412 height: ' . esc_attr($attributes['height']) . 'px!important;
413 max-height: ' . esc_attr($attributes['height']) . 'px!important;
414 }
415 ';
416 }
417
418
419 $_iscustomlogo = '';
420
421 $youtubeStyles = '';
422
423 if(!empty($attributes['customlogo'])){
424 $_iscustomlogo = $uniqid.' img.watermark.ep-custom-logo {
425 display: block !important;
426 }
427
428
429 #ep-gutenberg-content-'. md5($client_id).' img.watermark {
430 border: 0;
431 position: absolute;
432 bottom: '.esc_attr($logoY).'%;
433 right: '.esc_attr($logoX).'%;
434 max-width: 150px;
435 max-height: 75px;
436 -o-transition: opacity 0.5s ease-in-out;
437 -moz-transition: opacity 0.5s ease-in-out;
438 -webkit-transition: opacity 0.5s ease-in-out;
439 transition: opacity 0.5s ease-in-out;
440 z-index:1;
441 opacity: '.esc_attr($logoOpacity).';
442 }
443 #ep-gutenberg-content-'. md5($client_id).' img.watermark:hover {
444 opacity: 1;
445 }
446 ';
447 }
448 $youtubeStyles = '<style>
449 .ose-youtube' . esc_attr($uniqid) . ' {
450 width: ' . esc_attr($attributes['width']) . 'px !important;
451 height: ' . esc_attr($attributes['height']) . 'px!important;
452 max-height: ' . esc_attr($attributes['height']) . 'px !important;
453 max-width: 100%;
454 }
455
456 .ose-youtube' . esc_attr($uniqid) . '>iframe {
457 height: ' . esc_attr($attributes['height']) . 'px !important;
458 max-height: ' . esc_attr($attributes['height']) . 'px !important;
459 width: 100%;
460 position: relative !important;
461 }
462
463
464 ' . esc_attr($uniqid) . ' .wistia_embed {
465 max-width: 100%;
466 }
467
468 .alignright .ose-wistia' . esc_attr($uniqid) .'{
469 margin-left: auto;
470 }
471 .alignleft .ose-wistia' . esc_attr($uniqid) .'{
472 margin-right: auto;
473 }
474 .aligncenter .ose-wistia' . esc_attr($uniqid) .'{
475 margin: auto;
476 }
477 '.$uniqid.' img.watermark{
478 display: none;
479 }
480 '.$_iscustomlogo.'
481 '.$playerStyle.'
482
483
484
485 </style>';
486
487 if($attributes['videosize'] == 'responsive') {
488
489 $width = isset($attributes['width']) ? $attributes['width'] : 600;
490 $height = $width * (9/16);
491
492
493 $youtubeStyles = '<style>
494 .ose-youtube' . esc_attr($uniqid) . ' {
495 position: relative;
496 width: ' . esc_attr($attributes['width']) . 'px !important;
497 height: ' . esc_attr($height) . 'px !important;
498 max-width: 100%;
499 }
500
501 .ose-wistia{
502 height: auto !important;
503 padding-top: 0;
504 }
505
506 .ose-youtube' . esc_attr($uniqid) . ' > iframe {
507 width: 100%;
508 height: 100%;
509 max-height:100%;
510 }
511
512 .ep-video-responsive{
513 display: inline-block!important;
514 max-width: 100%;
515 }
516 '.$uniqid.' img.watermark{
517 display: none;
518 }
519 '.$_iscustomlogo.'
520 '.$playerStyle.'
521
522 </style>';
523 }
524
525 $youtubeStyles .= '<style>
526 .ose-matterport' . esc_attr($uniqid) . ' {
527 position: relative;
528 width: ' . esc_attr($attributes['width']) . 'px !important;
529 height: ' . esc_attr($attributes['height']) . 'px !important;
530 max-width: 100%;
531 }
532 .ose-giphy' . esc_attr($uniqid) . ' img{
533 position: relative;
534 width: ' . esc_attr($attributes['width']) . 'px !important;
535 height: ' . esc_attr($attributes['height']) . 'px !important;
536 max-width: 100%;
537 }
538
539
540
541 </style>';
542
543
544
545 return $youtubeStyles;
546 }
547 ?>
548