PluginProbe
WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress / 8.5.75
WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress v8.5.75
9.1.2 9.1.1 9.1.0 9.0.3 9.0.2 9.0.1 9.0.0 8.5.79 8.5.78 8.5.77 8.5.76 8.5.75 8.5.74 8.5.73 8.5.72 8.5.71 8.5.70 8.5.69 8.5.68 8.5.35 8.5.36 8.5.37 8.5.38 8.5.39 8.5.4 All 221 releases
wpvr / admin / classes / class-wpvr-streetview.php

class-wpvr-streetview.php in WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress 8.5.75, at admin/classes/class-wpvr-streetview.php

53 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (!defined('ABSPATH')) exit; // Exit if accessed directly
3 /**
4 * Responsible for managing streetview content on Setup metabox
5 *
6 * @link http://rextheme.com/
7 * @since 8.0.0
8 *
9 * @package Wpvr
10 * @subpackage Wpvr/admin/classes
11 */
12
13 class WPVR_StreetView {
14
15 /**
16 * Instance of WPVR_Validator class
17 *
18 * @var object
19 * @since 8.0.0
20 */
21 protected $validator;
22
23 function __construct()
24 {
25 $this->validator = new WPVR_Validator();
26 }
27
28
29 /**
30 * Render shortcode while post has streetview data
31 *
32 * @param array $postdata
33 *
34 * @return array
35 * @since 8.0.0
36 */
37 public function render_streetview_shortcode($postdata, $width, $height)
38 {
39 if (empty($width)) {
40 $width = '600px';
41 }
42 if (empty($height)) {
43 $height = '400px';
44 }
45 $streetviewurl = $postdata['streetviewurl'];
46 $html = '';
47 $html .= '<div class="vr-streetview" style="text-align: center; max-width:100%; width:'.$width.'; height:'.$height.'; margin: 0 auto;">';
48 $html .= '<iframe src="'.$streetviewurl.'" frameborder="0" style="border:0; width:100px; height:100%;" allowfullscreen=""></iframe>';
49 $html .= '</div>';
50 return $html;
51 }
52
53 }