Update on off settings

This commit is contained in:
Hoang Huu 2019-10-03 10:13:19 +07:00
parent a11080d387
commit 33eca3ef75
16 changed files with 20 additions and 71 deletions

View File

@ -28,7 +28,7 @@ function opalestate_single_property_layout_default() {
// add_action( 'opalestate_after_single_property_summary', '', 55 ); // add_action( 'opalestate_after_single_property_summary', '', 55 );
add_action( 'opalestate_after_single_property_summary', 'opalestate_property_tags', 60 ); add_action( 'opalestate_after_single_property_summary', 'opalestate_property_tags', 60 );
if ( opalestate_get_option( 'enable_property_reviews' ) ) { if ( opalestate_property_reviews_enabled() ) {
add_action( 'opalestate_after_single_property_summary', 'comments_template', 65 ); add_action( 'opalestate_after_single_property_summary', 'comments_template', 65 );
} }
@ -75,7 +75,7 @@ function opalestate_single_property_layout_v2() {
add_action( 'opalestate_after_single_property_summary', 'opalestate_property_tags', 60 ); add_action( 'opalestate_after_single_property_summary', 'opalestate_property_tags', 60 );
if ( opalestate_get_option( 'enable_property_reviews' ) ) { if ( opalestate_property_reviews_enabled() ) {
add_action( 'opalestate_after_single_property_summary', 'comments_template', 65 ); add_action( 'opalestate_after_single_property_summary', 'comments_template', 65 );
} }
@ -116,7 +116,7 @@ function opalestate_single_property_layout_v3() {
// add_action( 'opalestate_after_single_property_summary', 'opalestate_property_author', 55 ); // add_action( 'opalestate_after_single_property_summary', 'opalestate_property_author', 55 );
add_action( 'opalestate_after_single_property_summary', 'opalestate_property_tags', 60 ); add_action( 'opalestate_after_single_property_summary', 'opalestate_property_tags', 60 );
if ( opalestate_get_option( 'enable_property_reviews' ) ) { if ( opalestate_property_reviews_enabled() ) {
add_action( 'opalestate_after_single_property_summary', 'comments_template', 65 ); add_action( 'opalestate_after_single_property_summary', 'comments_template', 65 );
} }
@ -152,7 +152,7 @@ function opalestate_single_property_layout_v4() {
add_action( 'opalestate_after_single_property_summary', 'opalestate_property_views_statistics', 50 ); add_action( 'opalestate_after_single_property_summary', 'opalestate_property_views_statistics', 50 );
add_action( 'opalestate_after_single_property_summary', 'opalestate_property_tags', 60 ); add_action( 'opalestate_after_single_property_summary', 'opalestate_property_tags', 60 );
if ( opalestate_get_option( 'enable_property_reviews' ) ) { if ( opalestate_property_reviews_enabled() ) {
add_action( 'opalestate_after_single_property_summary', 'comments_template', 65 ); add_action( 'opalestate_after_single_property_summary', 'comments_template', 65 );
} }
@ -191,7 +191,7 @@ function opalestate_single_property_layout_v5() {
add_action( 'opalestate_after_single_property_summary', 'opalestate_property_tags', 60 ); add_action( 'opalestate_after_single_property_summary', 'opalestate_property_tags', 60 );
if ( opalestate_get_option( 'enable_property_reviews' ) ) { if ( opalestate_property_reviews_enabled() ) {
add_action( 'opalestate_after_single_property_summary', 'comments_template', 65 ); add_action( 'opalestate_after_single_property_summary', 'comments_template', 65 );
} }

View File

@ -119,7 +119,7 @@ $id = time();
</div> </div>
<?php <?php
if ( opalestate_get_option( 'enable_agency_reviews' ) ) { if ( opalestate_agency_reviews_enabled() ) {
comments_template(); comments_template();
} }
?> ?>

View File

@ -106,7 +106,7 @@ $id = time();
</div><!-- .entry-content --> </div><!-- .entry-content -->
<?php <?php
if ( opalestate_get_option( 'enable_agent_reviews' ) ) { if ( opalestate_agent_reviews_enabled() ) {
comments_template(); comments_template();
} }
?> ?>

View File

@ -4,7 +4,7 @@ global $property, $post;
$amenities = $property->get_amenities(); $amenities = $property->get_amenities();
?> ?>
<?php if ( $property->get_block_setting( 'amenities' ) && $amenities ): ?> <?php if ( 'on' === $property->get_block_setting( 'amenities' ) && $amenities ): ?>
<div class="property-amenities box-inner-summary"> <div class="property-amenities box-inner-summary">
<h5 class="list-group-item-heading"><?php esc_html_e( 'Amenities', 'opalestate-pro' ); ?></h5> <h5 class="list-group-item-heading"><?php esc_html_e( 'Amenities', 'opalestate-pro' ); ?></h5>
<div class="list-group-item-text"> <div class="list-group-item-text">

View File

@ -1,6 +1,6 @@
<?php <?php
global $property; global $property;
if ( ! $property->get_block_setting( 'apartments' ) ) { if ( 'on' !== $property->get_block_setting( 'apartments' ) ) {
return; return;
} }

View File

@ -1,7 +1,7 @@
<?php <?php
global $property; global $property;
if ( ! $property->get_block_setting( 'attachments' ) ) { if ( 'on' !== $property->get_block_setting( 'attachments' ) ) {
return; return;
} }

View File

@ -5,7 +5,7 @@ $facilities = $property->get_facilities();
?> ?>
<?php if ( $property->get_block_setting( 'facilities' ) && $facilities && isset( $facilities[0] ) && ! empty( $facilities[0] ) ): ?> <?php if ( 'on' === $property->get_block_setting( 'facilities' ) && $facilities && isset( $facilities[0] ) && ! empty( $facilities[0] ) ): ?>
<div class="property-facilities box-inner-summary"> <div class="property-facilities box-inner-summary">
<h5 class="list-group-item-heading"><?php esc_html_e( "Facilities", "opalestate" ); ?></h5> <h5 class="list-group-item-heading"><?php esc_html_e( "Facilities", "opalestate" ); ?></h5>
<div class="list-group-item-text"> <div class="list-group-item-text">

View File

@ -1,51 +0,0 @@
<?php
global $property;
$infos = $property->get_metabox_info();
$types = $property->get_types();
$status = $property->get_status();
?>
ha cong
<div class="box-info">
<h3 class="box-heading"><?php esc_html_e( 'Property Information', 'opalestate-pro' ); ?></h3>
<div class="box-content">
<ul class="list-info">
<?php if ( $infos ): ?>
<?php foreach ( $infos as $key => $info ) : ?>
<?php if ( $info['value'] ) : ?>
<li class="icon-<?php echo esc_attr( $key ); ?>"><span><?php echo esc_html( $info['label'] ); ?></span> <?php echo apply_filters( 'opalestate-pro' . $key . '_unit_format',
trim( $info['value'] )
); ?></li>
<?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>
<?php if ( ! empty( $types ) ): ?>
<li class="icon-type">
<span>
<?php esc_html_e( 'Type', 'opalestate-pro' ); ?>
</span>
<?php foreach ( $types as $type ) : ?>
<a href="<?php echo esc_url( get_term_link( $type ) ); ?>" title="<?php echo esc_attr( $type->name ); ?>">
<?php echo esc_html( $type->name ); ?>
</a>
<?php endforeach; ?>
</li>
<?php endif; ?>
<?php if ( ! empty( $status ) ): ?>
<li class="icon-status">
<span>
<?php esc_html_e( 'Status', 'opalestate-pro' ); ?>
</span>
<?php foreach ( $status as $type ) : ?>
<a href="<?php echo esc_url( get_term_link( $type ) ); ?>" title="<?php echo esc_attr( $type->name ); ?>">
<?php echo esc_html( $type->name ); ?>
</a>
<?php endforeach; ?>
</li>
<?php endif; ?>
</ul>
</div>
</div>

View File

@ -1,7 +1,7 @@
<?php <?php
global $property; global $property;
if ( ! $property->get_block_setting( 'floor_plans' ) ) { if ( 'on' !== $property->get_block_setting( 'floor_plans' ) ) {
return; return;
} }

View File

@ -1,7 +1,7 @@
<?php <?php
global $property; global $property;
if ( ! $property->get_block_setting( 'map' ) ) { if ( 'on' !== $property->get_block_setting( 'map' ) ) {
return; return;
} }

View File

@ -1,7 +1,7 @@
<?php <?php
global $property; global $property;
if ( ! $property->get_block_setting( 'map' ) ) { if ( 'on' !== $property->get_block_setting( 'map' ) ) {
return; return;
} }

View File

@ -1,7 +1,7 @@
<?php <?php
global $property; global $property;
if ( ! $property->get_block_setting( 'nearby' ) ) { if ( 'on' !== $property->get_block_setting( 'nearby' ) ) {
return; return;
} }

View File

@ -1,7 +1,7 @@
<?php <?php
global $property; global $property;
if ( ! $property->get_block_setting( 'video' ) ) { if ( 'on' !== $property->get_block_setting( 'video' ) ) {
return; return;
} }

View File

@ -1,7 +1,7 @@
<?php <?php
global $property; global $property;
if ( ! $property->get_block_setting( 'views_statistics' ) ) { if ( 'on' !== $property->get_block_setting( 'views_statistics' ) ) {
return; return;
} }

View File

@ -1,7 +1,7 @@
<?php <?php
global $property; global $property;
if ( ! $property->get_block_setting( 'virtual_tour' ) ) { if ( 'on' !== $property->get_block_setting( 'virtual_tour' ) ) {
return; return;
} }

View File

@ -1,7 +1,7 @@
<?php <?php
global $property; global $property;
if ( ! $property->get_block_setting( 'walkscores' ) ) { if ( 'on' !== $property->get_block_setting( 'walkscores' ) ) {
return; return;
} }