# wpvr/8.5.4/admin/classes/class-wpvr-streetview.php

WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress, version 8.5.4. 53 lines.

- Page: https://pluginprobe.com/plugins/wpvr/8.5.4/code/admin/classes/class-wpvr-streetview.php
- Raw: https://pluginprobe.com/plugins/wpvr/8.5.4/raw/admin/classes/class-wpvr-streetview.php
- Modified: 2022-06-15T10:20:54+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/wpvr/8.5.4/code/admin/classes/class-wpvr-streetview.php#L10-L20`.

```php
<?php
if (!defined('ABSPATH')) exit; // Exit if accessed directly
/**
 * Responsible for managing streetview content on Setup metabox
 *
 * @link       http://rextheme.com/
 * @since      8.0.0
 *
 * @package    Wpvr
 * @subpackage Wpvr/admin/classes
 */

class WPVR_StreetView {

    /**
     * Instance of WPVR_Validator class
     * 
     * @var object
     * @since 8.0.0
     */
    protected $validator;

    function __construct()
    {
        $this->validator = new WPVR_Validator();
    }


    /**
     * Render shortcode while post has streetview data
     * 
     * @param array $postdata
     * 
     * @return array 
     * @since 8.0.0
     */
    public function render_streetview_shortcode($postdata, $width, $height)
    {
      if (empty($width)) {
        $width = '600px';
      }
      if (empty($height)) {
          $height = '400px';
      }
      $streetviewurl = $postdata['streetviewurl'];
      $html = '';
      $html .= '<div class="vr-streetview" style="text-align: center; max-width:100%; width:'.$width.'; height:'.$height.'; margin: 0 auto;">';
      $html .= '<iframe src="'.$streetviewurl.'" frameborder="0" style="border:0; width:100px; height:100%;" allowfullscreen=""></iframe>';
      $html .= '</div>';
      return $html;
    }

}
```
