PluginProbe
Panorama – Turn Photos into Immersive Virtual Tours / trunk
Panorama – Turn Photos into Immersive Virtual Tours vtrunk
1.8.0 1.7.4 1.7.3 1.7.2 1.7.1 1.7.0 1.6.1 trunk 1.0.0 1.0.1 1.0.10 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.1.3 1.1.4 1.1.5 1.1.6 1.2.0 1.2.1 1.2.2 1.2.3 1.3.0 All 38 releases
panorama / blocks / image.php

image.php in Panorama – Turn Photos into Immersive Virtual Tours trunk, at blocks/image.php

54 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit;
4 }
5
6 $bppiv_block = call_user_func( function() use ( $get_value, $bppiv_meta, $bppiv_width, $bppiv_height ) {
7 return [
8 "blockName" => "panorama/image-3d",
9 "attrs" => [
10 "imageUrl" => $get_value('bppiv_image_src', false, 0, 'url'),
11 "options" => [
12 "autoRotate" => $get_value('bppiv_auto_rotate', true, true),
13 "autoRotateSpeed" => $bppiv_meta['bppiv_speed'] ?? 1,
14 "autoRotateInactivityDelay" => $bppiv_meta['auto_rotate_inactivity_delay'] ?? 3000,
15 "hideDefaultCtrl" => $get_value('control_show_hide', true),
16 "initialView" => $get_value('initial_view', true),
17 "initialPosition" => [
18 "x" => (float)$get_value('initial_view_image_property', false, 0, 'top'),
19 "y" => (float)$get_value('initial_view_image_property', false, 0, 'right'),
20 "z" => (float)$get_value('initial_view_image_property', false, 0, 'bottom')
21 ],
22 "isDeviceMotion" => $get_value('is_motion_button', true)
23 ],
24 "layout" => [
25 "alignSl" => [
26 "desktop" =>$bppiv_meta['bppiv_alignment'] ?? "center",
27 "tablet" => $bppiv_meta['bppiv_alignment'] ?? "center",
28 "mobile" => $bppiv_meta['bppiv_alignment'] ?? "center"
29 ],
30 "width" => [
31 "desktop" => $bppiv_width,
32 "tablet" => $bppiv_width,
33 "mobile" => $bppiv_width
34 ],
35 "height" => [
36 "desktop" => $bppiv_height,
37 "tablet" => $bppiv_height,
38 "mobile" => $bppiv_height
39 ],
40 "buttonColors" => [
41 "color" => $bppiv_meta['motion_button_text_color'] ?? '',
42 "bg" => $bppiv_meta['motion_button_btn_bg'] ?? ''
43 ],
44 "buttonHoverColors" => [
45 "color" => $bppiv_meta['hover_motion_button_text_color'] ?? '',
46 "bg" => $bppiv_meta['hover_motion_button_btn_bg'] ?? ''
47 ]
48 ]
49 ],
50 "innerBlocks" => [],
51 "innerHTML" => "",
52 "innerContent" => []
53 ];
54 } );