Version Description
(28-7-2020) = * Error fix for safari * JS error fix for optimization
=
Download this release
Release Info
Developer | rextheme |
Plugin | WP VR – 360 Panorama and virtual tour creator for WordPress |
Version | 6.0.0 |
Comparing to | |
See all releases |
Code changes from version 5.8.0 to 6.0.0
- README.txt +16 -6
- admin/class-wpvr-admin.php +0 -23
- admin/class-wpvr-ajax.php +87 -87
- admin/css/wpvr-admin.css +70 -22
- admin/js/wpvr-admin.js +4 -1
- admin/partials/wpvr-meta-box-builder-display.php +4 -0
- admin/partials/wpvr_documentation.php +1 -1
- public/class-wpvr-public.php +82 -76
- public/css/wpvr-public.css +54 -27
- public/js/wpvr-public.js +16 -8
- wpvr.php +70 -64
README.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://rextheme.com/wp-vr-360-panorama-and-virtual-tour-creator-fo
|
|
4 |
Tags: virtual tour, real estate tour, panorama, panorama viewer, virtual tour, 360 panorama, interactive tour
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.4.2
|
7 |
-
Stable tag:
|
8 |
Requires PHP: 7.0.0
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -27,7 +27,7 @@ Simply provide a 360 panoramic image, and this plugin will transform it into a r
|
|
27 |
== Why Use WPVR? ==
|
28 |
WPVR gives all the features needed to create a quality virtual tour without any hassle.
|
29 |
|
30 |
-
https://www.youtube.com/watch?v=
|
31 |
|
32 |
Get several exclusive features, such as:
|
33 |
|
@@ -38,7 +38,7 @@ You can also add an auto rotation effect, scene fade animation when transmitting
|
|
38 |
|
39 |
Plus, it includes the feature to preview the tour at the back-end for proper inspection and tour creation.
|
40 |
|
41 |
-
>Read detailed [documentation](https://rextheme.com/docs/wp-vr/) and [video tutorials](https://www.youtube.com/
|
42 |
|
43 |
**Create an interactive realistic tour with multiple scenes**
|
44 |
Add several scenes and add hotspots to connect them into a tour. Create multiple hotspots for every scene at your own will, to connect to different scenes and generate a realistic tour experience.
|
@@ -97,6 +97,7 @@ For more control over creating a virtual tour, learn about the [Premium version]
|
|
97 |
|
98 |
= PREMIUM FEATURES =
|
99 |
* All free features
|
|
|
100 |
* Unlimited scenes and hotspots (limited to 5 in free version)
|
101 |
* Gyroscope support on mobile devices
|
102 |
* 900+ premium hotspot icons
|
@@ -117,7 +118,8 @@ For more control over creating a virtual tour, learn about the [Premium version]
|
|
117 |
* Mouse scroll switch
|
118 |
* 360 video autoplay and loop switch
|
119 |
* VR background music support
|
120 |
-
*
|
|
|
121 |
|
122 |
[Instructions to upgrade to pro](https://rextheme.com/docs/wp-vr/how-to-upgrade-to-pro/)
|
123 |
|
@@ -127,9 +129,9 @@ For more control over creating a virtual tour, learn about the [Premium version]
|
|
127 |
> *[Have a suggestion or feature request? Let us know!](https://app.productstash.io/roadmaps/5f0b43d9a54eda00221d5516/public#ideas)*
|
128 |
|
129 |
**Upcoming Features**
|
130 |
-
–
|
131 |
-
– Flat Image Support
|
132 |
- Ground map
|
|
|
133 |
- Connect multiple tours
|
134 |
|
135 |
**[Documentation](https://rextheme.com/docs/wp-vr/)**
|
@@ -411,5 +413,13 @@ Simply add "/plugins/wpvr" to exclusion field (or use the location where you sto
|
|
411 |
* License input type changed to password
|
412 |
* On click content container responsive issue fixed
|
413 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
414 |
== Upgrade Notice ==
|
415 |
Please do update the WP VR to the latest version. Each update makes it sure your plugin is supporting all tour features.
|
4 |
Tags: virtual tour, real estate tour, panorama, panorama viewer, virtual tour, 360 panorama, interactive tour
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.4.2
|
7 |
+
Stable tag: 6.0.0
|
8 |
Requires PHP: 7.0.0
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
27 |
== Why Use WPVR? ==
|
28 |
WPVR gives all the features needed to create a quality virtual tour without any hassle.
|
29 |
|
30 |
+
https://www.youtube.com/watch?v=SWsv-bplne8
|
31 |
|
32 |
Get several exclusive features, such as:
|
33 |
|
38 |
|
39 |
Plus, it includes the feature to preview the tour at the back-end for proper inspection and tour creation.
|
40 |
|
41 |
+
>Read detailed [documentation](https://rextheme.com/docs/wp-vr/) and [video tutorials](https://www.youtube.com/playlist?list=PLelDqLncNWcUndi1NkXJh2BH62OYmIayt) for assistance.
|
42 |
|
43 |
**Create an interactive realistic tour with multiple scenes**
|
44 |
Add several scenes and add hotspots to connect them into a tour. Create multiple hotspots for every scene at your own will, to connect to different scenes and generate a realistic tour experience.
|
97 |
|
98 |
= PREMIUM FEATURES =
|
99 |
* All free features
|
100 |
+
* Personalized support (e-mail or forum)
|
101 |
* Unlimited scenes and hotspots (limited to 5 in free version)
|
102 |
* Gyroscope support on mobile devices
|
103 |
* 900+ premium hotspot icons
|
118 |
* Mouse scroll switch
|
119 |
* 360 video autoplay and loop switch
|
120 |
* VR background music support
|
121 |
+
* Addon for Fluent Forms Integration
|
122 |
+
* Addon for WooCommerce Integration
|
123 |
|
124 |
[Instructions to upgrade to pro](https://rextheme.com/docs/wp-vr/how-to-upgrade-to-pro/)
|
125 |
|
129 |
> *[Have a suggestion or feature request? Let us know!](https://app.productstash.io/roadmaps/5f0b43d9a54eda00221d5516/public#ideas)*
|
130 |
|
131 |
**Upcoming Features**
|
132 |
+
– Flat image support
|
|
|
133 |
- Ground map
|
134 |
+
- Multisite suppport
|
135 |
- Connect multiple tours
|
136 |
|
137 |
**[Documentation](https://rextheme.com/docs/wp-vr/)**
|
413 |
* License input type changed to password
|
414 |
* On click content container responsive issue fixed
|
415 |
|
416 |
+
= 5.9.0 (27-7-2020) =
|
417 |
+
* Export/import SSL error fixed
|
418 |
+
* JS error fixed
|
419 |
+
|
420 |
+
= 6.0.0 (28-7-2020) =
|
421 |
+
* Error fix for safari
|
422 |
+
* JS error fix for optimization
|
423 |
+
|
424 |
== Upgrade Notice ==
|
425 |
Please do update the WP VR to the latest version. Each update makes it sure your plugin is supporting all tour features.
|
admin/class-wpvr-admin.php
CHANGED
@@ -1011,17 +1011,6 @@ class Wpvr_Admin {
|
|
1011 |
$html .= '</div>';
|
1012 |
$html .= '</div>';
|
1013 |
|
1014 |
-
$html .= '<div class="single-shortcode gutenberg">';
|
1015 |
-
$html .= '<span class="shortcode-title">'.__('For Gutenberg:', 'wpvr').'</span>';
|
1016 |
-
|
1017 |
-
$html .= '<div class="field-wapper">';
|
1018 |
-
$html .= '<span>'.__('Select tour with this ID on WP VR block setting ','wpvr').'</span>';
|
1019 |
-
|
1020 |
-
$html .= '<div class="shortcode-field">';
|
1021 |
-
$html .= '<p class="copycode">'.$id.'</p>';
|
1022 |
-
$html .= '</div>';
|
1023 |
-
$html .= '</div>';
|
1024 |
-
$html .= '</div>';
|
1025 |
$html .= '</div>';
|
1026 |
$html .= '</div>';
|
1027 |
//=end shortcode area=
|
@@ -2460,18 +2449,6 @@ class Wpvr_Admin {
|
|
2460 |
|
2461 |
$html .= '</div>';
|
2462 |
$html .= '</div>';
|
2463 |
-
|
2464 |
-
$html .= '<div class="single-shortcode gutenberg">';
|
2465 |
-
$html .= '<span class="shortcode-title">'.__('For Gutenberg:', 'wpvr').'</span>';
|
2466 |
-
|
2467 |
-
$html .= '<div class="field-wapper">';
|
2468 |
-
$html .= '<span>'.__('Select tour with this ID on WP VR block setting ','wpvr').'</span>';
|
2469 |
-
|
2470 |
-
$html .= '<div class="shortcode-field">';
|
2471 |
-
$html .= '<p class="copycode">'.$id.'</p>';
|
2472 |
-
$html .= '</div>';
|
2473 |
-
$html .= '</div>';
|
2474 |
-
$html .= '</div>';
|
2475 |
$html .= '</div>';
|
2476 |
|
2477 |
$html .= '<script>';
|
1011 |
$html .= '</div>';
|
1012 |
$html .= '</div>';
|
1013 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1014 |
$html .= '</div>';
|
1015 |
$html .= '</div>';
|
1016 |
//=end shortcode area=
|
2449 |
|
2450 |
$html .= '</div>';
|
2451 |
$html .= '</div>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2452 |
$html .= '</div>';
|
2453 |
|
2454 |
$html .= '<script>';
|
admin/class-wpvr-ajax.php
CHANGED
@@ -1281,100 +1281,100 @@ class Wpvr_Ajax {
|
|
1281 |
die();
|
1282 |
}
|
1283 |
|
1284 |
-
|
1285 |
-
|
1286 |
-
wpvr_delete_temp_file();
|
1287 |
-
if ($_POST['fileurl']) {
|
1288 |
-
WP_Filesystem();
|
1289 |
-
$file_save_url = wp_upload_dir();
|
1290 |
-
$fileurl = $_POST['fileurl'];
|
1291 |
-
$attachment_id = $_POST['data_id'];
|
1292 |
-
$zip_file_path = get_attached_file( $attachment_id );
|
1293 |
-
$unzipfile = unzip_file($zip_file_path,$file_save_url['basedir'].'/wpvr/temp/');
|
1294 |
-
|
1295 |
-
if ( is_wp_error( $unzipfile ) ) {
|
1296 |
wpvr_delete_temp_file();
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
$new_data['preview'] = $media_get['message'];
|
1335 |
-
}
|
1336 |
-
else {
|
1337 |
-
wp_delete_post($new_post_id, true);
|
1338 |
-
wpvr_delete_temp_file();
|
1339 |
-
wp_send_json_error('Media transfer process failed');
|
1340 |
-
}
|
1341 |
-
}
|
1342 |
-
if ($new_data['panodata']) {
|
1343 |
-
|
1344 |
-
if ($new_data['panodata']["scene-list"]) {
|
1345 |
-
|
1346 |
-
foreach ($new_data['panodata']["scene-list"] as $key => $panoscenes) {
|
1347 |
-
if ($panoscenes["scene-attachment-url"]) {
|
1348 |
-
$scene_id = $panoscenes['scene-id'];
|
1349 |
-
$url = $file_save_url['baseurl'].'/wpvr/temp/'.$scene_id.'.jpg';
|
1350 |
-
$media_get = wpvr_handle_media_import($url, $new_post_id);
|
1351 |
-
if ($media_get['status'] == 'error') {
|
1352 |
-
wp_delete_post($new_post_id, true);
|
1353 |
-
wpvr_delete_temp_file();
|
1354 |
-
wp_send_json_error($media_get['message']);
|
1355 |
}
|
1356 |
-
|
1357 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1358 |
}
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1363 |
}
|
1364 |
-
}
|
1365 |
}
|
1366 |
-
}
|
1367 |
-
update_post_meta( $new_post_id, 'panodata', $new_data );
|
1368 |
-
wpvr_delete_temp_file();
|
1369 |
}
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
}
|
1376 |
-
die();
|
1377 |
-
}
|
1378 |
|
1379 |
/**
|
1380 |
* Video Preview show ajax function
|
1281 |
die();
|
1282 |
}
|
1283 |
|
1284 |
+
function wpvr_file_import() {
|
1285 |
+
set_time_limit(20000000000000000);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1286 |
wpvr_delete_temp_file();
|
1287 |
+
if ($_POST['fileurl']) {
|
1288 |
+
WP_Filesystem();
|
1289 |
+
$file_save_url = wp_upload_dir();
|
1290 |
+
$fileurl = $_POST['fileurl'];
|
1291 |
+
$attachment_id = $_POST['data_id'];
|
1292 |
+
$zip_file_path = get_attached_file( $attachment_id );
|
1293 |
+
$unzipfile = unzip_file($zip_file_path,$file_save_url['basedir'].'/wpvr/temp/');
|
1294 |
+
|
1295 |
+
if ( is_wp_error( $unzipfile ) ) {
|
1296 |
+
wpvr_delete_temp_file();
|
1297 |
+
wp_send_json_error('Failed to unzip file');
|
1298 |
+
}
|
1299 |
+
$result = glob($file_save_url["basedir"].'/wpvr/temp/*.json');
|
1300 |
+
if (!$result) {
|
1301 |
+
wpvr_delete_temp_file();
|
1302 |
+
wp_send_json_error('Tour json file not found');
|
1303 |
+
}
|
1304 |
+
$tour_json = $result[0];
|
1305 |
+
$arrContextOptions=array(
|
1306 |
+
"ssl"=>array(
|
1307 |
+
"verify_peer"=>false,
|
1308 |
+
"verify_peer_name"=>false,
|
1309 |
+
),
|
1310 |
+
);
|
1311 |
+
$getfile = file_get_contents($tour_json, false, stream_context_create($arrContextOptions));
|
1312 |
+
$file_content = json_decode($getfile, true);
|
1313 |
+
|
1314 |
+
$new_title = $file_content['title'];
|
1315 |
+
$new_data = $file_content['data'];
|
1316 |
+
$new_post_id = wp_insert_post( array(
|
1317 |
+
'post_title' => $new_title,
|
1318 |
+
'post_type' => 'wpvr_item',
|
1319 |
+
'post_status' => 'publish',
|
1320 |
+
) );
|
1321 |
+
if ($new_post_id) {
|
1322 |
+
if ($new_data['panoid']) {
|
1323 |
+
$new_data['panoid'] = 'pano'.$new_post_id;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1324 |
}
|
1325 |
+
if ($new_data['preview']) {
|
1326 |
+
$preview_url = $file_save_url['baseurl'].'/wpvr/temp/scene_preview.jpg';
|
1327 |
+
$media_get = wpvr_handle_media_import($preview_url, $new_post_id);
|
1328 |
+
if ($media_get['status'] == 'error') {
|
1329 |
+
wp_delete_post($new_post_id, true);
|
1330 |
+
wpvr_delete_temp_file();
|
1331 |
+
wp_send_json_error($media_get['message']);
|
1332 |
+
}
|
1333 |
+
elseif ($media_get['status'] == 'success') {
|
1334 |
+
$new_data['preview'] = $media_get['message'];
|
1335 |
+
}
|
1336 |
+
else {
|
1337 |
+
wp_delete_post($new_post_id, true);
|
1338 |
+
wpvr_delete_temp_file();
|
1339 |
+
wp_send_json_error('Media transfer process failed');
|
1340 |
+
}
|
1341 |
}
|
1342 |
+
if ($new_data['panodata']) {
|
1343 |
+
|
1344 |
+
if ($new_data['panodata']["scene-list"]) {
|
1345 |
+
|
1346 |
+
foreach ($new_data['panodata']["scene-list"] as $key => $panoscenes) {
|
1347 |
+
if ($panoscenes["scene-attachment-url"]) {
|
1348 |
+
$scene_id = $panoscenes['scene-id'];
|
1349 |
+
$url = $file_save_url['baseurl'].'/wpvr/temp/'.$scene_id.'.jpg';
|
1350 |
+
$media_get = wpvr_handle_media_import($url, $new_post_id);
|
1351 |
+
if ($media_get['status'] == 'error') {
|
1352 |
+
wp_delete_post($new_post_id, true);
|
1353 |
+
wpvr_delete_temp_file();
|
1354 |
+
wp_send_json_error($media_get['message']);
|
1355 |
+
}
|
1356 |
+
elseif ($media_get['status'] == 'success') {
|
1357 |
+
$new_data['panodata']["scene-list"][$key]['scene-attachment-url'] = $media_get['message'];
|
1358 |
+
}
|
1359 |
+
else {
|
1360 |
+
wp_delete_post($new_post_id, true);
|
1361 |
+
wpvr_delete_temp_file();
|
1362 |
+
wp_send_json_error('Media transfer process failed');
|
1363 |
+
}
|
1364 |
+
}
|
1365 |
+
}
|
1366 |
+
}
|
1367 |
+
update_post_meta( $new_post_id, 'panodata', $new_data );
|
1368 |
+
wpvr_delete_temp_file();
|
1369 |
}
|
|
|
1370 |
}
|
|
|
|
|
|
|
1371 |
}
|
1372 |
+
else {
|
1373 |
+
wpvr_delete_temp_file();
|
1374 |
+
wp_send_json_error('No file found to import');
|
1375 |
+
}
|
1376 |
+
die();
|
1377 |
}
|
|
|
|
|
1378 |
|
1379 |
/**
|
1380 |
* Video Preview show ajax function
|
admin/css/wpvr-admin.css
CHANGED
@@ -3,7 +3,9 @@
|
|
3 |
* included in this file.
|
4 |
*/
|
5 |
|
6 |
-
|
|
|
|
|
7 |
.wpvr_gt_settings_ruler {
|
8 |
content: "";
|
9 |
display: block;
|
@@ -250,12 +252,13 @@ div.custom-tooltip:hover span:after {
|
|
250 |
left: 50%;
|
251 |
transform: translate(-50%, -50%);
|
252 |
z-index: 99;
|
253 |
-
width:
|
254 |
-
|
255 |
overflow: auto;
|
256 |
background: #fff;
|
257 |
border-radius: 5px;
|
258 |
}
|
|
|
259 |
.icons-selector .selector {
|
260 |
width: 100%;
|
261 |
}
|
@@ -295,10 +298,10 @@ div.custom-tooltip:hover span:after {
|
|
295 |
color: red;
|
296 |
line-height: 26px;
|
297 |
position: absolute;
|
298 |
-
top:
|
299 |
-
right:
|
300 |
text-align: center;
|
301 |
-
z-index:
|
302 |
font-size: 13px;
|
303 |
border-radius: 100%;
|
304 |
cursor: pointer;
|
@@ -451,9 +454,9 @@ div.custom-tooltip:hover span:after {
|
|
451 |
.pnlm-container {
|
452 |
width: 100%!important;
|
453 |
}
|
454 |
-
div.custom-tooltip span {
|
455 |
width: 420px!important;
|
456 |
-
}
|
457 |
.custom-tooltip p {
|
458 |
width: 420px;
|
459 |
}
|
@@ -464,10 +467,11 @@ div.custom-tooltip:hover span:after {
|
|
464 |
}
|
465 |
|
466 |
}
|
|
|
467 |
@media (max-width: 991px){
|
468 |
-
div.custom-tooltip span {
|
469 |
width: 540px!important;
|
470 |
-
}
|
471 |
.custom-tooltip p {
|
472 |
width: 530px;
|
473 |
}
|
@@ -669,6 +673,11 @@ div.custom-tooltip:hover span:after {
|
|
669 |
display: block !important;
|
670 |
}
|
671 |
|
|
|
|
|
|
|
|
|
|
|
672 |
.pano-alert {
|
673 |
position: absolute;
|
674 |
top: 50%;
|
@@ -1187,7 +1196,7 @@ div.custom-tooltip:hover span:after {
|
|
1187 |
background: #fff;
|
1188 |
border-radius: 5px;
|
1189 |
margin-top: 20px;
|
1190 |
-
width:
|
1191 |
}
|
1192 |
.wpvr-use-shortcode .area-title {
|
1193 |
width: 100%;
|
@@ -1200,17 +1209,28 @@ div.custom-tooltip:hover span:after {
|
|
1200 |
}
|
1201 |
.wpvr-use-shortcode .shortcode-wrapper {
|
1202 |
padding: 0 20px 20px 20px;
|
|
|
|
|
1203 |
}
|
1204 |
.wpvr-use-shortcode .single-shortcode {
|
1205 |
width: 100%;
|
|
|
1206 |
background: #f6f6f8;
|
1207 |
padding: 12px 15px 15px 15px;
|
1208 |
border-radius: 5px;
|
1209 |
margin-top: 20px;
|
1210 |
}
|
1211 |
|
1212 |
-
.wpvr-use-shortcode .single-shortcode
|
1213 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1214 |
}
|
1215 |
.wpvr-use-shortcode .shortcode-title {
|
1216 |
font-size: 16px;
|
@@ -1231,13 +1251,14 @@ div.custom-tooltip:hover span:after {
|
|
1231 |
padding: 8px 10px;
|
1232 |
border-radius: 5px;
|
1233 |
margin-top: 10px;
|
1234 |
-
width:
|
1235 |
|
1236 |
}
|
1237 |
.wpvr-use-shortcode .single-shortcode .shortcode-field p {
|
1238 |
margin: 0;
|
1239 |
font-size: 16px;
|
1240 |
font-weight: 500;
|
|
|
1241 |
}
|
1242 |
.wpvr-use-shortcode .single-shortcode .shortcode-field .wpvr-copy-shortcode {
|
1243 |
background: #201cfe;
|
@@ -1970,13 +1991,16 @@ button.delete-hotspot{
|
|
1970 |
.wpvr-product-container .wpvr-pr-right-block a h2:before {
|
1971 |
display: none;
|
1972 |
}
|
|
|
|
|
|
|
1973 |
.wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline {
|
1974 |
border: none!important;
|
1975 |
padding: 0!important;
|
1976 |
-
overflow: auto;
|
1977 |
text-align: left!important;
|
1978 |
border-radius: 0!important;
|
1979 |
}
|
|
|
1980 |
.wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline .amount {
|
1981 |
display: inline-block;
|
1982 |
margin-bottom: 7px;
|
@@ -1985,24 +2009,25 @@ button.delete-hotspot{
|
|
1985 |
text-decoration: line-through;
|
1986 |
opacity: 0.5;
|
1987 |
}
|
1988 |
-
.wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline .
|
1989 |
-
width: 170px;
|
1990 |
font-size: 16px;
|
1991 |
text-align: center;
|
1992 |
border-radius: 5px;
|
1993 |
background-color: rgb(32, 28, 254);
|
1994 |
-
height: 46px;
|
1995 |
-
line-height: 46px;
|
1996 |
color: #fff;
|
1997 |
-
display: block;
|
1998 |
-
padding:
|
1999 |
box-shadow: none;
|
2000 |
margin-top: auto;
|
2001 |
transition: all 0.3s ease;
|
2002 |
text-decoration: none;
|
|
|
|
|
|
|
2003 |
}
|
2004 |
|
2005 |
|
|
|
2006 |
/*-----------------responsive style------------------*/
|
2007 |
@media (max-width: 1760px) and (min-width: 1701px){
|
2008 |
.rex-pano-tab-content .general .inner-nav-content .inner-single-content .color-icon img {
|
@@ -2044,6 +2069,13 @@ button.delete-hotspot{
|
|
2044 |
width: calc(100% - 630px);
|
2045 |
}
|
2046 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2047 |
.rex-pano-tab-content .general .general-inner-tab .inner-nav li > span {
|
2048 |
flex-flow: column;
|
2049 |
text-align: center;
|
@@ -2096,6 +2128,14 @@ button.delete-hotspot{
|
|
2096 |
height: 290px;
|
2097 |
}
|
2098 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2099 |
.rex-pano-tabs {
|
2100 |
display: block;
|
2101 |
margin-left: 0;
|
@@ -2151,6 +2191,14 @@ button.delete-hotspot{
|
|
2151 |
margin-right: 0;
|
2152 |
}
|
2153 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2154 |
.rex-pano-tabs .rex-pano-tab-nav.main-nav li span {
|
2155 |
padding: 0 10px;
|
2156 |
}
|
@@ -2203,7 +2251,7 @@ button.delete-hotspot{
|
|
2203 |
.preview-btn-area #panolenspreview {
|
2204 |
float: none;
|
2205 |
}
|
2206 |
-
|
2207 |
|
2208 |
}
|
2209 |
|
3 |
* included in this file.
|
4 |
*/
|
5 |
|
6 |
+
/* button.ff-btn.ff-btn-submit.ff-btn-md {
|
7 |
+
display: none;
|
8 |
+
} */
|
9 |
.wpvr_gt_settings_ruler {
|
10 |
content: "";
|
11 |
display: block;
|
252 |
left: 50%;
|
253 |
transform: translate(-50%, -50%);
|
254 |
z-index: 99;
|
255 |
+
width: 90%;
|
256 |
+
height: 293px;
|
257 |
overflow: auto;
|
258 |
background: #fff;
|
259 |
border-radius: 5px;
|
260 |
}
|
261 |
+
|
262 |
.icons-selector .selector {
|
263 |
width: 100%;
|
264 |
}
|
298 |
color: red;
|
299 |
line-height: 26px;
|
300 |
position: absolute;
|
301 |
+
top: 43px;
|
302 |
+
right: 26px;
|
303 |
text-align: center;
|
304 |
+
z-index: 999;
|
305 |
font-size: 13px;
|
306 |
border-radius: 100%;
|
307 |
cursor: pointer;
|
454 |
.pnlm-container {
|
455 |
width: 100%!important;
|
456 |
}
|
457 |
+
/* div.custom-tooltip span {
|
458 |
width: 420px!important;
|
459 |
+
} */
|
460 |
.custom-tooltip p {
|
461 |
width: 420px;
|
462 |
}
|
467 |
}
|
468 |
|
469 |
}
|
470 |
+
|
471 |
@media (max-width: 991px){
|
472 |
+
/* div.custom-tooltip span {
|
473 |
width: 540px!important;
|
474 |
+
} */
|
475 |
.custom-tooltip p {
|
476 |
width: 530px;
|
477 |
}
|
673 |
display: block !important;
|
674 |
}
|
675 |
|
676 |
+
.rex-pano-sub-tabs .rex-pano-tab.clearfix,
|
677 |
+
.rex-pano-tabs .rex-pano-tab.clearfix {
|
678 |
+
overflow: initial;
|
679 |
+
}
|
680 |
+
|
681 |
.pano-alert {
|
682 |
position: absolute;
|
683 |
top: 50%;
|
1196 |
background: #fff;
|
1197 |
border-radius: 5px;
|
1198 |
margin-top: 20px;
|
1199 |
+
width: 100%;
|
1200 |
}
|
1201 |
.wpvr-use-shortcode .area-title {
|
1202 |
width: 100%;
|
1209 |
}
|
1210 |
.wpvr-use-shortcode .shortcode-wrapper {
|
1211 |
padding: 0 20px 20px 20px;
|
1212 |
+
display: flex;
|
1213 |
+
flex-flow: row wrap;
|
1214 |
}
|
1215 |
.wpvr-use-shortcode .single-shortcode {
|
1216 |
width: 100%;
|
1217 |
+
flex: 1;
|
1218 |
background: #f6f6f8;
|
1219 |
padding: 12px 15px 15px 15px;
|
1220 |
border-radius: 5px;
|
1221 |
margin-top: 20px;
|
1222 |
}
|
1223 |
|
1224 |
+
.wpvr-use-shortcode .shortcode-wrapper.col2 .single-shortcode {
|
1225 |
+
width: calc(50% - 10px);
|
1226 |
+
flex: 1;
|
1227 |
+
margin-right: 10px;
|
1228 |
+
}
|
1229 |
+
|
1230 |
+
.wpvr-use-shortcode .shortcode-wrapper.col2 .single-shortcode.gutenberg {
|
1231 |
+
display: block;
|
1232 |
+
margin-right: 0;
|
1233 |
+
margin-left: 10px;
|
1234 |
}
|
1235 |
.wpvr-use-shortcode .shortcode-title {
|
1236 |
font-size: 16px;
|
1251 |
padding: 8px 10px;
|
1252 |
border-radius: 5px;
|
1253 |
margin-top: 10px;
|
1254 |
+
min-width: 183px;
|
1255 |
|
1256 |
}
|
1257 |
.wpvr-use-shortcode .single-shortcode .shortcode-field p {
|
1258 |
margin: 0;
|
1259 |
font-size: 16px;
|
1260 |
font-weight: 500;
|
1261 |
+
word-break: break-all;
|
1262 |
}
|
1263 |
.wpvr-use-shortcode .single-shortcode .shortcode-field .wpvr-copy-shortcode {
|
1264 |
background: #201cfe;
|
1991 |
.wpvr-product-container .wpvr-pr-right-block a h2:before {
|
1992 |
display: none;
|
1993 |
}
|
1994 |
+
.wpvr-product-container .wpvr-pr-right-block .wpvr-cart-wrap {
|
1995 |
+
display: block;
|
1996 |
+
}
|
1997 |
.wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline {
|
1998 |
border: none!important;
|
1999 |
padding: 0!important;
|
|
|
2000 |
text-align: left!important;
|
2001 |
border-radius: 0!important;
|
2002 |
}
|
2003 |
+
|
2004 |
.wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline .amount {
|
2005 |
display: inline-block;
|
2006 |
margin-bottom: 7px;
|
2009 |
text-decoration: line-through;
|
2010 |
opacity: 0.5;
|
2011 |
}
|
2012 |
+
.wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline a.button {
|
|
|
2013 |
font-size: 16px;
|
2014 |
text-align: center;
|
2015 |
border-radius: 5px;
|
2016 |
background-color: rgb(32, 28, 254);
|
|
|
|
|
2017 |
color: #fff;
|
2018 |
+
display: inline-block;
|
2019 |
+
padding: 8px 10px;
|
2020 |
box-shadow: none;
|
2021 |
margin-top: auto;
|
2022 |
transition: all 0.3s ease;
|
2023 |
text-decoration: none;
|
2024 |
+
white-space: normal;
|
2025 |
+
line-height: normal;
|
2026 |
+
border-color: transparent;
|
2027 |
}
|
2028 |
|
2029 |
|
2030 |
+
|
2031 |
/*-----------------responsive style------------------*/
|
2032 |
@media (max-width: 1760px) and (min-width: 1701px){
|
2033 |
.rex-pano-tab-content .general .inner-nav-content .inner-single-content .color-icon img {
|
2069 |
width: calc(100% - 630px);
|
2070 |
}
|
2071 |
|
2072 |
+
#custom-ifram {
|
2073 |
+
height: 278px;
|
2074 |
+
}
|
2075 |
+
.iframe-wrapper #cross {
|
2076 |
+
top: 47px;
|
2077 |
+
right: 20px;
|
2078 |
+
}
|
2079 |
.rex-pano-tab-content .general .general-inner-tab .inner-nav li > span {
|
2080 |
flex-flow: column;
|
2081 |
text-align: center;
|
2128 |
height: 290px;
|
2129 |
}
|
2130 |
|
2131 |
+
#custom-ifram {
|
2132 |
+
height: 228px;
|
2133 |
+
}
|
2134 |
+
.iframe-wrapper #cross {
|
2135 |
+
top: 21px;
|
2136 |
+
right: 17px;
|
2137 |
+
}
|
2138 |
+
|
2139 |
.rex-pano-tabs {
|
2140 |
display: block;
|
2141 |
margin-left: 0;
|
2191 |
margin-right: 0;
|
2192 |
}
|
2193 |
|
2194 |
+
#custom-ifram {
|
2195 |
+
height: 296px;
|
2196 |
+
}
|
2197 |
+
.iframe-wrapper #cross {
|
2198 |
+
top: 24px;
|
2199 |
+
right: 20px;
|
2200 |
+
}
|
2201 |
+
|
2202 |
.rex-pano-tabs .rex-pano-tab-nav.main-nav li span {
|
2203 |
padding: 0 10px;
|
2204 |
}
|
2251 |
.preview-btn-area #panolenspreview {
|
2252 |
float: none;
|
2253 |
}
|
2254 |
+
|
2255 |
|
2256 |
}
|
2257 |
|
admin/js/wpvr-admin.js
CHANGED
@@ -1149,7 +1149,10 @@
|
|
1149 |
}
|
1150 |
}
|
1151 |
}
|
1152 |
-
|
|
|
|
|
|
|
1153 |
|
1154 |
});
|
1155 |
})(jQuery);
|
1149 |
}
|
1150 |
}
|
1151 |
}
|
1152 |
+
}
|
1153 |
+
|
1154 |
+
|
1155 |
+
|
1156 |
|
1157 |
});
|
1158 |
})(jQuery);
|
admin/partials/wpvr-meta-box-builder-display.php
CHANGED
@@ -523,6 +523,10 @@ var scenes = response[1];
|
|
523 |
jQuery("#custom-ifram").html(argst);
|
524 |
jQuery("#custom-ifram").fadeToggle();
|
525 |
jQuery(".iframe-wrapper").toggleClass("show-modal");
|
|
|
|
|
|
|
|
|
526 |
}
|
527 |
|
528 |
function wpvrtooltip(hotSpotDiv, args) {
|
523 |
jQuery("#custom-ifram").html(argst);
|
524 |
jQuery("#custom-ifram").fadeToggle();
|
525 |
jQuery(".iframe-wrapper").toggleClass("show-modal");
|
526 |
+
jQuery('button.ff-btn.ff-btn-submit.ff-btn-md').prop('disabled', true);
|
527 |
+
|
528 |
+
//------add to cart button------
|
529 |
+
jQuery('.wpvr-product-container p.add_to_cart_inline a.button').wrap('<span class="wpvr-cart-wrap"></span>');
|
530 |
}
|
531 |
|
532 |
function wpvrtooltip(hotSpotDiv, args) {
|
admin/partials/wpvr_documentation.php
CHANGED
@@ -173,7 +173,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|
173 |
<div id="tab2" class="block-wrapper">
|
174 |
<div class="video-wrapper">
|
175 |
<div class="video-left">
|
176 |
-
<iframe src="https://www.youtube.com/embed/videoseries?list=
|
177 |
</div>
|
178 |
|
179 |
<div class="video-right">
|
173 |
<div id="tab2" class="block-wrapper">
|
174 |
<div class="video-wrapper">
|
175 |
<div class="video-left">
|
176 |
+
<iframe src="https://www.youtube.com/embed/videoseries?list=PLelDqLncNWcUndi1NkXJh2BH62OYmIayt" width="100%" height="100%" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
177 |
</div>
|
178 |
|
179 |
<div class="video-right">
|
public/class-wpvr-public.php
CHANGED
@@ -133,7 +133,7 @@ class Wpvr_Public {
|
|
133 |
* between the defined hooks and the functions defined in this
|
134 |
* class.
|
135 |
*/
|
136 |
-
|
137 |
global $wp;
|
138 |
$wpvr_script_control = get_option('wpvr_script_control');
|
139 |
$wpvr_script_list = get_option('wpvr_script_list');
|
@@ -162,8 +162,10 @@ class Wpvr_Public {
|
|
162 |
wp_enqueue_script('videojs-js', plugin_dir_url( __FILE__ ) . 'js/video.js', array(), true);
|
163 |
wp_enqueue_script('panelliumvid-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/videojs-pannellum-plugin.js', array(), true);
|
164 |
wp_enqueue_script( 'owl-js', plugin_dir_url( __FILE__ ) . 'js/owl.carousel.js', array( 'jquery' ), false );
|
165 |
-
wp_enqueue_script(
|
|
|
166 |
}
|
|
|
167 |
}
|
168 |
|
169 |
/**
|
@@ -529,6 +531,7 @@ class Wpvr_Public {
|
|
529 |
|
530 |
$hotspots = array();
|
531 |
|
|
|
532 |
foreach ($hotspot_datas as $hotspot_data) {
|
533 |
|
534 |
$status = get_option( 'wpvr_edd_license_status' );
|
@@ -559,8 +562,6 @@ class Wpvr_Public {
|
|
559 |
|
560 |
if (!$hotspot_content) $hotspot_content = $hotspot_data["hotspot-content"];
|
561 |
|
562 |
-
|
563 |
-
|
564 |
$hotspot_info = array(
|
565 |
"text"=>$hotspot_data["hotspot-title"],
|
566 |
"pitch"=>$hotspot_data["hotspot-pitch"],
|
@@ -575,6 +576,9 @@ class Wpvr_Public {
|
|
575 |
"targetYaw"=>(float)$hotspot_scene_yaw,
|
576 |
'hotspot_type' => $hotspot_data['hotspot-type']
|
577 |
);
|
|
|
|
|
|
|
578 |
if ($hotspot_data["hotspot-customclass"] == 'none' || $hotspot_data["hotspot-customclass"] == '') {
|
579 |
unset($hotspot_info["cssClass"]);
|
580 |
}
|
@@ -584,6 +588,8 @@ class Wpvr_Public {
|
|
584 |
}
|
585 |
array_push($hotspots, $hotspot_info);
|
586 |
}
|
|
|
|
|
587 |
$scene_info = array();
|
588 |
$scene_info = array("type"=>$panoscenes["scene-type"],"panorama"=>$panoscenes["scene-attachment-url"],"pitch"=>$default_scene_pitch,"maxPitch"=>$scene_max_pitch,"minPitch"=>$scene_min_pitch,"maxYaw"=>$scene_max_yaw,"minYaw"=>$scene_min_yaw,"yaw"=>$default_scene_yaw,"hfov"=>$default_zoom,"maxHfov"=>$max_zoom,"minHfov"=>$min_zoom,"title"=>$scene_ititle,"author"=>$scene_author, "authorURL"=>$scene_author_url, "vaov"=>$scene_vaov, "haov"=>$scene_haov, "vOffset"=>$scene_vertical_offset, "hotSpots"=>$hotspots);
|
589 |
|
@@ -774,28 +780,12 @@ class Wpvr_Public {
|
|
774 |
|
775 |
}
|
776 |
}
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
// else {
|
784 |
-
// $html .= '<div id="pano'.$id.'" class="pano-wrap" style="text-align:center;">';
|
785 |
-
// }
|
786 |
-
//
|
787 |
-
// }
|
788 |
-
// else {
|
789 |
-
// if ($radius) {
|
790 |
-
// $html .= '<div id="pano'.$id.'" class="pano-wrap vrembed" style=" text-align:center; height: '.$height.'; border-radius:'.$radius.'; direction:ltr;" >';
|
791 |
-
// }
|
792 |
-
// else {
|
793 |
-
// $html .= '<div id="pano'.$id.'" class="pano-wrap vrembed" style=" text-align:center; height: '.$height.'; direction:ltr;" >';
|
794 |
-
// }
|
795 |
-
//
|
796 |
-
// }
|
797 |
-
// }
|
798 |
-
// }
|
799 |
else {
|
800 |
if ($radius) {
|
801 |
$html .= '<div id="pano'.$id.'" class="pano-wrap" style=" text-align:center; max-width:100%; width: '.$width.'; height: '.$height.'; margin: 0 auto; border-radius:'.$radius.'; direction:ltr;">';
|
@@ -937,25 +927,82 @@ class Wpvr_Public {
|
|
937 |
}
|
938 |
}
|
939 |
|
940 |
-
|
941 |
-
$html .= '<div class="wpvr-hotspot-tweak-contents" style="display: none">';
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
|
|
|
|
|
|
|
|
|
|
946 |
$html .= '</div>';
|
947 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
948 |
$html .= '</div>';
|
|
|
949 |
$html .= '</div>';
|
950 |
|
951 |
|
952 |
|
953 |
//script started
|
954 |
$html .= '<script>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
955 |
$html .= 'var response = '.$response.';';
|
956 |
$html .= 'var scenes = response[1];';
|
957 |
$html .= 'if(scenes) {';
|
958 |
-
|
959 |
$html .= 'for(var i in scenedata) {';
|
960 |
$html .= 'var scenehotspot = scenedata[i].hotSpots;';
|
961 |
$html .= 'for(var i = 0; i < scenehotspot.length; i++) {';
|
@@ -1108,49 +1155,7 @@ class Wpvr_Public {
|
|
1108 |
';
|
1109 |
|
1110 |
|
1111 |
-
if (isset($postdata['bg_music'])) {
|
1112 |
-
if ($bg_music == 'on') {
|
1113 |
-
$html .= '
|
1114 |
-
var x'.$id.' = document.getElementById("vrAudio'.$id.'");
|
1115 |
-
|
1116 |
-
var playing'.$id.' = false;
|
1117 |
-
|
1118 |
-
function playPause'.$id.'() {
|
1119 |
-
|
1120 |
-
if (playing'.$id.') {
|
1121 |
-
jQuery("#vr-volume'.$id.'").removeClass("fas fa-volume-up");
|
1122 |
-
jQuery("#vr-volume'.$id.'").addClass("fas fa-volume-mute");
|
1123 |
-
x'.$id.'.pause();
|
1124 |
-
playing'.$id.' = false;
|
1125 |
-
|
1126 |
-
}
|
1127 |
-
else {
|
1128 |
-
jQuery("#vr-volume'.$id.'").removeClass("fas fa-volume-mute");
|
1129 |
-
jQuery("#vr-volume'.$id.'").addClass("fas fa-volume-up");
|
1130 |
-
x'.$id.'.play();
|
1131 |
-
playing'.$id.' = true;
|
1132 |
-
}
|
1133 |
-
}
|
1134 |
-
|
1135 |
-
function audionEnd'.$id.'() {
|
1136 |
-
playing'.$id.' = false;
|
1137 |
-
jQuery("#vr-volume'.$id.'").removeClass("fas fa-volume-up");
|
1138 |
-
jQuery("#vr-volume'.$id.'").addClass("fas fa-volume-mute");
|
1139 |
-
}
|
1140 |
-
';
|
1141 |
|
1142 |
-
if ($autoplay_bg_music == 'on') {
|
1143 |
-
$html .= '
|
1144 |
-
document.getElementById("pano'.$id.'").addEventListener("click", musicPlay'.$id.');
|
1145 |
-
function musicPlay'.$id.'() {
|
1146 |
-
playing'.$id.' = true;
|
1147 |
-
document.getElementById("vrAudio'.$id.'").play();
|
1148 |
-
document.getElementById("pano'.$id.'").removeEventListener("click", musicPlay'.$id.');
|
1149 |
-
}
|
1150 |
-
';
|
1151 |
-
}
|
1152 |
-
}
|
1153 |
-
}
|
1154 |
|
1155 |
if (!$autoload) {
|
1156 |
$html .= '
|
@@ -1172,6 +1177,7 @@ class Wpvr_Public {
|
|
1172 |
});';
|
1173 |
}
|
1174 |
|
|
|
1175 |
$html .= '</script>';
|
1176 |
//script end
|
1177 |
|
133 |
* between the defined hooks and the functions defined in this
|
134 |
* class.
|
135 |
*/
|
136 |
+
|
137 |
global $wp;
|
138 |
$wpvr_script_control = get_option('wpvr_script_control');
|
139 |
$wpvr_script_list = get_option('wpvr_script_list');
|
162 |
wp_enqueue_script('videojs-js', plugin_dir_url( __FILE__ ) . 'js/video.js', array(), true);
|
163 |
wp_enqueue_script('panelliumvid-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/videojs-pannellum-plugin.js', array(), true);
|
164 |
wp_enqueue_script( 'owl-js', plugin_dir_url( __FILE__ ) . 'js/owl.carousel.js', array( 'jquery' ), false );
|
165 |
+
wp_enqueue_script('jquery_cookie', 'https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js', array('jquery'), true);
|
166 |
+
wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/wpvr-public.js', array( 'jquery', 'jquery_cookie' ), $this->version, true );
|
167 |
}
|
168 |
+
|
169 |
}
|
170 |
|
171 |
/**
|
531 |
|
532 |
$hotspots = array();
|
533 |
|
534 |
+
|
535 |
foreach ($hotspot_datas as $hotspot_data) {
|
536 |
|
537 |
$status = get_option( 'wpvr_edd_license_status' );
|
562 |
|
563 |
if (!$hotspot_content) $hotspot_content = $hotspot_data["hotspot-content"];
|
564 |
|
|
|
|
|
565 |
$hotspot_info = array(
|
566 |
"text"=>$hotspot_data["hotspot-title"],
|
567 |
"pitch"=>$hotspot_data["hotspot-pitch"],
|
576 |
"targetYaw"=>(float)$hotspot_scene_yaw,
|
577 |
'hotspot_type' => $hotspot_data['hotspot-type']
|
578 |
);
|
579 |
+
|
580 |
+
$hotspot_info['URL'] = ($hotspot_data['hotspot-type'] === 'fluent_form' || $hotspot_data['hotspot-type'] === 'wc_product') ? '' : $hotspot_info['URL'];
|
581 |
+
|
582 |
if ($hotspot_data["hotspot-customclass"] == 'none' || $hotspot_data["hotspot-customclass"] == '') {
|
583 |
unset($hotspot_info["cssClass"]);
|
584 |
}
|
588 |
}
|
589 |
array_push($hotspots, $hotspot_info);
|
590 |
}
|
591 |
+
|
592 |
+
|
593 |
$scene_info = array();
|
594 |
$scene_info = array("type"=>$panoscenes["scene-type"],"panorama"=>$panoscenes["scene-attachment-url"],"pitch"=>$default_scene_pitch,"maxPitch"=>$scene_max_pitch,"minPitch"=>$scene_min_pitch,"maxYaw"=>$scene_max_yaw,"minYaw"=>$scene_min_yaw,"yaw"=>$default_scene_yaw,"hfov"=>$default_zoom,"maxHfov"=>$max_zoom,"minHfov"=>$min_zoom,"title"=>$scene_ititle,"author"=>$scene_author, "authorURL"=>$scene_author_url, "vaov"=>$scene_vaov, "haov"=>$scene_haov, "vOffset"=>$scene_vertical_offset, "hotSpots"=>$hotspots);
|
595 |
|
780 |
|
781 |
}
|
782 |
}
|
783 |
+
|
784 |
+
elseif ($width == 'embed') {
|
785 |
+
if (apply_filters('is_wpvr_embed_addon_premium', false)) {
|
786 |
+
$html .= '<div id="pano'.$id.'" class="pano-wrap vrembed" style=" text-align:center; direction:ltr;" >';
|
787 |
+
}
|
788 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
789 |
else {
|
790 |
if ($radius) {
|
791 |
$html .= '<div id="pano'.$id.'" class="pano-wrap" style=" text-align:center; max-width:100%; width: '.$width.'; height: '.$height.'; margin: 0 auto; border-radius:'.$radius.'; direction:ltr;">';
|
927 |
}
|
928 |
}
|
929 |
|
930 |
+
|
931 |
+
$html .= '<div class="wpvr-hotspot-tweak-contents-wrapper" style="display: none">';
|
932 |
+
$html .= '<i class="fa fa-times cross"></i>';
|
933 |
+
$html .= '<div class="wpvr-hotspot-tweak-contents-flex">';
|
934 |
+
$html .= '<div class="wpvr-hotspot-tweak-contents">';
|
935 |
+
ob_start();
|
936 |
+
do_action('wpvr_hotspot_tweak_contents', $scene_data);
|
937 |
+
$hotspot_content = ob_get_clean();
|
938 |
+
$html .= $hotspot_content;
|
939 |
+
$html .= '</div>';
|
940 |
+
$html .= '</div>';
|
941 |
$html .= '</div>';
|
942 |
+
|
943 |
+
$html .= '<div class="custom-ifram-wrapper" style="display: none;">';
|
944 |
+
$html .= '<i class="fa fa-times cross"></i>';
|
945 |
+
|
946 |
+
$html .= '<div class="custom-ifram-flex">';
|
947 |
+
$html .= '<div class="custom-ifram">';
|
948 |
+
$html .= '</div>';
|
949 |
+
$html .= '</div>';
|
950 |
$html .= '</div>';
|
951 |
+
|
952 |
$html .= '</div>';
|
953 |
|
954 |
|
955 |
|
956 |
//script started
|
957 |
$html .= '<script>';
|
958 |
+
if (isset($postdata['bg_music'])) {
|
959 |
+
if ($bg_music == 'on') {
|
960 |
+
$html .= '
|
961 |
+
var x'.$id.' = document.getElementById("vrAudio'.$id.'");
|
962 |
+
|
963 |
+
var playing'.$id.' = false;
|
964 |
+
|
965 |
+
function playPause'.$id.'() {
|
966 |
+
|
967 |
+
if (playing'.$id.') {
|
968 |
+
jQuery("#vr-volume'.$id.'").removeClass("fas fa-volume-up");
|
969 |
+
jQuery("#vr-volume'.$id.'").addClass("fas fa-volume-mute");
|
970 |
+
x'.$id.'.pause();
|
971 |
+
playing'.$id.' = false;
|
972 |
+
|
973 |
+
}
|
974 |
+
else {
|
975 |
+
jQuery("#vr-volume'.$id.'").removeClass("fas fa-volume-mute");
|
976 |
+
jQuery("#vr-volume'.$id.'").addClass("fas fa-volume-up");
|
977 |
+
x'.$id.'.play();
|
978 |
+
playing'.$id.' = true;
|
979 |
+
}
|
980 |
+
}
|
981 |
+
|
982 |
+
function audionEnd'.$id.'() {
|
983 |
+
playing'.$id.' = false;
|
984 |
+
jQuery("#vr-volume'.$id.'").removeClass("fas fa-volume-up");
|
985 |
+
jQuery("#vr-volume'.$id.'").addClass("fas fa-volume-mute");
|
986 |
+
}
|
987 |
+
';
|
988 |
+
|
989 |
+
if ($autoplay_bg_music == 'on') {
|
990 |
+
$html .= '
|
991 |
+
document.getElementById("pano'.$id.'").addEventListener("click", musicPlay'.$id.');
|
992 |
+
function musicPlay'.$id.'() {
|
993 |
+
playing'.$id.' = true;
|
994 |
+
document.getElementById("vrAudio'.$id.'").play();
|
995 |
+
document.getElementById("pano'.$id.'").removeEventListener("click", musicPlay'.$id.');
|
996 |
+
}
|
997 |
+
';
|
998 |
+
}
|
999 |
+
}
|
1000 |
+
}
|
1001 |
+
$html .= 'jQuery(document).ready(function() {';
|
1002 |
$html .= 'var response = '.$response.';';
|
1003 |
$html .= 'var scenes = response[1];';
|
1004 |
$html .= 'if(scenes) {';
|
1005 |
+
$html .= 'var scenedata = scenes.scenes;';
|
1006 |
$html .= 'for(var i in scenedata) {';
|
1007 |
$html .= 'var scenehotspot = scenedata[i].hotSpots;';
|
1008 |
$html .= 'for(var i = 0; i < scenehotspot.length; i++) {';
|
1155 |
';
|
1156 |
|
1157 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1158 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1159 |
|
1160 |
if (!$autoload) {
|
1161 |
$html .= '
|
1177 |
});';
|
1178 |
}
|
1179 |
|
1180 |
+
$html .= '});';
|
1181 |
$html .= '</script>';
|
1182 |
//script end
|
1183 |
|
public/css/wpvr-public.css
CHANGED
@@ -257,9 +257,10 @@ div.pnlm-hotspot-base.far:before{
|
|
257 |
max-width: 100vw !important;
|
258 |
}
|
259 |
|
|
|
260 |
.vrembed {
|
261 |
width: 100%!important;
|
262 |
-
height:
|
263 |
position: fixed;
|
264 |
left: 0;
|
265 |
top: 0;
|
@@ -295,6 +296,7 @@ div.custom-tooltip span {
|
|
295 |
border-radius: 3px;
|
296 |
background-color: #fff;
|
297 |
color: #000;
|
|
|
298 |
text-align: center;
|
299 |
padding: 5px 10px;
|
300 |
cursor: default;
|
@@ -302,6 +304,7 @@ div.custom-tooltip span {
|
|
302 |
bottom: 40px!important;
|
303 |
transform: translateX(-50%);
|
304 |
min-width: 300px;
|
|
|
305 |
}
|
306 |
div.custom-tooltip span p {
|
307 |
max-height: 250px;
|
@@ -334,26 +337,40 @@ div.custom-tooltip:hover span:after {
|
|
334 |
margin: 0 50%;
|
335 |
}
|
336 |
|
337 |
-
|
338 |
position: absolute;
|
339 |
-
top:
|
|
|
340 |
left: 50%;
|
341 |
-
transform:
|
342 |
z-index: 99;
|
343 |
width: 80%;
|
344 |
-
max-
|
345 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
346 |
background: #fff;
|
347 |
border-radius: 5px;
|
348 |
}
|
349 |
|
|
|
|
|
|
|
|
|
|
|
350 |
|
351 |
.pano-wrap:before {
|
352 |
content: "";
|
353 |
position: absolute;
|
354 |
left: 0;
|
355 |
top: 0;
|
356 |
-
background: rgba(0,0,0,0.
|
357 |
width: 100%;
|
358 |
height: 100%;
|
359 |
z-index: 99;
|
@@ -373,16 +390,19 @@ div.custom-ifram {
|
|
373 |
color: red;
|
374 |
line-height: 26px;
|
375 |
position: absolute;
|
376 |
-
top:
|
377 |
-
right:
|
378 |
text-align: center;
|
379 |
z-index: 99;
|
380 |
font-size: 13px;
|
381 |
border-radius: 100%;
|
|
|
382 |
cursor: pointer;
|
383 |
opacity: 0;
|
384 |
visibility: hidden;
|
385 |
transition: all 0.4s ease;
|
|
|
|
|
386 |
}
|
387 |
.pano-wrap.show-modal .cross {
|
388 |
opacity: 1;
|
@@ -459,7 +479,7 @@ div.custom-ifram {
|
|
459 |
}
|
460 |
.wpvr-product-container .wpvr-pr-left-block .woocommerce-product-gallery__image img {
|
461 |
margin: 0;
|
462 |
-
max-width:
|
463 |
width: 100%;
|
464 |
height: auto;
|
465 |
}
|
@@ -485,7 +505,6 @@ div.custom-ifram {
|
|
485 |
.wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline {
|
486 |
border: none!important;
|
487 |
padding: 0!important;
|
488 |
-
overflow: auto;
|
489 |
text-align: left;
|
490 |
border-radius: 0;
|
491 |
}
|
@@ -497,10 +516,14 @@ div.custom-ifram {
|
|
497 |
text-decoration: line-through;
|
498 |
opacity: 0.5;
|
499 |
}
|
500 |
-
.wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline .
|
501 |
display: block;
|
502 |
-
|
|
|
503 |
font-size: 16px;
|
|
|
|
|
|
|
504 |
}
|
505 |
|
506 |
|
@@ -511,13 +534,13 @@ div.custom-ifram {
|
|
511 |
height: 500px!important;
|
512 |
}
|
513 |
.pnlm-container.vrembed {
|
514 |
-
height:
|
515 |
}
|
516 |
.custom-ifram iframe {
|
517 |
height: 300px;
|
518 |
}
|
519 |
div.custom-ifram {
|
520 |
-
width:
|
521 |
}
|
522 |
.custom-tooltip p {
|
523 |
width: 430px;
|
@@ -538,8 +561,7 @@ div.custom-ifram {
|
|
538 |
width: 330px;
|
539 |
}
|
540 |
|
541 |
-
.wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline .
|
542 |
-
width: 182px;
|
543 |
font-size: 14px;
|
544 |
}
|
545 |
|
@@ -567,10 +589,6 @@ div.custom-ifram {
|
|
567 |
.wpvr-mobile-notice p {
|
568 |
width: calc(100% - 46px);
|
569 |
}
|
570 |
-
.pano-wrap .cross {
|
571 |
-
top: 2px;
|
572 |
-
right: 1px;
|
573 |
-
}
|
574 |
|
575 |
.scene-gallery ul {
|
576 |
width: 100px !important;
|
@@ -586,7 +604,7 @@ div.custom-ifram {
|
|
586 |
height: 300px!important;
|
587 |
}
|
588 |
.pnlm-container.vrembed {
|
589 |
-
height:
|
590 |
}
|
591 |
div.custom-tooltip span img {
|
592 |
height: 150px;
|
@@ -604,11 +622,23 @@ div.custom-ifram {
|
|
604 |
width: 280px;
|
605 |
}
|
606 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
607 |
/* ----woocommerce product---- */
|
608 |
.wpvr-product-container {
|
609 |
display: block;
|
610 |
-
max-height: 225px;
|
611 |
-
overflow: auto;
|
612 |
}
|
613 |
.wpvr-product-container .wpvr-pr-left-block {
|
614 |
width: 100%;
|
@@ -627,9 +657,6 @@ div.custom-ifram {
|
|
627 |
.wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline {
|
628 |
text-align: center;
|
629 |
}
|
630 |
-
.wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline .add_to_cart_button {
|
631 |
-
margin: 0 auto;
|
632 |
-
}
|
633 |
|
634 |
}
|
635 |
|
257 |
max-width: 100vw !important;
|
258 |
}
|
259 |
|
260 |
+
|
261 |
.vrembed {
|
262 |
width: 100%!important;
|
263 |
+
height: 100%!important;
|
264 |
position: fixed;
|
265 |
left: 0;
|
266 |
top: 0;
|
296 |
border-radius: 3px;
|
297 |
background-color: #fff;
|
298 |
color: #000;
|
299 |
+
font-size: 16px;
|
300 |
text-align: center;
|
301 |
padding: 5px 10px;
|
302 |
cursor: default;
|
304 |
bottom: 40px!important;
|
305 |
transform: translateX(-50%);
|
306 |
min-width: 300px;
|
307 |
+
font-weight: 400;
|
308 |
}
|
309 |
div.custom-tooltip span p {
|
310 |
max-height: 250px;
|
337 |
margin: 0 50%;
|
338 |
}
|
339 |
|
340 |
+
.custom-ifram-wrapper {
|
341 |
position: absolute;
|
342 |
+
top: 10%;
|
343 |
+
bottom: 10%;
|
344 |
left: 50%;
|
345 |
+
transform: translateX(-50%);
|
346 |
z-index: 99;
|
347 |
width: 80%;
|
348 |
+
max-width: 980px;
|
349 |
+
}
|
350 |
+
|
351 |
+
.custom-ifram-flex {
|
352 |
+
height: 100%;
|
353 |
+
width: 100%;
|
354 |
+
display: flex;
|
355 |
+
flex-flow: column;
|
356 |
+
align-items: center;
|
357 |
+
justify-content: center;
|
358 |
background: #fff;
|
359 |
border-radius: 5px;
|
360 |
}
|
361 |
|
362 |
+
div.custom-ifram {
|
363 |
+
width: 100%;
|
364 |
+
max-height: 100%;
|
365 |
+
overflow: auto;
|
366 |
+
}
|
367 |
|
368 |
.pano-wrap:before {
|
369 |
content: "";
|
370 |
position: absolute;
|
371 |
left: 0;
|
372 |
top: 0;
|
373 |
+
background: rgba(0,0,0,0.7);
|
374 |
width: 100%;
|
375 |
height: 100%;
|
376 |
z-index: 99;
|
390 |
color: red;
|
391 |
line-height: 26px;
|
392 |
position: absolute;
|
393 |
+
top: -13px;
|
394 |
+
right: -10px;
|
395 |
text-align: center;
|
396 |
z-index: 99;
|
397 |
font-size: 13px;
|
398 |
border-radius: 100%;
|
399 |
+
padding-left: 0px;
|
400 |
cursor: pointer;
|
401 |
opacity: 0;
|
402 |
visibility: hidden;
|
403 |
transition: all 0.4s ease;
|
404 |
+
box-sizing: border-box;
|
405 |
+
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
|
406 |
}
|
407 |
.pano-wrap.show-modal .cross {
|
408 |
opacity: 1;
|
479 |
}
|
480 |
.wpvr-product-container .wpvr-pr-left-block .woocommerce-product-gallery__image img {
|
481 |
margin: 0;
|
482 |
+
max-width: 95%;
|
483 |
width: 100%;
|
484 |
height: auto;
|
485 |
}
|
505 |
.wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline {
|
506 |
border: none!important;
|
507 |
padding: 0!important;
|
|
|
508 |
text-align: left;
|
509 |
border-radius: 0;
|
510 |
}
|
516 |
text-decoration: line-through;
|
517 |
opacity: 0.5;
|
518 |
}
|
519 |
+
.wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline .wpvr-cart-wrap {
|
520 |
display: block;
|
521 |
+
}
|
522 |
+
.wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline a.button {
|
523 |
font-size: 16px;
|
524 |
+
display: inline-block;
|
525 |
+
padding-left: 20px;
|
526 |
+
padding-right: 20px;
|
527 |
}
|
528 |
|
529 |
|
534 |
height: 500px!important;
|
535 |
}
|
536 |
.pnlm-container.vrembed {
|
537 |
+
height: 100%!important;
|
538 |
}
|
539 |
.custom-ifram iframe {
|
540 |
height: 300px;
|
541 |
}
|
542 |
div.custom-ifram {
|
543 |
+
width: 100%;
|
544 |
}
|
545 |
.custom-tooltip p {
|
546 |
width: 430px;
|
561 |
width: 330px;
|
562 |
}
|
563 |
|
564 |
+
.wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline a.button {
|
|
|
565 |
font-size: 14px;
|
566 |
}
|
567 |
|
589 |
.wpvr-mobile-notice p {
|
590 |
width: calc(100% - 46px);
|
591 |
}
|
|
|
|
|
|
|
|
|
592 |
|
593 |
.scene-gallery ul {
|
594 |
width: 100px !important;
|
604 |
height: 300px!important;
|
605 |
}
|
606 |
.pnlm-container.vrembed {
|
607 |
+
height: 100%!important;
|
608 |
}
|
609 |
div.custom-tooltip span img {
|
610 |
height: 150px;
|
622 |
width: 280px;
|
623 |
}
|
624 |
|
625 |
+
div.pnlm-hotspot-base.fas,
|
626 |
+
div.pnlm-hotspot-base.fab,
|
627 |
+
div.pnlm-hotspot-base.fa,
|
628 |
+
div.pnlm-hotspot-base.far {
|
629 |
+
width: 24px!important;
|
630 |
+
height: 24px!important;
|
631 |
+
}
|
632 |
+
div.pnlm-hotspot-base:before,
|
633 |
+
div.pnlm-hotspot-base:before,
|
634 |
+
div.pnlm-hotspot-base:before {
|
635 |
+
font-size: 11px!important;
|
636 |
+
}
|
637 |
+
|
638 |
+
|
639 |
/* ----woocommerce product---- */
|
640 |
.wpvr-product-container {
|
641 |
display: block;
|
|
|
|
|
642 |
}
|
643 |
.wpvr-product-container .wpvr-pr-left-block {
|
644 |
width: 100%;
|
657 |
.wpvr-product-container .wpvr-pr-right-block .add_to_cart_inline {
|
658 |
text-align: center;
|
659 |
}
|
|
|
|
|
|
|
660 |
|
661 |
}
|
662 |
|
public/js/wpvr-public.js
CHANGED
@@ -34,8 +34,8 @@
|
|
34 |
function wpvrhotspot(hotSpotDiv, args) {
|
35 |
var argst = args.replace(/\\/g, '');
|
36 |
jQuery(document).ready(function($){
|
37 |
-
$(hotSpotDiv.target).parent().siblings(".custom-ifram").html(argst);
|
38 |
-
$(hotSpotDiv.target).parent().siblings(".custom-ifram").fadeToggle();
|
39 |
$(hotSpotDiv.target).parent().parent(".pano-wrap").toggleClass("show-modal");
|
40 |
});
|
41 |
}
|
@@ -54,11 +54,16 @@ function wpvrtooltip(hotSpotDiv, args) {
|
|
54 |
jQuery(document).ready(function($){
|
55 |
|
56 |
$(".cross").on("click", function(e){
|
57 |
-
|
58 |
-
|
59 |
-
$(this).parent(".
|
|
|
|
|
60 |
$('iframe').attr('src', $('iframe').attr('src'));
|
61 |
-
$('#wpvr-video').
|
|
|
|
|
|
|
62 |
});
|
63 |
});
|
64 |
|
@@ -73,6 +78,9 @@ jQuery(document).ready(function($){
|
|
73 |
|
74 |
$('.wpvr-mobile-notice .notice-close').on('click', function(){
|
75 |
$('.wpvr-mobile-notice').fadeOut();
|
76 |
-
|
77 |
});
|
78 |
-
|
|
|
|
|
|
34 |
function wpvrhotspot(hotSpotDiv, args) {
|
35 |
var argst = args.replace(/\\/g, '');
|
36 |
jQuery(document).ready(function($){
|
37 |
+
$(hotSpotDiv.target).parent().siblings(".custom-ifram-wrapper").find('.custom-ifram').html(argst);
|
38 |
+
$(hotSpotDiv.target).parent().siblings(".custom-ifram-wrapper").fadeToggle();
|
39 |
$(hotSpotDiv.target).parent().parent(".pano-wrap").toggleClass("show-modal");
|
40 |
});
|
41 |
}
|
54 |
jQuery(document).ready(function($){
|
55 |
|
56 |
$(".cross").on("click", function(e){
|
57 |
+
e.preventDefault();
|
58 |
+
|
59 |
+
$(this).parent(".custom-ifram-wrapper").fadeOut();
|
60 |
+
$(this).parents(".pano-wrap").removeClass("show-modal");
|
61 |
+
|
62 |
$('iframe').attr('src', $('iframe').attr('src'));
|
63 |
+
if($('#wpvr-video').length != 0) {
|
64 |
+
$('#wpvr-video').get(0).pause();
|
65 |
+
}
|
66 |
+
|
67 |
});
|
68 |
});
|
69 |
|
78 |
|
79 |
$('.wpvr-mobile-notice .notice-close').on('click', function(){
|
80 |
$('.wpvr-mobile-notice').fadeOut();
|
81 |
+
$.cookie('wpvr_mobile_notice', 'true');
|
82 |
});
|
83 |
+
|
84 |
+
|
85 |
+
|
86 |
+
});
|
wpvr.php
CHANGED
@@ -16,7 +16,7 @@
|
|
16 |
* Plugin Name: WP VR
|
17 |
* Plugin URI: https://rextheme.com/wpvr/
|
18 |
* Description: WP VR - 360 Panorama and virtual tour creator for WordPress is a customized panaroma & virtual builder tool for WordPress Website.
|
19 |
-
* Version:
|
20 |
* Author: Rextheme
|
21 |
* Author URI: http://rextheme.com/
|
22 |
* License: GPL-2.0+
|
@@ -37,6 +37,7 @@ require plugin_dir_path( __FILE__ ) . 'elementor/elementor.php';
|
|
37 |
define( 'WPVR', '1.0.0' );
|
38 |
define('WPVR_FILE', __FILE__ );
|
39 |
define( "WPVR_PLUGIN_DIR_URL", plugin_dir_url( __FILE__ ) );
|
|
|
40 |
define('WPVR_BASE', plugin_basename( WPVR_FILE ) );
|
41 |
|
42 |
/**
|
@@ -543,6 +544,9 @@ function wpvr_block_render( $attributes ) {
|
|
543 |
"targetPitch"=>(float)$hotspot_scene_pitch,
|
544 |
"targetYaw"=>(float)$hotspot_scene_yaw,
|
545 |
'hotspot_type' => $hotspot_data['hotspot-type']);
|
|
|
|
|
|
|
546 |
if ($hotspot_data["hotspot-customclass"] == 'none' || $hotspot_data["hotspot-customclass"] == '') {
|
547 |
unset($hotspot_info["cssClass"]);
|
548 |
}
|
@@ -735,14 +739,6 @@ function wpvr_block_render( $attributes ) {
|
|
735 |
$html .= '<div id="pano'.$id.'" class="pano-wrap vrfullwidth" style=" text-align:center; height: '.$height.'px; border-radius:'.$radius.'; direction:ltr;" >';
|
736 |
}
|
737 |
}
|
738 |
-
// elseif ($width == 'embed') {
|
739 |
-
// if (wpvr_isMobileDevice()) {
|
740 |
-
// $html .= '<div id="pano'.$id.'" class="pano-wrap" style="text-align:center; border-radius:'.$radius.'; direction:ltr;" >';
|
741 |
-
// }
|
742 |
-
// else {
|
743 |
-
// $html .= '<div id="pano'.$id.'" class="pano-wrap vrembed" style=" text-align:center; height: '.$height.'px; border-radius:'.$radius.'; direction:ltr;" >';
|
744 |
-
// }
|
745 |
-
// }
|
746 |
else {
|
747 |
$html .= '<div id="pano'.$id.'" class="pano-wrap" style=" text-align:center; max-width:100%; width: '.$width.'px; height: '.$height.'px; margin: 0 auto; border-radius:'.$radius.'; direction:ltr;">';
|
748 |
}
|
@@ -881,20 +877,75 @@ function wpvr_block_render( $attributes ) {
|
|
881 |
}
|
882 |
}
|
883 |
|
884 |
-
|
885 |
-
$html .= '<div class="wpvr-hotspot-tweak-contents" style="display: none">';
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
|
|
|
|
|
|
|
|
|
|
890 |
$html .= '</div>';
|
891 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
892 |
$html .= '</div>';
|
893 |
$html .= '</div>';
|
894 |
|
895 |
//script started
|
|
|
896 |
$html .= '<script>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
897 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
898 |
$html .= 'var response = '.$response.';';
|
899 |
$html .= 'var scenes = response[1];';
|
900 |
$html .= 'if(scenes) {';
|
@@ -1051,50 +1102,6 @@ function wpvr_block_render( $attributes ) {
|
|
1051 |
});
|
1052 |
';
|
1053 |
|
1054 |
-
if (isset($postdata['bg_music'])) {
|
1055 |
-
if ($bg_music == 'on') {
|
1056 |
-
$html .= '
|
1057 |
-
var x'.$id.' = document.getElementById("vrAudio'.$id.'");
|
1058 |
-
|
1059 |
-
var playing'.$id.' = false;
|
1060 |
-
|
1061 |
-
function playPause'.$id.'() {
|
1062 |
-
|
1063 |
-
if (playing'.$id.') {
|
1064 |
-
jQuery("#vr-volume'.$id.'").removeClass("fas fa-volume-up");
|
1065 |
-
jQuery("#vr-volume'.$id.'").addClass("fas fa-volume-mute");
|
1066 |
-
x'.$id.'.pause();
|
1067 |
-
playing'.$id.' = false;
|
1068 |
-
|
1069 |
-
}
|
1070 |
-
else {
|
1071 |
-
jQuery("#vr-volume'.$id.'").removeClass("fas fa-volume-mute");
|
1072 |
-
jQuery("#vr-volume'.$id.'").addClass("fas fa-volume-up");
|
1073 |
-
x'.$id.'.play();
|
1074 |
-
playing'.$id.' = true;
|
1075 |
-
}
|
1076 |
-
}
|
1077 |
-
|
1078 |
-
function audionEnd'.$id.'() {
|
1079 |
-
playing'.$id.' = false;
|
1080 |
-
jQuery("#vr-volume'.$id.'").removeClass("fas fa-volume-up");
|
1081 |
-
jQuery("#vr-volume'.$id.'").addClass("fas fa-volume-mute");
|
1082 |
-
}
|
1083 |
-
';
|
1084 |
-
|
1085 |
-
if ($autoplay_bg_music == 'on') {
|
1086 |
-
$html .= '
|
1087 |
-
document.getElementById("pano'.$id.'").addEventListener("click", musicPlay'.$id.');
|
1088 |
-
function musicPlay'.$id.'() {
|
1089 |
-
playing'.$id.' = true;
|
1090 |
-
document.getElementById("vrAudio'.$id.'").play();
|
1091 |
-
document.getElementById("pano'.$id.'").removeEventListener("click", musicPlay'.$id.');
|
1092 |
-
}
|
1093 |
-
';
|
1094 |
-
}
|
1095 |
-
}
|
1096 |
-
}
|
1097 |
-
|
1098 |
if (!$autoload) {
|
1099 |
$html .= '
|
1100 |
|
@@ -1114,7 +1121,7 @@ function wpvr_block_render( $attributes ) {
|
|
1114 |
jQuery("#pano'.$id.'").find(".pnlm-panorama-info").show();
|
1115 |
});';
|
1116 |
}
|
1117 |
-
|
1118 |
$html .= '</script>';
|
1119 |
//script end
|
1120 |
return $html;
|
@@ -1371,11 +1378,10 @@ add_action( 'admin_notices', 'sample_admin_notice__success' );
|
|
1371 |
|
1372 |
|
1373 |
|
1374 |
-
|
1375 |
/**
|
1376 |
* Redirect to the edit.php on post save or publish.
|
1377 |
*/
|
1378 |
-
//function
|
1379 |
// if( isset( $_POST['post_type'] ) ) {
|
1380 |
//
|
1381 |
// error_log(print_r($_POST,1));
|
@@ -1385,4 +1391,4 @@ add_action( 'admin_notices', 'sample_admin_notice__success' );
|
|
1385 |
// }
|
1386 |
// return $location;
|
1387 |
//}
|
1388 |
-
//add_filter( 'redirect_post_location', '
|
16 |
* Plugin Name: WP VR
|
17 |
* Plugin URI: https://rextheme.com/wpvr/
|
18 |
* Description: WP VR - 360 Panorama and virtual tour creator for WordPress is a customized panaroma & virtual builder tool for WordPress Website.
|
19 |
+
* Version: 6.0.0
|
20 |
* Author: Rextheme
|
21 |
* Author URI: http://rextheme.com/
|
22 |
* License: GPL-2.0+
|
37 |
define( 'WPVR', '1.0.0' );
|
38 |
define('WPVR_FILE', __FILE__ );
|
39 |
define( "WPVR_PLUGIN_DIR_URL", plugin_dir_url( __FILE__ ) );
|
40 |
+
define( "WPVR_PLUGIN_PUBLIC_DIR_URL", plugin_dir_url( __FILE__ ) .'public/' );
|
41 |
define('WPVR_BASE', plugin_basename( WPVR_FILE ) );
|
42 |
|
43 |
/**
|
544 |
"targetPitch"=>(float)$hotspot_scene_pitch,
|
545 |
"targetYaw"=>(float)$hotspot_scene_yaw,
|
546 |
'hotspot_type' => $hotspot_data['hotspot-type']);
|
547 |
+
|
548 |
+
$hotspot_info['URL'] = ($hotspot_data['hotspot-type'] === 'fluent_form' || $hotspot_data['hotspot-type'] === 'wc_product') ? '' : $hotspot_info['URL'];
|
549 |
+
|
550 |
if ($hotspot_data["hotspot-customclass"] == 'none' || $hotspot_data["hotspot-customclass"] == '') {
|
551 |
unset($hotspot_info["cssClass"]);
|
552 |
}
|
739 |
$html .= '<div id="pano'.$id.'" class="pano-wrap vrfullwidth" style=" text-align:center; height: '.$height.'px; border-radius:'.$radius.'; direction:ltr;" >';
|
740 |
}
|
741 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
742 |
else {
|
743 |
$html .= '<div id="pano'.$id.'" class="pano-wrap" style=" text-align:center; max-width:100%; width: '.$width.'px; height: '.$height.'px; margin: 0 auto; border-radius:'.$radius.'; direction:ltr;">';
|
744 |
}
|
877 |
}
|
878 |
}
|
879 |
|
880 |
+
|
881 |
+
$html .= '<div class="wpvr-hotspot-tweak-contents-wrapper" style="display: none">';
|
882 |
+
$html .= '<i class="fa fa-times cross"></i>';
|
883 |
+
$html .= '<div class="wpvr-hotspot-tweak-contents-flex">';
|
884 |
+
$html .= '<div class="wpvr-hotspot-tweak-contents">';
|
885 |
+
ob_start();
|
886 |
+
do_action('wpvr_hotspot_tweak_contents', $scene_data);
|
887 |
+
$hotspot_content = ob_get_clean();
|
888 |
+
$html .= $hotspot_content;
|
889 |
+
$html .= '</div>';
|
890 |
+
$html .= '</div>';
|
891 |
$html .= '</div>';
|
892 |
+
|
893 |
+
$html .= '<div class="custom-ifram-wrapper" style="display: none;">';
|
894 |
+
$html .= '<i class="fa fa-times cross"></i>';
|
895 |
+
$html .= '<div class="custom-ifram-flex">';
|
896 |
+
$html .= '<div class="custom-ifram">';
|
897 |
+
$html .= '</div>';
|
898 |
+
$html .= '</div>';
|
899 |
$html .= '</div>';
|
900 |
$html .= '</div>';
|
901 |
|
902 |
//script started
|
903 |
+
|
904 |
$html .= '<script>';
|
905 |
+
if (isset($postdata['bg_music'])) {
|
906 |
+
if ($bg_music == 'on') {
|
907 |
+
$html .= '
|
908 |
+
var x'.$id.' = document.getElementById("vrAudio'.$id.'");
|
909 |
+
|
910 |
+
var playing'.$id.' = false;
|
911 |
+
|
912 |
+
function playPause'.$id.'() {
|
913 |
|
914 |
+
if (playing'.$id.') {
|
915 |
+
jQuery("#vr-volume'.$id.'").removeClass("fas fa-volume-up");
|
916 |
+
jQuery("#vr-volume'.$id.'").addClass("fas fa-volume-mute");
|
917 |
+
x'.$id.'.pause();
|
918 |
+
playing'.$id.' = false;
|
919 |
+
|
920 |
+
}
|
921 |
+
else {
|
922 |
+
jQuery("#vr-volume'.$id.'").removeClass("fas fa-volume-mute");
|
923 |
+
jQuery("#vr-volume'.$id.'").addClass("fas fa-volume-up");
|
924 |
+
x'.$id.'.play();
|
925 |
+
playing'.$id.' = true;
|
926 |
+
}
|
927 |
+
}
|
928 |
+
|
929 |
+
function audionEnd'.$id.'() {
|
930 |
+
playing'.$id.' = false;
|
931 |
+
jQuery("#vr-volume'.$id.'").removeClass("fas fa-volume-up");
|
932 |
+
jQuery("#vr-volume'.$id.'").addClass("fas fa-volume-mute");
|
933 |
+
}
|
934 |
+
';
|
935 |
+
|
936 |
+
if ($autoplay_bg_music == 'on') {
|
937 |
+
$html .= '
|
938 |
+
document.getElementById("pano'.$id.'").addEventListener("click", musicPlay'.$id.');
|
939 |
+
function musicPlay'.$id.'() {
|
940 |
+
playing'.$id.' = true;
|
941 |
+
document.getElementById("vrAudio'.$id.'").play();
|
942 |
+
document.getElementById("pano'.$id.'").removeEventListener("click", musicPlay'.$id.');
|
943 |
+
}
|
944 |
+
';
|
945 |
+
}
|
946 |
+
}
|
947 |
+
}
|
948 |
+
$html .= 'jQuery(document).ready(function() {';
|
949 |
$html .= 'var response = '.$response.';';
|
950 |
$html .= 'var scenes = response[1];';
|
951 |
$html .= 'if(scenes) {';
|
1102 |
});
|
1103 |
';
|
1104 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1105 |
if (!$autoload) {
|
1106 |
$html .= '
|
1107 |
|
1121 |
jQuery("#pano'.$id.'").find(".pnlm-panorama-info").show();
|
1122 |
});';
|
1123 |
}
|
1124 |
+
$html .= '});';
|
1125 |
$html .= '</script>';
|
1126 |
//script end
|
1127 |
return $html;
|
1378 |
|
1379 |
|
1380 |
|
|
|
1381 |
/**
|
1382 |
* Redirect to the edit.php on post save or publish.
|
1383 |
*/
|
1384 |
+
//function wpvr_active_tab_query_params( $location, $post_id ) {
|
1385 |
// if( isset( $_POST['post_type'] ) ) {
|
1386 |
//
|
1387 |
// error_log(print_r($_POST,1));
|
1391 |
// }
|
1392 |
// return $location;
|
1393 |
//}
|
1394 |
+
//add_filter( 'redirect_post_location', 'wpvr_active_tab_query_params', 10, 2 );
|