null, 'autoLoad' => 1, 'hfov' => null, 'maxHfov' => null, 'minHfov' => null, 'showControls' => 1, 'customcontrol' => null, 'preview' => null, 'defaultscene' => null, 'scenefadeduration' => null, 'panodata' => array( 'scene-list' => array( array( 'scene-id' => null, 'scene-type' => 'equirectangular', 'hotspot-list' => array( array( 'hotspot-title' => null, 'hotspot-pitch' => null, 'hotspot-yaw' => null, 'hotspot-customclass' => null, 'hotspot-scene' => null, 'hotspot-url' => null, 'hotspot-content' => null, 'hotspot-hover' => null, 'hotspot-type' => 'info', 'hotspot-scene-list' => 'none', 'wpvr_url_open' => array( 0 => 'off' ) ), ), 'dscene' => 'off', 'scene-attachment-url' => null, ), ), ), 'previewtext' => 'Click To Load Panorama', ); return apply_filters( 'extend_primary_meta_fields', $meta_fields ); } /** * Initialise Tab Navigation Items * @return array * @since 8.0.0 */ public static function get_navigation_fields() { $fields = array( array( 'class' => 'scene', 'screen' => 'scene', 'href' => 'scenes', 'r_src' => 'admin/icon/scenes-regular.png', 'h_src' => 'admin/icon/scenes-hover.png', 'title' => __('Scenes','wpvr'), 'active' => 'active' ), array( 'class' => 'hotspot', 'screen' => 'hotspot', 'href' => 'scenes', 'r_src' => 'admin/icon/hotspot-regular.png', 'h_src' => 'admin/icon/hotspot-hover.png', 'title' => __('Hotspot','wpvr'), 'active' => '' ), array( 'class' => 'general', 'screen' => 'general', 'href' => 'general', 'r_src' => 'admin/icon/general-regular.png', 'h_src' => 'admin/icon/general-hover.png', 'title' => __('Settings','wpvr'), 'active' => '' ), array( 'class' => 'videos', 'screen' => 'video', 'href' => 'video', 'r_src' => 'admin/icon/video-regular.png', 'h_src' => 'admin/icon/video-hover.png', 'title' => __('Video','wpvr'), 'active' => '' ), ); return apply_filters( 'extend_rex_pano_nav_menu', $fields ); } /** * Initialise Basic Setting Left Field * @param mixed $preview * @param mixed $previewtext * @param mixed $autoload * @param mixed $control * * @return array * @since 8.0.0 */ public static function get_basic_setting_left_fields($postdata) { return array( 'preview-attachment-url' => array( 'class' => 'single-settings preview-setting', 'type' => 'preview_image', 'value' => $postdata['preview'], 'title' => __('Set a Tour Preview Image','wpvr') ), 'previewtext' => array( 'class' => 'single-settings preview-img-message', 'type' => 'preview_image_msg', 'value' => $postdata['previewtext'], 'title' => __('Preview Image Message','wpvr') ), 'autoload' => array( 'class' => 'single-settings autoload', 'type' => 'basic_setting_checkbox', 'title' => __('Tour Autoload','wpvr'), 'id' => 'wpvr_autoload', 'have_tooltip' => true, 'tooltip_text' => __('Tour Preview Image will not appear if this is turned on.','wpvr'), 'checked' => $postdata['autoLoad'], ), 'controls' => array( 'class' => 'single-settings controls', 'type' => 'basic_setting_checkbox', 'title' => __('Basic Control Buttons','wpvr'), 'id' => 'wpvr_controls', 'have_tooltip' => true, 'tooltip_text' => __('This option will display Zoom In, Zoom Out and Full Screen buttons on the tour.','wpvr'), 'checked' => $postdata['showControls'], ), ); } /** * Initialize fields render method * @param mixed $preview * @param mixed $previewtext * @param mixed $autoload * @param mixed $control * * @return void * @since 8.0.0 */ public static function render_basic_settings_left_fields($postdata) { $fields = self::get_basic_setting_left_fields($postdata); foreach($fields as $name => $val) { self::{ 'render_' . $val['type'] }( $name, $val ); } } /** * Initilize Basic Setting Right Fields * @param mixed $scene_fade_duration * @param mixed $postdata * * @return array * @since 8.0.0 */ public static function get_basic_setting_right_fields($postdata) { if(!isset($postdata['autoRotate'])){ $rotation = 0; }else{ $rotation = 1; } return array( 'vr-tour-layout' => array( 'class' => 'single-settings vr-tour-layout '. (!defined('WPVR_PRO_VERSION') ? 'is_pro' : ''), 'title' => __('Choose tour layout','wpvr'), 'type' => 'tour_layout_select', 'value' => isset($postdata['tourLayout']) ? $postdata['tourLayout']: array( 'layout' => 'default', 'layout_icon_bg_color' => '#5a536e','layout_icon_color' => '#ffffff', ), 'placeholder' => null, 'have_tooltip' => true, 'tooltip_text' => __('This will set the scene fade effect and execution time.','wpvr'), ), 'scene-fade-duration' => array( 'class' => 'single-settings scene-fade-duration', 'title' => __('Scene Fade Duration','wpvr'), 'type' => 'number_field', 'value' => $postdata['scenefadeduration'], 'placeholder' => null, 'have_tooltip' => true, 'tooltip_text' => __('This will set the scene fade effect and execution time.','wpvr'), ), 'scene-animation' => array( 'class' => 'single-settings scene-animation', 'title' => __('Enable Scene Transition','wpvr'), 'type' => 'basic_setting_checkbox', 'id' => 'wpvr_scene_animation', 'package' => 'pro', 'checked' => isset($postdata['sceneAnimation']) ? 1 : 0, 'value' => isset($postdata['sceneAnimation']) ? $postdata['sceneAnimation'] : 'off', 'placeholder' => null, 'have_tooltip' => true, 'tooltip_text' => __('This will set the scene fade effect and execution time.','wpvr'), ), 'scene-animation-name' => array( 'class' => 'single-settings scene-animation-name', 'title' => __('Select Transition Style','wpvr'), 'type' => 'animation_name_select', 'id' => 'wpvr_scene_animation_name', 'package' => 'pro', 'value' => isset($postdata['sceneAnimationName']) ? $postdata['sceneAnimationName'] : 'none', 'placeholder' => null, 'have_tooltip' => true, 'tooltip_text' => __('This will set the scene fade effect and execution time.','wpvr'), ), 'autorotation' => array( 'class' => 'single-settings autoload', 'title' => __('Auto Rotation','wpvr'), 'id' => 'wpvr_autorotation', 'type' => 'basic_setting_checkbox', 'checked' => $rotation, 'have_tooltip' => false, 'tooltip_text' => '', ), ); } /** * Initilize Basic Setting Right Fields * @param mixed $scene_fade_duration * @param mixed $postdata * * @return array * @since 8.0.0 */ public static function get_basic_setting_generic_form_fields($postdata) { if(!isset($postdata['genericform'])){ $genericform = "off"; }else{ $genericform = $postdata['genericform']; } return array( 'genericform' => array( 'class' => 'single-settings genericform', 'title' => __('Generic Form','wpvr'), 'id' => 'wpvr_generic_form', 'type' => 'generic_form_checkbox', 'checked' => $genericform, 'have_tooltip' => true, 'tooltip_text' => __('Disable keyboard control to use the form.','wpvr'), ) ); } /** * Initilize Basic Setting Right Fields * @param mixed $scene_fade_duration * @param mixed $postdata * * @return array * @since 8.0.0 */ public static function get_basic_setting_call_to_action_fields($postdata) { if(!isset($postdata['calltoaction'])){ $calltoaction = "off"; }else{ $calltoaction = $postdata['calltoaction']; } return array( 'calltoaction' => array( 'class' => 'single-settings calltoaction', 'title' => __('Call To Action ','wpvr'), 'id' => 'wpvr_cal_to_action_form', 'type' => 'call_to_form_checkbox', 'checked' => $calltoaction, 'have_tooltip' => true, 'tooltip_text' => __('Enable the call to action, it will render under the tour.','wpvr'), ) ); } /** * Initilize Basic Setting Right Fields * @param mixed $scene_fade_duration * @param mixed $postdata * * @return array * @since 8.0.0 */ public static function get_basic_setting_custom_css_fields($postdata) { if(!isset($postdata['customcss_enable'])){ $customcss_enable = "off"; }else{ $customcss_enable = $postdata['customcss_enable']; } return array( 'customcss' => array( 'class' => 'single-settings customcss-switcher', 'title' => __('Custom CSS ','wpvr'), 'id' => 'wpvr_custom_css', 'type' => 'custom_css_form_checkbox', 'checked' => $customcss_enable, 'have_tooltip' => true, 'tooltip_text' => __('Write your custom css','wpvr'), ) ); } /** * Render Basic Setting Right Fields * @param mixed $scene_fade_duration * @param mixed $postdata * * @return void * @since 8.0.0 */ public static function render_basic_setting_generic_form_fields($postdata) { $fields = self::get_basic_setting_generic_form_fields($postdata); foreach($fields as $name => $val) { self::{ 'render_' . $val['type'] }( $name, $val ); } } /** * Render Basic Setting Right Fields * @param mixed $scene_fade_duration * @param mixed $postdata * * @return void * @since 8.0.0 */ public static function render_basic_setting_call_to_action_fields($postdata) { $fields = self::get_basic_setting_call_to_action_fields($postdata); foreach($fields as $name => $val) { self::{ 'render_' . $val['type'] }( $name, $val ); } } /** * Render Basic Setting Right Fields * @param mixed $scene_fade_duration * @param mixed $postdata * * @return void * @since 8.0.0 */ public static function render_basic_setting_custom_css_fields($postdata) { $fields = self::get_basic_setting_custom_css_fields($postdata); foreach($fields as $name => $val) { self::{ 'render_' . $val['type'] }( $name, $val ); } } /** * Render Basic Setting Right Fields * @param mixed $scene_fade_duration * @param mixed $postdata * * @return void * @since 8.0.0 */ public static function render_basic_setting_right_fields($postdata) { $fields = self::get_basic_setting_right_fields($postdata); foreach($fields as $name => $val) { self::{ 'render_' . $val['type'] }( $name, $val ); } } /** * Initialize Autorotation Data Wrapper Fields * @param mixed $autorotation * @param mixed $autorotationinactivedelay * @param mixed $autorotationstopdelay * * @return array * @since 8.0.0 */ public static function get_autorotation_data_wrapper_fields($postdata) { return array( 'auto-rotation' => array( 'class' => 'single-settings autorotationdata', 'title' => __('Rotation Speed and Direction','wpvr'), 'type' => 'number_field', 'value' => isset($postdata['autoRotate']) ? $postdata['autoRotate'] : -5, 'placeholder' => -5, 'have_tooltip' => true, 'tooltip_text' => __('Set a value to determine the speed of rotation. The higher the number, the faster it will rotate. Positive values will make it rotate clockwise and negative values will make it rotate anti clockwise','wpvr'), ), 'auto-rotation-inactive-delay' => array( 'class' => 'single-settings autorotationdata', 'title' => __('Resume Auto-rotation after','wpvr'), 'type' => 'number_field', 'value' => isset($postdata['autoRotateInactivityDelay']) ? $postdata['autoRotateInactivityDelay'] : null, 'placeholder' => 2000, 'have_tooltip' => true, 'tooltip_text' => __('When someone clicks on the tour, auto-rotation stops. Here, set a time after which auto rotation will start again. Assign in milliseconds, where 1000 milliseconds = 1 second.','wpvr'), ), 'auto-rotation-stop-delay' => array( 'class' => 'single-settings autorotationdata', 'title' => __('Stop Auto-rotation after','wpvr'), 'type' => 'number_field', 'value' => isset($postdata['autoRotateStopDelay']) ? $postdata['autoRotateStopDelay'] : null, 'placeholder' => 2000, 'have_tooltip' => true, 'tooltip_text' => __('Set a time after which auto rotation will stop. Assign in milliseconds, where 1000 milliseconds = 1 second.','wpvr'), ), ); } public static function get_generic_form_associate_fields($postdata) { return array( 'genericformshortcode' => array( 'class' => 'single-settings genericformshortcode', 'title' => __('Add Form Shortcode','wpvr'), 'type' => 'text_field', 'value' => isset($postdata['genericformshortcode']) ? $postdata['genericformshortcode'] : "", 'placeholder' => "", 'have_tooltip' => true, 'tooltip_text' => __('Print the forms shortcode you want to show.','wpvr'), ), ); } public static function get_call_to_action_associate_fields($postdata) { return array( 'buttontext' => array( 'class' => 'single-settings buttontext', 'title' => __('Button Text','wpvr'), 'type' => 'text_field', 'value' => isset($postdata['buttontext']) ? $postdata['buttontext'] : "Click Here", 'placeholder' => "", 'have_tooltip' => true, 'tooltip_text' => __('Call to action button text','wpvr'), ),'buttonurl' => array( 'class' => 'single-settings buttonurl', 'title' => __('Button URL','wpvr'), 'type' => 'text_field', 'value' => isset($postdata['buttonurl']) ? $postdata['buttonurl'] : "", 'placeholder' => "", 'have_tooltip' => true, 'tooltip_text' => 'Call to action URl', ), 'button_configuration' => array( 'class' => 'single-settings button_configuration', 'title' => __('Button Style','wpvr'), 'name' => 'button_configuration_field', 'type' => 'button_configuration_field', 'value' => isset($postdata['button_configuration']) ? $postdata['button_configuration'] : array(), 'placeholder' => "", 'have_tooltip' => true, 'tooltip_text' => __('Print the forms shortcode you want to show.','wpvr'), ), ); } public static function get_custom_css_associate_fields($postdata) { return array( 'customcss' => array( 'class' => 'single-settings customcss', 'title' => __('Custom CSS','wpvr'), 'type' => 'text_area_field', 'code_mirror_id' => 'code-mirror-editor-custom-css', 'value' => isset($postdata['customcss']) ? $postdata['customcss'] : "", 'placeholder' => "", 'have_tooltip' => true, ) ); } /** * Render generic form associate fields * @param mixed $genericformshortcode * * @return void * @since 8.0.0 */ public static function render_generic_form_associate_fields($postdata) { $fields = self::get_generic_form_associate_fields($postdata); foreach($fields as $name => $val) { self::{ 'render_' . $val['type'] }( $name, $val ); } } /** * Render generic form associate fields * @param mixed $genericformshortcode * * @return void * @since 8.0.0 */ public static function render_call_to_action_associate_fields($postdata) { $fields = self::get_call_to_action_associate_fields($postdata); foreach($fields as $name => $val) { self::{ 'render_' . $val['type'] }( $name, $val ); } } /** * Render generic form associate fields * @param mixed $genericformshortcode * * @return void * @since 8.0.0 */ public static function render_custom_css_associate_fields($postdata) { $fields = self::get_custom_css_associate_fields($postdata); foreach($fields as $name => $val) { self::{ 'render_' . $val['type'] }( $name, $val ); } } /** * Render Autorotation Data Wrapper Fields * @param mixed $autorotation * @param mixed $autorotationinactivedelay * @param mixed $autorotationstopdelay * * @return void * @since 8.0.0 */ public static function render_autorotation_data_wrapper_fields($postdata) { $fields = self::get_autorotation_data_wrapper_fields($postdata); foreach($fields as $name => $val) { self::{ 'render_' . $val['type'] }( $name, $val ); } } /** * Render Tab Navigation * @return void * @since 8.0.0 */ public static function render_pano_tab_nav($postdata) { $fields = self::get_navigation_fields(); ob_start(); ?> array( 'class' => 'single-settings compass', 'title' => __('Keyboard Movement Control','wpvr'), 'id' => 'wpvr_diskeyboard', 'have_tooltip' => false, 'tooltip_text' => '', 'type' => 'checkbox' ), 'keyboardzoom' => array( 'class' => 'single-settings', 'title' => __('Keyboard Zoom Control','wpvr'), 'id' => 'wpvr_keyboardzoom', 'have_tooltip' => false, 'tooltip_text' => '', 'type' => 'checkbox' ), 'draggable' => array( 'class' => 'single-settings', 'title' => __('Mouse Drag Control','wpvr'), 'id' => 'wpvr_draggable', 'have_tooltip' => false, 'tooltip_text' => '', 'type' => 'checkbox' ), 'mouseZoom' => array( 'class' => 'single-settings', 'title' => __('Mouse Zoom Control','wpvr'), 'id' => 'wpvr_mouseZoom', 'have_tooltip' => false, 'tooltip_text' => '', 'type' => 'checkbox' ), 'gyro' => array( 'class' => 'single-settings gyro', 'title' => __('Gyroscope Control','wpvr'), 'id' => 'wpvr_gyro', 'have_tooltip' => false, 'tooltip_text' => '', 'type' => 'checkbox' ), 'deviceorientationcontrol' => array( 'class' => 'single-settings orientation', 'title' => __('Auto Gyroscope Support','wpvr'), 'id' => 'wpvr_deviceorientationcontrol', 'have_tooltip' => true, 'tooltip_text' => __('If set to true, device orientation control will be used when the panorama is loaded, if the device supports it. If false, device orientation control needs to be activated by pressing a button. Defaults to false. Will work if gyroscope is enabled','wpvr'), 'type' => 'checkbox' ), 'compass' => array( 'class' => 'single-settings compass', 'title' => __('Compass','wpvr'), 'id' => 'wpvr_compass', 'have_tooltip' => false, 'tooltip_text' => '', 'type' => 'checkbox' ), ); return apply_filters( 'modify_advanced_control_left_fields', $fields, $postdata ); } /** * Initialise Advanced Settings Right Fields * @return array * @since 8.0.0 */ public static function get_advanced_settings_right_fields($postdata) { $fields = array( 'vrgallery' => array( 'class' => 'single-settings gallery', 'title' => __('Scene Gallery','wpvr'), 'id' => 'wpvr_vrgallery', 'type' => 'checkbox', 'have_tooltip' => true, 'tooltip_text' => __('Turning it On will display a gallery with all the scenes on your tour. By double clicking on a scene thumbnail on the gallery, you can move to that specific scene. The gallery will only show up on the front end and not on the preview.','wpvr'), ), 'vrgallery_title' => array( 'class' => 'single-settings', 'title' => __('Scene Titles on Gallery','wpvr'), 'id' => 'wpvr_vrgallery_title', 'type' => 'checkbox', 'have_tooltip' => true, 'tooltip_text' => __('Turning it on will display scene titles on each scene thumbnail inside the Scene Gallery. The Scene IDs will be used as the Scene Title.','wpvr') ), 'vrscene_navigation' => array( 'class' => 'single-settings scene-navigation', 'title' => __('Scene Navigation Menu','wpvr'), 'id' => 'wpvr_scene_navigation', 'type' => 'checkbox', 'have_tooltip' => true, 'tooltip_text' => __('Turning it On will display a gallery with all the scenes on your tour. By double clicking on a scene thumbnail on the gallery, you can move to that specific scene. The gallery will only show up on the front end and not on the preview.','wpvr') ), 'bg_music' => array( 'class' => 'single-settings', 'title' => __('Tour Background Music','wpvr'), 'id' => 'wpvr_bg_music', 'type' => 'checkbox', 'have_tooltip' => false, 'tooltip_text' => '' ), 'explainerSwitch' => array( 'class' => 'single-settings company-info', 'title' => __('Enable explainer video','wpvr'), 'id' => 'wpvr_explainerSwitch', 'have_tooltip' => false, 'tooltip_text' => '', 'type' => 'checkbox', ), 'globalzoom' => array( 'class' => 'single-settings', 'title' => __('Set Zoom Preferences','wpvr'), 'id' => 'wpvr_globalzoom', 'have_tooltip' => true, 'tooltip_text' => __('Zoom interval is 50 to 120 degree. You can put any value between 50 to 120. As an example, if you set 100, the scene will display with zoom in 100 degree on each load.','wpvr'), 'type' => 'checkbox', ), 'cpLogoSwitch' => array( 'class' => 'single-settings company-info', 'title' => __('Add Company Information','wpvr'), 'id' => 'wpvr_cpLogoSwitch', 'type' => 'checkbox', 'have_tooltip' => false, 'tooltip_text' => '' ) ); return apply_filters( 'modify_advanced_control_right_fields', $fields, $postdata ); } /** * Initialise Control Button Left Fields * @return array * @since 8.0.0 */ public static function get_control_button_left_fields($postdata) { $fields = array( 'panupControl' => array( 'title' => __('Move Up','wpvr'), 'icon' => 'move-up.jpg', 'id' => 'wpvr_panupControl', 'type' => 'checkbox' ), 'panDownControl' => array( 'title' => __('Move Down','wpvr'), 'icon' => 'move-down.jpg', 'id' => 'wpvr_panDownControl', 'type' => 'checkbox' ), 'panLeftControl' => array( 'title' => __('Move Left','wpvr'), 'icon' => 'move-left.jpg', 'id' => 'wpvr_panLeftControl', 'type' => 'checkbox' ), 'panRightControl' => array( 'title' => __('Move Right','wpvr'), 'icon' => 'move-right.jpg', 'id' => 'wpvr_panRightControl', 'type' => 'checkbox' ), 'panZoomInControl' => array( 'title' => __('Zoom In','wpvr'), 'icon' => 'zoom-in.jpg', 'id' => 'wpvr_panZoomInControl', 'type' => 'checkbox' ), ); return apply_filters( 'modify_control_button_left_fields', $fields, $postdata ); } /** * Initialise Control Button Left Fields * @return array * @since 8.0.0 */ public static function get_control_button_right_fields($postdata) { $fields = array( 'panZoomOutControl' => array( 'title' => __('Zoom Out','wpvr'), 'icon' => 'zoom-out.jpg', 'id' => 'wpvr_panZoomOutControl', 'type' => 'checkbox' ), 'panFullscreenControl' => array( 'title' => __('Full Screen','wpvr'), 'icon' => 'full-screen.jpg', 'id' => 'wpvr_panFullscreenControl', 'type' => 'checkbox' ), 'gyroscope' => array( 'title' => __('Gyroscope','wpvr'), 'icon' => 'gryscop.jpg', 'id' => 'wpvr_gyroscope', 'type' => 'checkbox' ), 'backToHome' => array( 'title' => __('Home','wpvr'), 'icon' => 'home.jpg', 'id' => 'wpvr_backToHome', 'type' => 'checkbox' ), 'explainer' => array( 'title' => __('Explainer','wpvr'), 'icon' => 'explainer-vedio.png', 'id' => 'wpvr_explainer', 'type' => 'checkbox', ) ); return apply_filters( 'modify_control_button_right_fields', $fields, $postdata ); } /** * Initialize Scene setting left fields * Panodata is empty * @return array * @since 8.0.0 */ public static function get_scene_left_fields_empty_panodata() { $fields = array( 'scene-type' => array( 'label_for' => 'scene-type', 'title' => __('Scene Type','wpvr'), 'input_class' => '', 'type' => 'text', 'value' => 'equirectangular', 'disabled' => 'disabled', ), 'scene-attachment-url' => array( 'title' => __('Scene Upload','wpvr'), 'type' => 'upload', 'value' => '', 'display' => 'none' ), 'dscene' => array( 'class' => 'scene-setting dscene', 'title' => __('Set as Default','wpvr'), 'type' => 'select', 'select_class' => 'dscen', 'selected' => 'off' ), 'scene-id' => array( 'label_for' => 'scene-id', 'title' => __('Scene ID','wpvr'), 'input_class' => 'sceneid', 'type' => 'text', 'value' => '', 'disabled' => 'disabled', ) ); return apply_filters( 'modify_scene_default_left_fields', $fields ); } /** * Initilize Scene Settings left Fields * Panodata is not empty * @param mixed $dscene * @param mixed $scene_id * @param mixed $scene_photo * * @return array * @since 8.0.0 */ public static function get_scene_left_fields_with_panodata($pano_scene) { $fields = array( 'scene-type' => array( 'label_for' => 'scene-type', 'title' => __('Scene Type','wpvr'), 'input_class' => '', 'type' => 'text', 'value' => 'equirectangular', 'disabled' => 'disabled', ), 'scene-attachment-url' => array( 'title' => __('Scene Upload','wpvr'), 'type' => 'upload', 'value' => $pano_scene['scene-attachment-url'], 'display' => 'block' ), 'dscene' => array( 'class' => 'scene-setting dscene', 'title' => __('Set as Default','wpvr'), 'type' => 'select', 'select_class' => 'dscen', 'selected' => $pano_scene['dscene'] ), 'scene-id' => array( 'label_for' => 'scene-id', 'title' => __('Scene ID','wpvr'), 'input_class' => 'sceneid', 'type' => 'text', 'value' => $pano_scene['scene-id'], 'disabled' => 'disabled', ), ); return apply_filters( 'modify_scene_left_fields', $fields, $pano_scene ); } /** * Initialize Hotspot Settings Left Fields * @return array * * @since 8.0.0 */ public static function get_hotspot_left_fields($pano_hotspot) { $fields = array( 'hotspot-title' => array( 'title' => __('Hotspot ID','wpvr'), 'value' => $pano_hotspot['hotspot-title'], 'type' => 'text', 'input_class' => '', 'input_id' => 'hotspot-title' ), 'hotspot-pitch' => array( 'title' => __('Pitch','wpvr'), 'value' => $pano_hotspot['hotspot-pitch'], 'type' => 'text', 'input_class' => 'hotspot-pitch', 'input_id' => '' ), 'hotspot-yaw' => array( 'title' => __('Yaw','wpvr'), 'value' => $pano_hotspot['hotspot-yaw'], 'type' => 'text', 'input_class' => 'hotspot-yaw', 'input_id' => '' ), 'hotspot-customclass' => array( 'title' => __('Hotspot Custom Icon Class','wpvr'), 'value' => $pano_hotspot['hotspot-customclass'], 'type' => 'text', 'input_class' => '', 'input_id' => 'hotspot-customclass' ), ); return apply_filters( 'modify_hotspot_left_fields', $fields, $pano_hotspot ); } /** * Initialize Hotspot Setting Right Fields * @return array * * @since 8.0.0 */ public static function get_hotspot_right_fields() { $fields = array( 'hotspot-type' => array( 'title' => __('Hotspot-Type','wpvr'), 'type' => 'info_type_select', ), 'hotspot-url' => array( 'title' => __('URL','wpvr'), 'type' => 'info_url', 'value' => '', 'display' => 'block', ), 'wpvr_url_open' => array( 'title' => __('Open in same tab','wpvr'), 'type' => 'same_tab_checkbox', 'value' => 'off', 'display' => 'flex' ), 'hotspot-content' => array( 'class' => 'hotspot-content', 'title' => __('On Click Content','wpvr'), 'type' => 'textarea', ), 'hotspot-hover' => array( 'class' => 'hotspot-hover', 'title' => __('On Hover Content','wpvr'), 'type' => 'textarea' ), 'hotspot-scene-list' => array( 'title' => __('Select Target Scene from List','wpvr'), 'type' => 'scene_select', ), 'hotspot-scene' => array( 'title' => __('Target Scene ID','wpvr'), 'display' => 'none', 'input_class' => 'hotspotsceneinfodata', 'type' => 'disabled_text', 'value' => '' ) ); return apply_filters( 'modify_hotspot_right_fields', $fields ); } /** * Initialize Hotspot Setting Info Fields * * @param mixed $hotspot_type * @param mixed $hotspot_url * @param mixed $hotspot_content * @param mixed $hotspot_hover * * @return array * @since 8.0.0 */ public static function get_hotspot_setting_info_fields($pano_hotspot) { $fields = array( 'hotspot-type' => array( 'title' => __('Hotspot-Type','wpvr'), 'type' => 'info_type_select', ), 'hotspot-url' => array( 'title' => __('URL','wpvr'), 'type' => 'info_url', 'value' => $pano_hotspot['hotspot-url'], 'display' => 'block', ), 'wpvr_url_open' => array( 'title' => __('Open in same tab','wpvr'), 'type' => 'same_tab_checkbox', 'value' => isset($pano_hotspot['wpvr_url_open'][0]) ? $pano_hotspot['wpvr_url_open'][0] : 'off', 'display' => 'flex', ), 'hotspot-content' => array( 'class' => 'hotspot-content', 'title' => __('On Click Content','wpvr'), 'type' => 'info_textarea', 'value' => $pano_hotspot['hotspot-content'], 'display' => 'block', ), 'hotspot-hover' => array( 'class' => 'hotspot-hover', 'title' => __('On Hover Content','wpvr'), 'type' => 'info_textarea', 'value' => $pano_hotspot['hotspot-hover'], 'display' => 'block', ), 'hotspot-scene-list' => array( 'title' => __('Select Target Scene from List','wpvr'), 'type' => 'scene_list', 'display' => 'none', ), 'hotspot-scene' => array( 'title' => __('Target Scene ID','wpvr'), 'display' => 'none', 'input_class' => 'hotspotsceneinfodata', 'type' => 'disabled_text', 'value' => '' ) ); return apply_filters( 'modify_hotspot_right_fields', $fields ); } /** * Initialize Hotspot Setting Info Fields * * @param mixed $hotspot_type * @param mixed $hotspot_url * @param mixed $hotspot_content * @param mixed $hotspot_hover * * @return array * @since 8.0.0 */ public static function get_hotspot_setting_wc_product_fields($pano_hotspot) { $fields = array( 'hotspot-type' => array( 'title' => __('Hotspot-Type','wpvr'), 'type' => 'wc_product_type', ), 'hotspot-product-id' => array( 'title' => __('Select your form','wpvr'), 'type' => 'wc_product_select', 'class' => 'wpvr-product-search', 'value' => $pano_hotspot ), 'hotspot-url' => array( 'title' => __('URL','wpvr'), 'type' => 'info_url', 'value' => $pano_hotspot['hotspot-url'], 'display' => 'none', ), 'wpvr_url_open' => array( 'title' => __('Open in same tab','wpvr'), 'type' => 'same_tab_checkbox', 'value' => isset($pano_hotspot['wpvr_url_open'][0]) ? $pano_hotspot['wpvr_url_open'][0] : 'off', 'display' => 'none', ), 'hotspot-content' => array( 'class' => 'hotspot-content', 'title' => __('On Click Content','wpvr'), 'type' => 'info_textarea', 'value' => $pano_hotspot['hotspot-content'], 'display' => 'none', ), 'hotspot-hover' => array( 'class' => 'hotspot-hover', 'title' => __('On Hover Content','wpvr'), 'type' => 'info_textarea', 'value' => $pano_hotspot['hotspot-hover'], 'display' => 'block', ), 'hotspot-scene-list' => array( 'title' => __('Select Target Scene from List','wpvr'), 'type' => 'scene_list', 'display' => 'none', ), 'hotspot-scene' => array( 'title' => __('Target Scene ID','wpvr'), 'display' => 'none', 'input_class' => 'hotspotsceneinfodata', 'type' => 'disabled_text', 'value' => '' ) ); return apply_filters( 'modify_hotspot_right_fields', $fields ); } /** * Initialize Hotspot Setting Fluent form field Fields * * @param mixed $hotspot_type * @param mixed $hotspot_url * @param mixed $hotspot_content * @param mixed $hotspot_hover * * @return array * @since 8.0.0 */ public static function get_hotspot_setting_fluent_form_fields($pano_hotspot) { $fields = array( 'hotspot-type' => array( 'title' => __('Hotspot-Type','wpvr'), 'type' => 'fluent_form_type', ), 'fluent-form-id' => array( 'title' => __('Select your form','wpvr'), 'type' => 'fluent_form_select', 'class' => 'wpvr-fluent-forms', 'value' => $pano_hotspot ), 'hotspot-url' => array( 'title' => __('URL','wpvr'), 'type' => 'info_url', 'value' => $pano_hotspot['hotspot-url'], 'display' => 'none', ), 'wpvr_url_open' => array( 'title' => __('Open in same tab','wpvr'), 'type' => 'same_tab_checkbox', 'value' => isset($pano_hotspot['wpvr_url_open'][0]) ? $pano_hotspot['wpvr_url_open'][0] : 'off', 'display' => 'none', ), 'hotspot-content' => array( 'class' => 'hotspot-content', 'title' => __('On Click Content','wpvr'), 'type' => 'info_textarea', 'value' => $pano_hotspot['hotspot-content'], 'display' => 'none', ), 'hotspot-hover' => array( 'class' => 'hotspot-hover', 'title' => __('On Hover Content','wpvr'), 'type' => 'info_textarea', 'value' => $pano_hotspot['hotspot-hover'], 'display' => 'block', ), 'hotspot-scene-list' => array( 'title' => __('Select Target Scene from List','wpvr'), 'type' => 'scene_list', 'display' => 'none', ), 'hotspot-scene' => array( 'title' => __('Target Scene ID','wpvr'), 'display' => 'none', 'input_class' => 'hotspotsceneinfodata', 'type' => 'disabled_text', 'value' => '' ) ); return apply_filters( 'modify_hotspot_right_fields', $fields ); } /** * Initializa Hotspot Setting Scene Fields * * @param mixed $hotspot_hover * @param mixed $hotspot_target_scene * * @return array * @since 8.0.0 */ public static function get_hotspot_setting_scene_fields($pano_hotspot) { $fields = array( 'hotspot-type' => array( 'title' => __('Hotspot-Type','wpvr'), 'type' => 'scene_type_select', ), 'hotspot-url' => array( 'title' => __('URL','wpvr'), 'type' => 'info_url', 'display' => 'none', 'value' => '', ), 'wpvr_url_open' => array( 'title' => __('Open in same tab','wpvr'), 'type' => 'same_tab_checkbox', 'value' => 'off', 'display' => 'none', ), 'hotspot-content' => array( 'class' => 'hotspot-content', 'title' => __('On Click Content','wpvr'), 'type' => 'scene_content', 'display' => 'none', ), 'hotspot-hover' => array( 'class' => 'hotspot-hover', 'title' => __('On Hover Content','wpvr'), 'type' => 'info_textarea', 'value' => $pano_hotspot['hotspot-hover'], 'display' => 'block', ), 'hotspot-scene-list' => array( 'title' => __('Select Target Scene from List','wpvr'), 'type' => 'scene_list', 'display' => 'block', ), 'hotspot-scene' => array( 'title' => __('Target Scene ID','wpvr'), 'display' => 'block', 'input_class' => 'hotspotsceneinfodata', 'type' => 'disabled_text', 'value' => $pano_hotspot['hotspot-scene'] ), ); return apply_filters( 'modify_hotspot_setting_scene_fields', $fields, $pano_hotspot ); } /** * Return general feature navigation meta fields * * @return array * @since 8.0.0 */ public static function get_general_navigation_meta_fields() { $fields = array( array( 'class' => 'gen-basic', 'active' => 'active', 'href' => 'gen-basic', 'isPro' => false, 'regular_icon' => 'admin/icon/basic-settings-regular.png', 'hover_icon' => 'admin/icon/basic-settings-hover.png', 'title' => __('Basic Settings','wpvr') ), array( 'class' => 'gen-advanced', 'active' => '', 'href' => 'gen-advanced', 'isPro' => true, 'regular_icon' => 'admin/icon/advance-control-regular.png', 'hover_icon' => 'admin/icon/advance-control-hover.png', 'title' => __('Advanced Controls','wpvr') ), array( 'class' => 'gen-control', 'active' => '', 'href' => 'gen-control', 'isPro' => true, 'regular_icon' => 'admin/icon/control-buttons-regular.png', 'hover_icon' => 'admin/icon/control-buttons-hover.png', 'title' => __('Control Buttons','wpvr') ) ); return apply_filters( 'make_is_pro_false', $fields ); } /** * Render inner navigation bar for General tab * * @return void * @since 8.0.0 */ public static function render_general_inner_navigation() { ob_start(); ?>
$val) { self::{ 'render_hotspot_' . $val['type'] . '_field' }( $name, $val ); } } /** * Render Hotspot Setting Right Fileds * @return void * * @since 8.0.0 */ public static function render_hotspot_setting_right_fields() { $fields = self::get_hotspot_right_fields(); foreach($fields as $name => $val) { self::{ 'render_hotspot_' . $val['type'] . '_field' }( $name, $val ); } } /** * Render Hotspot Setting When Hotspot-Type is Info * * @param mixed $hotspot_url * @param mixed $hotspot_content * @param mixed $hotspot_hover * * @return void * @since 8.0.0 */ public static function render_hotspot_setting_info_fields($pano_hotspot) { $fields = self::get_hotspot_setting_info_fields($pano_hotspot); foreach($fields as $name => $val) { self::{ 'render_hotspot_' . $val['type'] . '_field' }( $name, $val ); } } /** * Render Hotspot Setting When Hotspot-Type is fluent form * * @param mixed $hotspot_hover * @param mixed $hotspot_target_scene * * @return void * @since 8.0.0 */ public static function render_hotspot_setting_fluent_form_fields($pano_hotspot) { $fields = self::get_hotspot_setting_fluent_form_fields($pano_hotspot); foreach($fields as $name => $val) { self::{ 'render_hotspot_' . $val['type'] . '_field' }( $name, $val ); } } /** * Render Hotspot Setting When Hotspot-Type is Woocommerce Product * * @param mixed $hotspot_hover * @param mixed $hotspot_target_scene * * @return void * @since 8.0.0 */ public static function render_hotspot_setting_wc_product_fields($pano_hotspot) { $fields = self::get_hotspot_setting_wc_product_fields($pano_hotspot); foreach($fields as $name => $val) { self::{ 'render_hotspot_' . $val['type'] . '_field' }( $name, $val ); } } /** * Render Hotspot Setting When Hotspot-Type is Scene * * @param mixed $hotspot_hover * @param mixed $hotspot_target_scene * * @return void * @since 8.0.0 */ public static function render_hotspot_setting_scene_fields($pano_hotspot) { $fields = self::get_hotspot_setting_scene_fields($pano_hotspot); foreach($fields as $name => $val) { self::{ 'render_hotspot_' . $val['type'] . '_field' }( $name, $val ); } } /** * Render Scene Setting Left fields * When Panodata is Empty * @return void * @since 8.0.0 */ public static function render_scene_left_fields_empty_panodata() { $fields = self::get_scene_left_fields_empty_panodata(); foreach($fields as $name => $val) { self::{ 'render_scene_' . $val['type'] . '_field' }( $name, $val ); } } /** * Render Scene Setting Left Fields * When Panodata is not Empty * @param mixed $dscene * @param mixed $scene_id * @param mixed $scene_photo * * @return void * @since 8.0.0 */ public static function render_scene_left_fields_with_panodata($pano_scene) { $fields = self::get_scene_left_fields_with_panodata($pano_scene); foreach($fields as $name => $val) { self::{ 'render_scene_' . $val['type'] . '_field' }( $name, $val ); } } /** * Initialize fields render method * @return void * @since 8.0.0 */ public static function render_advanced_settings_left_fields($postdata) { $fields = self::get_advanced_settings_left_fields($postdata); foreach($fields as $name => $val) { self::{ 'render_' . $val['type'] . '_field' }( $name, $val ); } } /** * Initialize fields render method * @return void * @since 8.0.0 */ public static function render_advanced_settings_right_fields($postdata) { $fields = self::get_advanced_settings_right_fields($postdata); foreach($fields as $name => $val) { self::{ 'render_' . $val['type'] . '_field' }( $name, $val ); } } /** * Initialize fields render method * @return void * @since 8.0.0 */ public static function render_control_button_left_fields($postdata) { $fields = self::get_control_button_left_fields($postdata); foreach($fields as $name => $val) { self::{ 'render_' . $val['type'] . '_with_icon' }( $name, $val ); } } /** * Initialize fields render method * @return void * @since 8.0.0 */ public static function render_control_button_right_fields($postdata) { $fields = self::get_control_button_right_fields($postdata); foreach($fields as $name => $val) { self::{ 'render_' . $val['type'] . '_with_icon' }( $name, $val ); } } /** * Initilize Video Meta Fields * @param mixed $postdata * * @return array * @since 8.0.0 */ public static function get__video_setting_fields($postdata) { $vidurl = ''; if (isset($postdata['vidid'])) { $vidurl = $postdata['vidurl']; } $meta_fields = array( 'panovideo' => array( 'class' => 'single-settings videosetup', 'title' => __('Enable Video','wpvr'), 'type' => 'radio_button', 'lists' => array( array( 'input_class' => 'styled-radio video_off', 'input_id' => 'styled-radio', 'value' => 'off', 'checked' => isset($postdata['vidid']), 'label_value' => 'Off' ), array( 'input_class' => 'styled-radio video_on', 'input_id' => 'styled-radio-0', 'value' => 'on', 'checked' => isset($postdata['vidid']), 'label_value' => 'On' ) ), ), 'video-attachment-url' => array( 'class' => 'video-setting', 'title' => __('Upload or Add Link','wpvr'), 'placeholder' => __('Paste Youtube or Vimeo link or upload','wpvr'), 'input_class' => 'video-attachment-url', 'type' => 'video_text_input', 'value' => $vidurl ) ); return apply_filters( 'extend_video_meta_fields', $meta_fields, $postdata, $vidurl ); } /** * Render Video Settings Meta Fields * @param mixed $postdata * * @return void * @since 8.0.0 */ public static function render_video_setting_meta_fields($postdata) { $fields = self::get__video_setting_fields($postdata); foreach($fields as $name => $val) { self::{ 'render_' . $val['type'] }( $name, $val ); } } /** * Render Scene Settings Select Field * @param mixed $name input name * @param mixed $val options * * @return void * @since 8.0.0 */ public static function render_scene_select_field($name, $val) { extract($val); ob_start(); ?>