# panorama/trunk/blocks/image360.php

Panorama – Turn Photos into Immersive Virtual Tours, version trunk. 71 lines.

- Page: https://pluginprobe.com/plugins/panorama/trunk/code/blocks/image360.php
- Raw: https://pluginprobe.com/plugins/panorama/trunk/raw/blocks/image360.php
- Modified: 2026-09-09T06:14:48+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/panorama/trunk/code/blocks/image360.php#L10-L20`.

```php
<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

$bppiv_block = call_user_func( function() use ( $get_value, $bppiv_meta, $bppiv_width, $bppiv_height ) {
    return [
        "blockName" => "panorama/image-360",
        "attrs" => [
            "imageUrl" => $bppiv_meta['image_src_360'] ?? '',
              "panoramaFormat" => $bppiv_meta['panorama_format_360'] ?? 'equirectangular',
              "haov" => (float) ($bppiv_meta['haov_360'] ?? 360),
              "vaov" => (float) ($bppiv_meta['vaov_360'] ?? 180),
              "vOffset" => (float) ($bppiv_meta['voffset_360'] ?? 0),
            "cubeMap" => [
                "front" => $bppiv_meta['cubemap_front_360'] ?? '',
                "right" => $bppiv_meta['cubemap_right_360'] ?? '',
                "back" => $bppiv_meta['cubemap_back_360'] ?? '',
                "left" => $bppiv_meta['cubemap_left_360'] ?? '',
                "up" => $bppiv_meta['cubemap_up_360'] ?? '',
                "down" => $bppiv_meta['cubemap_down_360'] ?? '',
            ],
            "previewImgUrl" => $bppiv_meta['previewImgUrl'] ?? '',
            "loadButtonText" => $bppiv_meta['loadButtonText'] ?? 'Click to Load Panorama',
            "options" => [
                "isRotate" => $get_value('bppiv_auto_rotate', true, true),
                "autoRotateSpeed" => $bppiv_meta['bppiv_speed'] ?? 1,
                "autoRotateInactivityDelay" => $bppiv_meta['auto_rotate_inactivity_delay'] ?? 3000,
                "hideDefaultCtrl" => $get_value('control_show_hide', true),
                "initialView" => $get_value('initial_view', true),
                "initialViewPosition" => [
                    "pitch" => (float)$get_value('initial_view_property', false, 0, 'top'),
                    "yaw" => (float)$get_value('initial_view_property', false, 0, 'right'),
                    "hfov" => (float)$get_value('initial_view_property', false, 0, 'bottom')
                ],
                "autoLoad" => $get_value('bppiv_auto_load', true, true),
                "draggable" => $get_value('draggable_360', true, true),
                "compass" => $get_value('compass_360', true),
                "orientation" => $get_value('orientation_360', true),
                "titleAuthor" => $get_value('title_author', true, true),
                "title" => $bppiv_meta['title_360'] ?? '' ,
                "author" => $bppiv_meta['author_360'] ?? '',
                "mouseZoom" => $get_value('mouse_zoom', true, true) ,
                "disableKeyboardCtrl" =>  $get_value('disable_keyboard_ctrl', true) ,
                "doubleClickZoom" => $get_value('double_click_zoom', true, true) ,
                "isByline" => $get_value('showByPrefix', true, true),
            ],
            "customControl" => $get_value('custom_control', true) ,
            "layout" => [
                "alignSl" => [
                    "desktop" =>$bppiv_meta['bppiv_alignment'] ?? "center",
                    "tablet" => $bppiv_meta['bppiv_alignment'] ?? "center",
                    "mobile" => $bppiv_meta['bppiv_alignment'] ?? "center"
                ],
                "width" => [
                    "desktop" => $bppiv_width,
                    "tablet" => $bppiv_width,
                    "mobile" => $bppiv_width
                ],
                "height" => [
                    "desktop" => $bppiv_height,
                    "tablet" => $bppiv_height,
                    "mobile" => $bppiv_height
                ]
            ]
        ],
        "innerBlocks" => [],
        "innerHTML" => "",
        "innerContent" => []
    ];
} );
```
