PluginProbe
WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress / 9.1.3
WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress v9.1.3
9.1.3 9.1.2 9.1.1 9.1.0 9.0.3 9.0.2 9.0.1 9.0.0 8.5.79 8.5.78 8.5.77 8.5.76 8.5.75 8.5.74 8.5.73 8.5.72 8.5.71 8.5.70 8.5.69 8.5.68 8.5.35 8.5.36 8.5.37 8.5.38 8.5.39 All 222 releases
← All changes | legacy/admin/classes/class-wpvr-meta-field.php +26 -24 9.0.3 → 9.1.3 View file →
@@ -1158,9 +1158,9 @@
1158 1158 ),
1159 1159 'scene-attachment-url' => array(
1160 1160 'title' => __('Scene Upload','wpvr'),
1161 1161 'type' => 'upload',
1162 - 'value' => $pano_scene['scene-attachment-url'],
1162 + 'value' => $pano_scene['scene-attachment-url'] ?? '',
1163 1163 'display' => 'block',
1164 1164 'have_tooltip' => true,
1165 1165 'tooltip_text' => array(
1166 1166 'text' => __('Upload an image to be used as the scene media (video is not supported).', 'wpvr'),
@@ -1171,9 +1171,9 @@
1171 1171 'class' => 'scene-setting dscene',
1172 1172 'title' => __('Set as Default','wpvr'),
1173 1173 'type' => 'select',
1174 1174 'select_class' => 'dscen',
1175 - 'selected' => $pano_scene['dscene'],
1175 + 'selected' => $pano_scene['dscene'] ?? 'off',
1176 1176 'have_tooltip' => true,
1177 1177 'tooltip_text' => array(
1178 1178 'text' => __('Make this scene the first one that appears when the tour loads.', 'wpvr'),
1179 1179 'url' => 'https://rextheme.com/docs/wp-vr-add-a-scene-virtual-tour/'
@@ -1183,9 +1183,9 @@
1183 1183 'label_for' => 'scene-id',
1184 1184 'title' => __('Scene ID','wpvr'),
1185 1185 'input_class' => 'sceneid',
1186 1186 'type' => 'text',
1187 - 'value' => $pano_scene['scene-id'],
1187 + 'value' => $pano_scene['scene-id'] ?? '',
1188 1188 'disabled' => 'disabled',
1189 1189 'have_tooltip' => true,
1190 1190 'tooltip_text' => array(
1191 1191 'text' => __('Unique identifier for the scene, auto-generated if left empty.', 'wpvr'),
@@ -1208,9 +1208,9 @@
1208 1208 {
1209 1209 $fields = array(
1210 1210 'hotspot-title' => array(
1211 1211 'title' => __('Hotspot ID','wpvr'),
1212 - 'value' => $pano_hotspot['hotspot-title'],
1212 + 'value' => $pano_hotspot['hotspot-title'] ?? '',
1213 1213 'type' => 'text',
1214 1214 'input_class' => '',
1215 1215 'input_id' => 'hotspot-title',
1216 1216 'have_tooltip' => true,
@@ -1221,9 +1221,9 @@
1221 1221
1222 1222 ),
1223 1223 'hotspot-pitch' => array(
1224 1224 'title' => __('Pitch','wpvr'),
1225 - 'value' => $pano_hotspot['hotspot-pitch'],
1225 + 'value' => $pano_hotspot['hotspot-pitch'] ?? '',
1226 1226 'type' => 'text',
1227 1227 'input_class' => 'hotspot-pitch',
1228 1228 'input_id' => '',
1229 1229 'have_tooltip' => true,
@@ -1233,9 +1233,9 @@
1233 1233 ),
1234 1234 ),
1235 1235 'hotspot-yaw' => array(
1236 1236 'title' => __('Yaw','wpvr'),
1237 - 'value' => $pano_hotspot['hotspot-yaw'],
1237 + 'value' => $pano_hotspot['hotspot-yaw'] ?? '',
1238 1238 'type' => 'text',
1239 1239 'input_class' => 'hotspot-yaw',
1240 1240 'input_id' => '',
1241 1241 'have_tooltip' => true,
@@ -1245,9 +1245,9 @@
1245 1245 ),
1246 1246 ),
1247 1247 'hotspot-customclass' => array(
1248 1248 'title' => __('Hotspot Custom Icon Class','wpvr'),
1249 - 'value' => $pano_hotspot['hotspot-customclass'],
1249 + 'value' => $pano_hotspot['hotspot-customclass'] ?? '',
1250 1250 'type' => 'text',
1251 1251 'input_class' => '',
1252 1252 'input_id' => 'hotspot-customclass',
1253 1253 'have_tooltip' => true,
@@ -1362,9 +1362,9 @@
1362 1362 ),
1363 1363 'hotspot-url' => array(
1364 1364 'title' => __('URL','wpvr'),
1365 1365 'type' => 'info_url',
1366 - 'value' => $pano_hotspot['hotspot-url'],
1366 + 'value' => $pano_hotspot['hotspot-url'] ?? '',
1367 1367 'display' => 'block',
1368 1368 'have_tooltip' => true,
1369 1369 'tooltip_text' => array(
1370 1370 'text' => __('Provide a URL that the hotspot will link to when clicked.', 'wpvr'),
@@ -1385,9 +1385,9 @@
1385 1385 'hotspot-content' => array(
1386 1386 'class' => 'hotspot-content',
1387 1387 'title' => __('On Click Content','wpvr'),
1388 1388 'type' => 'info_textarea',
1389 - 'value' => $pano_hotspot['hotspot-content'],
1389 + 'value' => $pano_hotspot['hotspot-content'] ?? '',
1390 1390 'display' => 'block',
1391 1391 'have_tooltip' => true,
1392 1392 'tooltip_text' => array(
1393 1393 'text' => __('Add custom content or actions that occur when the hotspot is clicked.', 'wpvr'),
@@ -1397,9 +1397,9 @@
1397 1397 'hotspot-hover' => array(
1398 1398 'class' => 'hotspot-hover tip',
1399 1399 'title' => __('On Hover Content','wpvr'),
1400 1400 'type' => 'info_textarea',
1401 - 'value' => $pano_hotspot['hotspot-hover'],
1401 + 'value' => $pano_hotspot['hotspot-hover'] ?? '',
1402 1402 'display' => 'block',
1403 1403 'have_tooltip' => true,
1404 1404 'tooltip_text' => array(
1405 1405 'text' => __('Add custom content or actions that appear when the user hovers over the hotspot.', 'wpvr'),
@@ -1460,9 +1460,9 @@
1460 1460 ),
1461 1461 'hotspot-url' => array(
1462 1462 'title' => __('URL','wpvr'),
1463 1463 'type' => 'info_url',
1464 - 'value' => $pano_hotspot['hotspot-url'],
1464 + 'value' => $pano_hotspot['hotspot-url'] ?? '',
1465 1465 'display' => 'none',
1466 1466 ),
1467 1467 'wpvr_url_open' => array(
1468 1468 'title' => __('Open in same tab','wpvr'),
@@ -1473,9 +1473,9 @@
1473 1473 'hotspot-content' => array(
1474 1474 'class' => 'hotspot-content',
1475 1475 'title' => __('On Click Content','wpvr'),
1476 1476 'type' => 'info_textarea',
1477 - 'value' => $pano_hotspot['hotspot-content'],
1477 + 'value' => $pano_hotspot['hotspot-content'] ?? '',
1478 1478 'display' => 'none',
1479 1479 ),
1480 1480 'hotspot-hover' => array(
1481 1481 'class' => 'hotspot-hover',
@@ -1480,9 +1480,9 @@
1480 1480 'hotspot-hover' => array(
1481 1481 'class' => 'hotspot-hover',
1482 1482 'title' => __('On Hover Content','wpvr'),
1483 1483 'type' => 'info_textarea',
1484 - 'value' => $pano_hotspot['hotspot-hover'],
1484 + 'value' => $pano_hotspot['hotspot-hover'] ?? '',
1485 1485 'display' => 'block',
1486 1486 ),
1487 1487 'hotspot-scene-list' => array(
1488 1488 'title' => __('Select Target Scene from List','wpvr'),
@@ -1526,9 +1526,9 @@
1526 1526 ),
1527 1527 'hotspot-url' => array(
1528 1528 'title' => __('URL','wpvr'),
1529 1529 'type' => 'info_url',
1530 - 'value' => $pano_hotspot['hotspot-url'],
1530 + 'value' => $pano_hotspot['hotspot-url'] ?? '',
1531 1531 'display' => 'none',
1532 1532 ),
1533 1533 'wpvr_url_open' => array(
1534 1534 'title' => __('Open in same tab','wpvr'),
@@ -1539,9 +1539,9 @@
1539 1539 'hotspot-content' => array(
1540 1540 'class' => 'hotspot-content',
1541 1541 'title' => __('On Click Content','wpvr'),
1542 1542 'type' => 'info_textarea',
1543 - 'value' => $pano_hotspot['hotspot-content'],
1543 + 'value' => $pano_hotspot['hotspot-content'] ?? '',
1544 1544 'display' => 'none',
1545 1545 ),
1546 1546 'hotspot-hover' => array(
1547 1547 'class' => 'hotspot-hover',
@@ -1546,9 +1546,9 @@
1546 1546 'hotspot-hover' => array(
1547 1547 'class' => 'hotspot-hover',
1548 1548 'title' => __('On Hover Content','wpvr'),
1549 1549 'type' => 'info_textarea',
1550 - 'value' => $pano_hotspot['hotspot-hover'],
1550 + 'value' => $pano_hotspot['hotspot-hover'] ?? '',
1551 1551 'display' => 'block',
1552 1552 ),
1553 1553 'hotspot-scene-list' => array(
1554 1554 'title' => __('Select Target Scene from List','wpvr'),
@@ -1605,9 +1605,9 @@
1605 1605 'hotspot-hover' => array(
1606 1606 'class' => 'hotspot-hover',
1607 1607 'title' => __('On Hover Content','wpvr'),
1608 1608 'type' => 'info_textarea',
1609 - 'value' => $pano_hotspot['hotspot-hover'],
1609 + 'value' => $pano_hotspot['hotspot-hover'] ?? '',
1610 1610 'display' => 'block',
1611 1611 ),
1612 1612 'hotspot-scene-list' => array(
1613 1613 'title' => __('Select Target Scene from List','wpvr'),
@@ -1618,9 +1618,9 @@
1618 1618 'title' => __('Target Scene ID','wpvr'),
1619 1619 'display' => 'block',
1620 1620 'input_class' => 'hotspotsceneinfodata',
1621 1621 'type' => 'disabled_text',
1622 - 'value' => $pano_hotspot['hotspot-scene']
1622 + 'value' => $pano_hotspot['hotspot-scene'] ?? ''
1623 1623 ),
1624 1624 );
1625 1625 return apply_filters( 'modify_hotspot_setting_scene_fields', $fields, $pano_hotspot );
1626 1626 }
@@ -1907,12 +1907,14 @@
1907 1907 * @since 8.0.0
1908 1908 */
1909 1909 public static function get__video_setting_fields($postdata)
1910 1910 {
1911 - $vidurl = '';
1912 - if (isset($postdata['vidid'])) {
1913 - $vidurl = $postdata['vidurl'];
1914 - }
1911 + $is_video = ( isset( $postdata['tour-type'] ) && $postdata['tour-type'] === 'video' )
1912 + || ! empty( $postdata['vidid'] )
1913 + || ! empty( $postdata['vidurl'] );
1914 +
1915 + $vidurl = ! empty( $postdata['vidurl'] ) ? $postdata['vidurl'] : '';
1916 +
1915 1917 $meta_fields = array(
1916 1918 'panovideo' => array(
1917 1919 'class' => 'single-settings videosetup',
1918 1920 'title' => __('Video Tour','wpvr'),
@@ -1921,9 +1923,9 @@
1921 1923 array(
1922 1924 'input_class' => 'styled-radio video_off',
1923 1925 'input_id' => 'styled-radio',
1924 1926 'value' => 'off',
1925 - 'checked' => isset($postdata['vidid']),
1927 + 'checked' => $is_video,
1926 1928 'label_value' => 'Off'
1927 1929 ),
1928 1930 array(
1929 1931 'input_class' => 'styled-radio video_on',
@@ -1928,9 +1930,9 @@
1928 1930 array(
1929 1931 'input_class' => 'styled-radio video_on',
1930 1932 'input_id' => 'styled-radio-0',
1931 1933 'value' => 'on',
1932 - 'checked' => isset($postdata['vidid']),
1934 + 'checked' => $is_video,
1933 1935 'label_value' => 'On'
1934 1936 )
1935 1937 ),
1936 1938 'have_tooltip' => true,