Add hide virtual tour setting.
This commit is contained in:
parent
ab83165eb7
commit
7630299415
@ -346,6 +346,17 @@ class Opalestate_Settings_Property_Tab extends Opalestate_Settings_Base_Tab {
|
|||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
$fields[] = [
|
||||||
|
'name' => esc_html__( 'Show Virtual Tour tab', 'opalestate-pro' ),
|
||||||
|
'desc' => esc_html__( 'Show Virtual Tour tab in the single property page.', 'opalestate-pro' ),
|
||||||
|
'id' => 'enable_single_virtual_tour',
|
||||||
|
'type' => 'switch',
|
||||||
|
'options' => [
|
||||||
|
'on' => esc_html__( 'Enable', 'opalestate-pro' ),
|
||||||
|
'off' => esc_html__( 'Disable', 'opalestate-pro' ),
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
$fields[] = [
|
$fields[] = [
|
||||||
'name' => esc_html__( 'Show Map tab', 'opalestate-pro' ),
|
'name' => esc_html__( 'Show Map tab', 'opalestate-pro' ),
|
||||||
'desc' => esc_html__( 'Show Map tab in the single property page.', 'opalestate-pro' ),
|
'desc' => esc_html__( 'Show Map tab in the single property page.', 'opalestate-pro' ),
|
||||||
|
@ -140,6 +140,7 @@ class Opalestate_Property {
|
|||||||
'attachments',
|
'attachments',
|
||||||
'facilities',
|
'facilities',
|
||||||
'video',
|
'video',
|
||||||
|
'virtual_tour',
|
||||||
'map',
|
'map',
|
||||||
'nearby',
|
'nearby',
|
||||||
'walkscores',
|
'walkscores',
|
||||||
|
@ -4,7 +4,11 @@ global $property;
|
|||||||
$infos = $property->get_meta_fullinfo();
|
$infos = $property->get_meta_fullinfo();
|
||||||
$taxs = $property->get_types_tax();
|
$taxs = $property->get_types_tax();
|
||||||
|
|
||||||
|
if ( ! $infos && ! $taxs ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="property-information box-inner-summary">
|
<div class="property-information box-inner-summary">
|
||||||
<h5><?php esc_html_e( 'Quick Information', 'opalestate-pro' ); ?></h5>
|
<h5><?php esc_html_e( 'Quick Information', 'opalestate-pro' ); ?></h5>
|
||||||
<div class="box-content">
|
<div class="box-content">
|
||||||
|
@ -5,15 +5,18 @@ if ( ! $property->get_block_setting( 'video' ) ) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$videoURL = $property->get_video_url();
|
$video_url = $property->get_video_url();
|
||||||
|
|
||||||
|
if ( ! $video_url ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<?php if ( $videoURL ) : ?>
|
|
||||||
<div class="opalestate-box-content property-video-session">
|
<div class="opalestate-box-content property-video-session">
|
||||||
<h4 class="outbox-title" id="block-video"><?php esc_html_e( 'Video', 'opalestate-pro' ); ?></h4>
|
<h4 class="outbox-title" id="block-video"><?php esc_html_e( 'Video', 'opalestate-pro' ); ?></h4>
|
||||||
<div class="opalestate-box">
|
<div class="opalestate-box">
|
||||||
<div class="box-info">
|
<div class="box-info">
|
||||||
<?php echo wp_oembed_get( $videoURL ); ?>
|
<?php echo wp_oembed_get( $video_url ); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
|
||||||
|
@ -1,15 +1,22 @@
|
|||||||
<?php
|
<?php
|
||||||
global $property;
|
global $property;
|
||||||
|
|
||||||
$virtualTour = $property->get_virtual_tour();
|
if ( ! $property->get_block_setting( 'virtual_tour' ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$virtual_tour = $property->get_virtual_tour();
|
||||||
|
|
||||||
|
if ( ! $virtual_tour ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<?php if( $virtualTour ) : ?>
|
|
||||||
<div class="opalestate-box-content property-360-virtual-session">
|
<div class="opalestate-box-content property-360-virtual-session">
|
||||||
<h4 class="outbox-title" id="block-tour360"><?php esc_html_e( '360° Virtual Tour', 'opalestate-pro' ); ?></h4>
|
<h4 class="outbox-title" id="block-tour360"><?php esc_html_e( '360° Virtual Tour', 'opalestate-pro' ); ?></h4>
|
||||||
<div class=" opalestate-box">
|
<div class=" opalestate-box">
|
||||||
<div class="box-info">
|
<div class="box-info">
|
||||||
<?php echo do_shortcode( $virtualTour ); ?>
|
<?php echo do_shortcode( $virtual_tour ); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
|
||||||
|
Loading…
Reference in New Issue
Block a user