Origin commit

This commit is contained in:
Hoang Huu
2019-09-10 11:27:33 +07:00
commit 499e068e4f
844 changed files with 188705 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<?php
global $property, $post;
$amenities = $property->get_amenities();
?>
<?php if ( $property->get_block_setting( 'amenities' ) && $amenities ): ?>
<div class="property-amenities box-inner-summary">
<h5 class="list-group-item-heading"><?php esc_html_e( "Amenities", "opalestate" ); ?></h5>
<div class="list-group-item-text">
<div class="opal-row">
<?php foreach ( $amenities as $amenity ): ?>
<div class="col-lg-4 col-sm-4 <?php if ( has_term( $amenity->term_id, 'opalestate_amenities', $post ) ) : ?>active<?php endif; ?>">
<?php
if ( $image_id = get_term_meta( $amenity->term_id, 'opalestate_amt_image_id', true )) {
echo wp_get_attachment_image( $image_id );
}
?>
<?php echo esc_html( $amenity->name ); ?> <i class="fa fa-check"></i>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
<?php endif; ?>

View File

@@ -0,0 +1,55 @@
<?php
global $property;
if ( ! $property->get_block_setting( 'apartments' ) ) {
return;
}
$apartments = $property->get_apartments();
if ( ! $apartments ) {
return;
}
?>
<div class="opalestate-box-content property-apartments-session">
<h4 class="outbox-title" id="block-apartments"><?php esc_html_e( 'Apartments', 'opalestate-pro' ); ?></h4>
<div class="opalestate-box">
<div class="box-info">
<div class="opalestate-aparments-table">
<div class="table-responsive">
<table>
<thead>
<tr>
<th><?php esc_html_e( 'Plot', 'opalestate-pro' ); ?></th>
<th><?php esc_html_e( 'Beds', 'opalestate-pro' ); ?></th>
<th><?php esc_html_e( 'Price From', 'opalestate-pro' ); ?></th>
<th><?php esc_html_e( 'Floor', 'opalestate-pro' ); ?></th>
<th><?php esc_html_e( 'Building / Address', 'opalestate-pro' ); ?></th>
<th><?php esc_html_e( 'Status', 'opalestate-pro' ); ?></th>
<th></th>
</tr>
</thead>
<tbody>
<?php foreach ( $apartments as $key => $apartment ) : ?>
<tr>
<td><?php echo isset( $apartment[ OPALESTATE_PROPERTY_PREFIX . 'apartment_plot' ] ) ? esc_html( $apartment[ OPALESTATE_PROPERTY_PREFIX . 'apartment_plot' ] ) : ''; ?></td>
<td><?php echo isset( $apartment[ OPALESTATE_PROPERTY_PREFIX . 'apartment_beds' ] ) ? esc_html( $apartment[ OPALESTATE_PROPERTY_PREFIX . 'apartment_beds' ] ) : ''; ?></td>
<td><?php echo isset( $apartment[ OPALESTATE_PROPERTY_PREFIX . 'apartment_price_from' ] ) ? esc_html( $apartment[ OPALESTATE_PROPERTY_PREFIX . 'apartment_price_from' ] ) : ''; ?></td>
<td><?php echo isset( $apartment[ OPALESTATE_PROPERTY_PREFIX . 'apartment_floor' ] ) ? esc_html( $apartment[ OPALESTATE_PROPERTY_PREFIX . 'apartment_floor' ] ) : ''; ?></td>
<td><?php echo isset( $apartment[ OPALESTATE_PROPERTY_PREFIX . 'apartment_building_address' ] ) ? esc_html( $apartment[ OPALESTATE_PROPERTY_PREFIX . 'apartment_building_address' ] ) : ''; ?></td>
<td><?php echo isset( $apartment[ OPALESTATE_PROPERTY_PREFIX . 'apartment_status' ] ) ? esc_html( $apartment[ OPALESTATE_PROPERTY_PREFIX . 'apartment_status' ] ) : ''; ?></td>
<td>
<?php if ( isset( $apartment[ OPALESTATE_PROPERTY_PREFIX . 'apartment_link' ] ) ) : ?>
<a class="view-btn" href="<?php echo esc_url( $apartment[ OPALESTATE_PROPERTY_PREFIX . 'apartment_link' ] ); ?>">
<?php esc_html_e( 'view', 'opalestate-pro' ); ?>
</a>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,27 @@
<?php
global $property;
if ( ! $property->get_block_setting( 'attachments' ) ) {
return;
}
$attachments = $property->get_attachments();
?>
<?php if ( $attachments ) : ?>
<div class="property-attachments box-inner-summary">
<h5 class="list-group-item-heading"><?php esc_html_e( 'Attachments', 'opalestate-pro' ); ?></h5>
<div class="list-group-item-text">
<div class="<?php echo apply_filters( 'opalestate_row_container_class', 'opal-row' ); ?>">
<?php foreach ( $attachments as $id => $attachment ) :
$attachment_title = get_the_title( $id );
?>
<div class="col-lg-4 col-sm-4">
<i class="text-secondary fa fa-file-text-o"></i>
<a class="property-attachments__name" href="<?php echo esc_url( $attachment ); ?>" target="_blank"><?php echo esc_html( $attachment_title ); ?></a>
<a class="property-attachments__download" href="<?php echo esc_url( $attachment ); ?>" target="_blank"><?php esc_html_e( 'Download', 'opalestate-pro' ); ?></a>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
<?php endif; ?>

View File

@@ -0,0 +1,51 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
global $post, $property;
$type = $property->get_author_type();
$data = get_userdata( $post->post_author );
$layout = '';
switch ( $type ) {
case 'hide':
return ;
break;
case 'agent' :
$agent_id = $property->get_metabox_value( 'agent' );
$author_info = opalestate_load_template_path( 'single-property/user/author-member-box',
array( 'author' => $data,
'id' => $agent_id ,
'prefix' => OPALESTATE_AGENT_PREFIX,
'picture' => '',
'type' => 'agent',
'hide_description' => true ) );
break;
case 'agency' :
$agency_id = $property->get_metabox_value( 'agency' );
$author_info = opalestate_load_template_path( 'single-property/user/author-member-box',
array( 'author' => $data,
'id' => $agency_id ,
'picture' => '',
'type' => 'agency',
'hide_description' => true ) );
break;
default:
$author_info = opalestate_load_template_path( 'single-property/user/author-user-box', array('author' => $data , 'hide_description' => true ), $layout );
break;
}
?>
<div class="opalestate-box-content property-agent-section">
<div class="opalestate-box">
<div class="author-content-box">
<div class="property-agent-info">
<?php echo wp_kses_post( $author_info ); ?>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,50 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
global $post, $property;
$type = $property->get_author_type();
$data = get_userdata( $post->post_author );
$layout = 'list';
switch ( $type ) {
case 'hide':
return ;
break;
case 'agent' :
$agent_id = $property->get_metabox_value( 'agent' );
$author_info = opalestate_load_template_path( 'single-property/user/author-member-box',
array( 'author' => $data,
'id' => $agent_id ,
'prefix' => OPALESTATE_AGENT_PREFIX,
'picture' => '',
'type' => 'agent',
'hide_description' => true ) );
break;
case 'agency' :
$agency_id = $property->get_metabox_value( 'agency' );
$author_info = opalestate_load_template_path( 'single-property/user/author-member-box',
array( 'author' => $data,
'id' => $agency_id ,
'picture' => '',
'type' => 'agency',
'hide_description' => true ) );
break;
default:
$author_info = opalestate_load_template_path( 'single-property/user/author-user-box', array('author' => $data , 'hide_description' => true ), $layout );
break;
}
?>
<div class="opalestate-box-content property-agent-section">
<div class="opalestate-box">
<div class="author-content-box">
<div class="property-agent-info">
<?php echo wp_kses_post( $author_info ); ?>
</div>
</div>
<?php echo opalestate_load_template_path( 'messages/enquiry-form' , array('nowrap' => true) ); ?>
</div>
</div>

View File

@@ -0,0 +1,60 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
global $post, $property;
$type = $property->get_author_type();
$data = get_userdata( $post->post_author );
$layout = 'list';
switch ( $type ) {
case 'hide':
return;
break;
case 'agent' :
$agent_id = $property->get_metabox_value( 'agent' );
$author_info = opalestate_load_template_path( 'single-property/user/author-member-box',
[
'author' => $data,
'id' => $agent_id,
'prefix' => OPALESTATE_AGENT_PREFIX,
'picture' => '',
'type' => 'agent',
'hide_description' => true,
] );
break;
case 'agency' :
$agency_id = $property->get_metabox_value( 'agency' );
$author_info = opalestate_load_template_path( 'single-property/user/author-member-box',
[
'author' => $data,
'id' => $agency_id,
'picture' => '',
'type' => 'agency',
'hide_description' => true,
] );
break;
default:
$author_info = opalestate_load_template_path( 'single-property/user/author-user-box', [ 'author' => $data, 'hide_description' => true ], $layout );
break;
}
?>
<div class="opalestate-box-content property-agent-section">
<div class="opalestate-box">
<div class="author-content-box">
<div class="opal-row">
<div class="col-lg-6 col-md-6">
<div class="property-agent-info">
<?php echo wp_kses_post( $author_info ); ?>
</div>
</div>
<div class="col-lg-6 col-md-6">
<?php echo opalestate_load_template_path( 'messages/enquiry-form', [ 'nowrap' => true ] ); ?>
</div>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,17 @@
<div class="entry-content">
<h5 class="box-heading"><?php esc_html_e( 'Description', 'opalestate-pro' ); ?></h5>
<?php
/* translators: %s: Name of current post */
the_content( sprintf(
__( 'Continue reading %s ', 'opalestate-pro' ),
the_title( '<span class="screen-reader-text">', '</span>', false )
) );
wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . esc_html__( 'Pages:', 'opalestate-pro' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
) );
?>
</div><!-- .entry-content -->

View File

@@ -0,0 +1,26 @@
<?php
global $property, $post;
$facilities = $property->get_facilities();
?>
<?php if ( $property->get_block_setting( 'facilities' ) && $facilities && isset( $facilities[0] ) && ! empty( $facilities[0] ) ): ?>
<div class="property-facilities box-inner-summary">
<h5 class="list-group-item-heading"><?php esc_html_e( "Facilities", "opalestate" ); ?></h5>
<div class="list-group-item-text">
<div class="<?php echo apply_filters( 'opalestate_row_container_class', 'opal-row' ); ?>">
<?php foreach ( $facilities as $facility ): ?>
<div class="col-lg-6 col-sm-6 active">
<span>
<i class="fa fa-check"></i>
<?php echo esc_html( $facility[ OPALESTATE_PROPERTY_PREFIX . 'public_facilities_key' ] ); ?> :
</span>
<span><?php echo esc_html( $facility[ OPALESTATE_PROPERTY_PREFIX . 'public_facilities_value' ] ); ?></span>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
<?php endif; ?>

View File

@@ -0,0 +1,51 @@
<?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

@@ -0,0 +1,86 @@
<?php
global $property;
if ( ! $property->get_block_setting( 'floor_plans' ) ) {
return;
}
$floor_plans = $property->get_floor_plans();
if ( ! $floor_plans ) {
return;
}
?>
<div class="opalestate-box-content property-floorplans-session">
<h4 class="outbox-title" id="block-floor-plans"><?php esc_html_e( 'Floor Plans', 'opalestate-pro' ); ?></h4>
<div class="opalestate-box">
<div class="box-info">
<div class="opalestate-tab">
<div class="opalestate-tab-head">
<?php foreach ( $floor_plans as $key => $plan ) : ?>
<a href="#plan-<?php echo absint( $key ); ?>" class="tab-item <?php echo ( 0 == $key ) ? 'active' : ''; ?>">
<?php echo isset( $plan[ OPALESTATE_PROPERTY_PREFIX . 'floor_name' ] ) ? esc_html( $plan[ OPALESTATE_PROPERTY_PREFIX . 'floor_name' ] ) : sprintf( esc_html__( 'Plan %s',
'opalestate-pro' ), $key
); ?>
</a>
<?php endforeach; ?>
</div>
<div class="opalestate-floorplans-content">
<?php foreach ( $floor_plans as $key => $plan ) : ?>
<div class="opalestate-tab-content <?php echo ( 0 == $key ) ? 'active' : ''; ?>" id="plan-<?php echo absint( $key ); ?>">
<h2 class="plan-name">
<?php echo isset( $plan[ OPALESTATE_PROPERTY_PREFIX . 'floor_name' ] ) ? esc_html( $plan[ OPALESTATE_PROPERTY_PREFIX . 'floor_name' ] ) : sprintf( esc_html__( 'Plan %s',
'opalestate-pro' ), $key
); ?>
</h2>
<ul class="list-inline">
<?php if ( isset( $plan[ OPALESTATE_PROPERTY_PREFIX . 'floor_price' ] ) ) : ?>
<li class="plan-price">
<label class="plan-label"><?php esc_html_e( 'Price:', 'opalestate-pro' ); ?></label>
<?php echo esc_html( $plan[ OPALESTATE_PROPERTY_PREFIX . 'floor_price' ] ); ?>
</li>
<?php endif; ?>
<?php if ( isset( $plan[ OPALESTATE_PROPERTY_PREFIX . 'floor_size' ] ) ) : ?>
<li class="plan-size">
<label class="plan-label"><?php esc_html_e( 'Size:', 'opalestate-pro' ); ?></label>
<?php echo esc_html( $plan[ OPALESTATE_PROPERTY_PREFIX . 'floor_size' ] ); ?>
</li>
<?php endif; ?>
<?php if ( isset( $plan[ OPALESTATE_PROPERTY_PREFIX . 'floor_room' ] ) ) : ?>
<li class="plan-room">
<label class="plan-label"><?php esc_html_e( 'Rooms:', 'opalestate-pro' ); ?></label>
<?php echo esc_html( $plan[ OPALESTATE_PROPERTY_PREFIX . 'floor_room' ] ); ?>
</li>
<?php endif; ?>
<?php if ( isset( $plan[ OPALESTATE_PROPERTY_PREFIX . 'floor_bath' ] ) ) : ?>
<li class="plan-bath">
<label class="plan-label"><?php esc_html_e( 'Baths:', 'opalestate-pro' ); ?></label>
<?php echo esc_html( $plan[ OPALESTATE_PROPERTY_PREFIX . 'floor_bath' ] ); ?>
</li>
<?php endif; ?>
</ul>
<?php if ( isset( $plan[ OPALESTATE_PROPERTY_PREFIX . 'floor_content' ] ) ) : ?>
<div class="plan-content">
<?php echo esc_html( $plan[ OPALESTATE_PROPERTY_PREFIX . 'floor_content' ] ); ?>
</div>
<?php endif; ?>
<?php if ( isset( $plan[ OPALESTATE_PROPERTY_PREFIX . 'floor_image_id' ] ) && $plan[ OPALESTATE_PROPERTY_PREFIX . 'floor_image_id' ] ) : ?>
<div class="plan-image">
<?php echo wp_get_attachment_image( $plan[ OPALESTATE_PROPERTY_PREFIX . 'floor_image_id' ], 'full' ); ?>
</div>
<?php endif; ?>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,36 @@
<?php
global $property;
$infos = $property->get_meta_fullinfo();
$taxs = $property->get_types_tax();
?>
<div class="property-information box-inner-summary">
<h5><?php esc_html_e( 'Quick Information', 'opalestate-pro' ); ?></h5>
<div class="box-content">
<ul class="list-info row">
<?php if ( $taxs ): ?>
<li class="wp-col-md-6">
<div class="property-label-type">
<h6><?php esc_html_e( 'Type:', 'opalestate-pro' ); ?></h6>
<?php foreach ( $taxs as $tax ): ?>
<a href="<?php echo get_term_link( $tax->term_id ); ?>"><?php echo esc_html( $tax->name ); ?></a>
<?php endforeach; ?>
</div>
</li>
<?php endif; ?>
<?php if ( $infos ): ?>
<?php foreach ( $infos as $key => $info ) : ?>
<?php if ( $info['value'] ) : ?>
<li class="wp-col-md-6 ">
<div class="property-label-<?php echo esc_attr( $key ); ?>">
<h6><i class="fa icon-property-<?php echo esc_attr( $key ); ?>"></i> <?php echo esc_html( $info['label'] ); ?> : </h6>
<span><?php echo apply_filters( 'opalestate_' . $key . '_unit_format', trim( $info['value'] ) ); ?></span>
</div>
</li>
<?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>
</ul>
</div>
</div>

View File

@@ -0,0 +1,19 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
global $property, $post;
$locations = $property->getLocations();
if ( !empty($locations) ) :
?>
<?php foreach ($locations as $location) : ?>
<a href="<?php echo esc_url( get_term_link( $location ) ); ?>" title="<?php echo esc_attr( $location->name ); ?>">
<?php echo esc_html( $location->name ); ?>
</a>
<?php endforeach; ?>
<?php endif; ?>

View File

@@ -0,0 +1,95 @@
<?php
global $property;
if ( ! $property->get_block_setting( 'map' ) ) {
return;
}
$maps = $property->get_map();
if ( empty( $maps ) ) {
return;
}
?>
<div class="property-map-section">
<div class="box-content v2">
<div class="google-map-tabs">
<div class="opalestate-tab">
<div class="nav opalestate-tab-head" role="tablist">
<a aria-expanded="true" href="#tab-picture" role="tab" class="tab-item"><i class="fa fa-picture-o"></i> <span><?php esc_html_e( 'Picture', 'opalestate-pro' ); ?></span></a>
<a aria-expanded="false" href="#tab-google-map" role="tab" class="tab-item"><i class="fa fa-map"></i> <span><?php esc_html_e( 'Map', 'opalestate-pro' ); ?></span></a>
<?php if ( $property->enable_google_mapview() ) : ?>
<a aria-expanded="true" href="#property-street-view-map" class="tab-google-street-view-btn" role="tab" class="tab-item">
<i class="fa fa-street-view"></i>
<span><?php esc_html_e( 'Street View', 'opalestate-pro' ); ?></span>
</a>
<?php endif; ?>
</div>
</div>
<div class="opalestate-tab-wrap">
<div class="tab-pane fade active in" id="tab-picture">
<?php
/**
* opalestate_before_single_property_summary hook
*/
do_action( 'opalestate_single_property_preview' );
?>
</div>
<div class="tab-pane fade" id="tab-google-map">
<div class="property-map-section">
<div id="property-map" style="height:700px" data-latitude="<?php echo( isset( $maps['latitude'] ) ? $maps['latitude'] : '' ); ?>"
data-longitude="<?php echo( isset( $maps['longitude'] ) ? $maps['longitude'] : '' ); ?>" data-icon="<?php echo esc_url( OPALESTATE_CLUSTER_ICON_URL ); ?>"></div>
<div id="property-search-places">
<div class="place-buttons">
<div class="nearby-container">
<div class="btn-map-search" data-group="hospital" data-type="hospital" data-icon="hospital.png">
<i class="fa fa-hospital-o" aria-hidden="true"></i>
<span><?php esc_html_e( 'Hospital', 'opalestate-pro' ); ?></span>
</div>
</div>
<div class="nearby-container">
<div class="btn-map-search" data-group="library" data-type="library" data-icon="libraries.png">
<i class="fa fa-bank" aria-hidden="true"></i>
<span><?php esc_html_e( 'Library', 'opalestate-pro' ); ?></span>
</div>
</div>
<div class="nearby-container">
<div class="btn-map-search" data-group="pharmacy" data-type="pharmacy" data-icon="pharmacy.png">
<i class="fa fa-plus-square" aria-hidden="true"></i>
<span><?php esc_html_e( 'Pharmacy', 'opalestate-pro' ); ?></span>
</div>
</div>
<div class="nearby-container">
<div class="btn-map-search" data-group="school" data-type="school, university" data-icon="school.png">
<i class="fa fa-graduation-cap" aria-hidden="true"></i>
<span><?php esc_html_e( 'School', 'opalestate-pro' ); ?></span>
</div>
</div>
<div class="nearby-container">
<div class="btn-map-search" data-group="shopping" data-type="grocery_or_supermarket, shopping_mall" data-icon="supermarket.png">
<i class="fa fa-shopping-basket" aria-hidden="true"></i>
<span><?php esc_html_e( 'Shopping', 'opalestate-pro' ); ?></span>
</div>
</div>
<div class="nearby-container">
<div class="btn-map-search" data-group="trainstation" data-type="bus_station', subway_station, train_station, airport" data-icon="transportation.png">
<i class="fa fa-subway" aria-hidden="true"></i>
<span><?php esc_html_e( 'Trainstation', 'opalestate-pro' ); ?></span>
</div>
</div>
</div>
</div>
</div>
</div>
<?php if ( $property->enable_google_mapview() ) : ?>
<div class="tab-pane fade" id="property-street-view-map" style="height:500px;">
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,98 @@
<?php
global $property;
if ( ! $property->get_block_setting( 'map' ) ) {
return;
}
$maps = $property->get_map();
if ( empty( $maps ) ) {
return;
}
$id = time();
?>
<div class="opalestate-box-content property-map-section">
<h4 class="outbox-title" id="block-map"><?php esc_html_e( 'Property on Map', 'opalestate-pro' ); ?></h4>
<div class="opalestate-box">
<div class="box-content">
<div class="google-map-tabs opalestate-tab">
<div class="opalestate-tab-wrap" >
<div class="nav opalestate-tab-head" role="tablist">
<a aria-expanded="false" href="#tab-google-map" role="tab" class="tab-item"><i class="fa fa-map"></i> <span><?php esc_html_e( 'Map', 'opalestate-pro' ); ?></span></a>
<?php if ( $property->enable_google_mapview() ) : ?>
<a aria-expanded="true" href="#property-street-view-map" role="tab" class="tab-item tab-google-street-view-btn"><i class="fa fa-street-view"></i>
<span><?php esc_html_e( 'Street View', 'opalestate-pro' ); ?></span></a>
<?php endif; ?>
</div>
</div>
</div>
<div class="opalestate-tabs-content">
<div class="opalestate-tab-content" id="tab-google-map">
<div class="property-map-section" style="position: relative;">
<div id="property-map<?php echo esc_attr($id); ?>" class="property-preview-map" style="height:500px" data-latitude="<?php echo( isset( $maps['latitude'] ) ? $maps['latitude'] : '' ); ?>"
data-longitude="<?php echo( isset( $maps['longitude'] ) ? $maps['longitude'] : '' ); ?>" data-icon="<?php echo esc_url( OPALESTATE_CLUSTER_ICON_URL ); ?>"></div>
<div id="property-search-places" class="property-search-places">
<div class="place-buttons">
<div class="nearby-container">
<div class="btn-map-search" data-group="hospital" data-type="hospital" data-icon="hospital.png">
<i class="fa fa-hospital-o" aria-hidden="true"></i>
<span><?php esc_html_e( 'Hospital', 'opalestate-pro' ); ?></span>
</div>
</div>
<div class="nearby-container">
<div class="btn-map-search" data-group="library" data-type="library" data-icon="libraries.png">
<i class="fa fa-bank" aria-hidden="true"></i>
<span><?php esc_html_e( 'Library', 'opalestate-pro' ); ?></span>
</div>
</div>
<div class="nearby-container">
<div class="btn-map-search" data-group="pharmacy" data-type="pharmacy" data-icon="pharmacy.png">
<i class="fa fa-plus-square" aria-hidden="true"></i>
<span><?php esc_html_e( 'Pharmacy', 'opalestate-pro' ); ?></span>
</div>
</div>
<div class="nearby-container">
<div class="btn-map-search" data-group="school" data-type="school, university" data-icon="school.png">
<i class="fa fa-graduation-cap" aria-hidden="true"></i>
<span><?php esc_html_e( 'School', 'opalestate-pro' ); ?></span>
</div>
</div>
<div class="nearby-container">
<div class="btn-map-search" data-group="shopping" data-type="grocery_or_supermarket, shopping_mall" data-icon="supermarket.png">
<i class="fa fa-shopping-basket" aria-hidden="true"></i>
<span><?php esc_html_e( 'Shopping', 'opalestate-pro' ); ?></span>
</div>
</div>
<div class="nearby-container">
<div class="btn-map-search" data-group="trainstation" data-type="bus_station', subway_station, train_station, airport" data-icon="transportation.png">
<i class="fa fa-subway" aria-hidden="true"></i>
<span><?php esc_html_e( 'Trainstation', 'opalestate-pro' ); ?></span>
</div>
</div>
</div>
</div>
</div>
</div>
<?php if ( $property->enable_google_mapview() ) : ?>
<div class="opalestate-tab-content" id="property-street-view-map" style="height:500px;">
<div class="property-preview property-preview-street-map" data-latitude="<?php echo (isset($maps['latitude']) ? $maps['latitude'] : ''); ?>" data-longitude="<?php echo (isset($maps['longitude']) ? $maps['longitude'] : ''); ?>" id="property-streep-map-<?php echo esc_attr($id); ?>">
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,37 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
global $property, $post;
$meta = $property->get_meta_shortinfo();
?>
<div class="property-meta">
<div class="<?php echo apply_filters( 'opalestate_row_container_class', 'opal-row' ); ?>">
<div class="col-lg-3 col-md-3">
<div class="property-price">
<span><?php esc_html_e( 'Price:', 'opalestate-pro' ); ?><?php echo opalestate_price_format( $property->get_price() ); ?></span>
<?php if ( $property->get_sale_price() ): ?>
<span class="property-saleprice"><?php echo opalestate_price_format( $property->get_sale_price() ); ?></span>
<?php endif; ?>
<?php if ( $property->get_price_label() ): ?>
<span class="property-price-label"><?php echo esc_html( $property->get_price_label() ); ?></span>
<?php endif; ?>
</div>
</div>
<div class="col-lg-9 col-md-9">
<ul class="property-meta-list list-inline">
<?php if ( $meta ) : ?>
<?php foreach ( $meta as $key => $info ) : ?>
<li class="property-label-<?php echo esc_attr( $key ); ?>">
<i class="icon-property-<?php echo esc_attr( $key ); ?>"></i><?php echo esc_html( $info['label'] ); ?> <span>
<?php echo apply_filters( 'opalestate-pro' . $key . '_unit_format', trim( $info['value'] ) ); ?></span>
</li>
<?php endforeach; ?>
<?php endif; ?>
</ul>
</div>
</div>
</div>

View File

@@ -0,0 +1,53 @@
<?php
global $property;
if ( ! $property->get_block_setting( 'nearby' ) ) {
return;
}
if ( ! Opalestate_Yelp::get_client_id() || ! Opalestate_Yelp::get_app_key() ) {
return;
}
$categories = Opalestate_Yelp::get_categories();
if ( ! $categories ) {
return;
}
$map = $property->get_map();
$latitude = $map['latitude'];
$longitude = $map['longitude'];
if ( ! $latitude || ! $longitude ) {
return;
}
?>
<div class="opalestate-box-content property-nearby-session">
<h4 class="outbox-title" id="block-nearby"><?php esc_html_e( 'What\'s nearby', 'opalestate-pro' ); ?></h4>
<div class="opalestate-box">
<div class="box-info">
<div id="opalestate-yelp" class="loading"></div>
<script>
jQuery( document ).ready( function () {
function opalestate_load_yelp_places( property_id ) {
jQuery.ajax( {
type: 'POST',
dataType: 'json',
url: opalesateJS.ajaxurl,
data: 'action=opalestate_load_yelp_places&property_id=' + property_id,
success: function ( response ) {
jQuery( '#opalestate-yelp' ).removeClass( 'loading' ).html( response.result );
jQuery( '#opalestate-yelp' ).html( response.result );
},
error: function ( response ) {
}
} );
}
opalestate_load_yelp_places(<?php echo absint( $property->get_id() ); ?>);
} );
</script>
</div>
</div>
</div>

View File

@@ -0,0 +1,100 @@
<div class="property-preview">
<?php
global $property;
$galleries = $property->get_gallery();
$image_size = opalestate_get_option( 'opalestate_thumbnail_size', 'medium' );
if ( isset( $galleries ) && $galleries ):
?>
<?php
$_id = 'posts-block-' . rand( 1, 9 );
$item = apply_filters( 'opalesate_related_property_column', 1 );
$data = [
'slidesPerView' => 1,
'spaceBetween' => 0,
'loop' => true,
'autoHeight' => 1,
'pagination' => 0,
'effect' => 'slide',
'breakpoints' => [ 1024 => [ "slidesPerView" => 1 ] ],
'thumbnails_nav' => "#swiper-pagination-images",
];
$columns = apply_filters( 'opalestate_thumbnail_nav_column', 5 );
$datanav = [
'slidesPerView' => $columns,
'spaceBetween' => 10,
'effect' => 'slide',
'slideToClickedSlide' => true,
'touchRatio' => 0.2,
'loop' => false,
'breakpoints' => [ 1024 => [ "slidesPerView" => 5 ], 768 => [ "slidesPerView" => 3 ] ],
'navigation' => [
'nextEl' => '.swiper-button-next',
'prevEl' => '.swiper-button-prev',
],
];
?>
<div class="opalestate-swiper-wrap">
<div class="opalestate-swiper-play swiper-container"
id="postcarousel-<?php echo esc_attr( $_id ); ?>"
data-swiper="<?php echo esc_attr( wp_json_encode( $data ) ); ?>">
<div class="swiper-wrapper opalestate-gallery">
<?php if ( has_post_thumbnail() ): ?>
<div class="swiper-slide">
<?php the_post_thumbnail( opalestate_get_option( 'featured_image_size', 'full' ) ); ?>
</div>
<?php endif; ?>
<?php if ( isset( $galleries ) && is_array( $galleries ) && $galleries ): ?>
<?php foreach ( $galleries as $src ): ?>
<div class="swiper-slide">
<img src="<?php echo esc_url( $src ); ?>" alt="gallery">
</div>
<?php endforeach; ?>
<?php endif; ?>
</div>
</div>
<div class="swiper-pagination-images swiper-container" id="swiper-pagination-images" data-swiper="<?php echo esc_attr( wp_json_encode( $datanav ) ); ?>">
<?php
$count_galleries = 0;
if ( has_post_thumbnail() ) {
$count_galleries = $count_galleries + 1;
}
$count_galleries = $count_galleries + count( $galleries );
?>
<?php if ( $count_galleries > $columns ) : ?>
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
<?php endif; ?>
<div class="swiper-wrapper">
<?php if ( has_post_thumbnail() ):
?>
<div class="swiper-slide">
<div style="background-image:url('<?php echo wp_get_attachment_thumb_url( get_post_thumbnail_id(), $image_size ); ?>');" class="thumb-nav"></div>
</div>
<?php endif; ?>
<?php if ( isset( $galleries ) && is_array( $galleries ) && $galleries ): ?>
<?php foreach ( $galleries as $key => $src ): ?>
<div class="swiper-slide">
<div style="background-image:url('<?php echo wp_get_attachment_image_url( $key, $image_size ); ?>');" class="thumb-nav"></div>
</div>
<?php endforeach; ?>
<?php endif; ?>
</div>
</div>
</div>
<?php else : ?>
<?php if ( has_post_thumbnail() ): ?>
<div class="property-thumbnail">
<?php the_post_thumbnail( 'full' ); ?>
</div>
<?php endif; ?>
<?php endif; ?>
</div>

View File

@@ -0,0 +1,87 @@
<div class="property-preview property-preview-custom-size">
<?php
global $property;
$galleries = $property->get_gallery();
$image_size = opalestate_get_option( 'opalestate_thumbnail_size' );
if ( ! empty( $galleries ) && isset( $galleries ) ):
?>
<?php
$_id = 'posts-block-' . rand( 1, 9 );
$item = apply_filters( 'opalesate_related_property_column', 1 );
$data = [
'slidesPerView' => 1,
'spaceBetween' => 0,
'effect' => 'fade',
'loop' => true,
'pagination' => 0,
'breakpoints' => [ 1024 => [ "slidesPerView" => 1 ] ],
];
$columns = apply_filters( 'opalestate_thumbnail_nav_column', 5 );
$src = wp_get_attachment_url( get_post_thumbnail_id() );
$show = 9;
$items = array_chunk( $galleries, $show );
if ( count( $items[0] ) < $show ) {
for ( $i = count( $items[0] ); $i < $show; $i++ ) {
$items[0][ $i ] = 'none';
}
$hasMore = false;
} else {
$hasMore = true;
}
// echo '<pre>' . print_r( $items,1 );die;
?>
<div class="gallery-metro-preview opalestate-gallery">
<div class="metro-big">
<a href="<?php echo esc_url( $src ); ?>" style="background-image:url('<?php echo esc_url( $src ); ?>')"></a>
</div>
<div class="metro-group-small">
<?php if ( isset( $items[0] ) && is_array( $items[0] ) ): ?>
<?php foreach ( $items[0] as $key => $src ): ?>
<?php if ( $src == "none" ) : ?>
<div class="metro-small no-image">
<div class="show-first-photo">
</div>
</div>
<?php else: ?>
<div class="metro-small">
<?php if ( $hasMore && $key == count( $items[0] ) - 1 ):
$content = $show . "+"; ?>
<a href="<?php echo esc_url( $src ); ?>" class="has-more" style="background-image:url('<?php echo esc_url( $src ); ?>')">
<span><em><?php echo $content; ?></em></span>
</a>
<?php if ( isset( $items[1] ) ): ?>
<?php foreach ( $items[1] as $_src ): ?>
<a class="hide" href="<?php echo esc_url( $_src ); ?>" style="background-image:url('<?php echo esc_url( $_src ); ?>')"></a>
<?php endforeach; ?>
<?php endif; ?>
<?php else : ?>
<a href="<?php echo esc_url( $src ); ?>" style="background-image:url('<?php echo esc_url( $src ); ?>')"></a>
<?php endif; ?>
</div>
<?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>
</div>
</div>
<?php else : ?>
<?php if ( has_post_thumbnail() ): ?>
<div class="property-thumbnail">
<?php the_post_thumbnail( 'full' ); ?>
</div>
<?php endif; ?>
<?php endif; ?>
</div>

View File

@@ -0,0 +1,78 @@
<div class="property-preview">
<div class="preview-gallery-slider">
<?php
global $property;
$galleries = $property->get_gallery();
$image_size = opalestate_get_option( 'opalestate_thumbnail_size' );
if ( ! empty( $galleries ) && isset( $galleries ) ):
?>
<?php
$_id = 'posts-block-' . rand( 1, 9 );
$item = apply_filters( 'opalesate_related_property_column', 1 );
$data = [
'slidesPerView' => 1,
'autoHeight' => 1,
'spaceBetween' => 0,
'effect' => 'fade',
'loop' => true,
'pagination' => 0,
'breakpoints' => [ 1024 => [ "slidesPerView" => 1 ] ],
];
$columns = apply_filters( 'opalestate_thumbnail_nav_column', 5 );
?>
<div class="opalestate-swiper-wrap">
<div class="opalestate-swiper-play swiper-container"
id="postcarousel-<?php echo esc_attr( $_id ); ?>"
data-swiper="<?php echo esc_attr( wp_json_encode( $data ) ); ?>">
<div class="swiper-wrapper">
<?php if ( has_post_thumbnail() ): ?>
<div class="swiper-slide"><?php the_post_thumbnail( opalestate_get_option( 'featured_image_size', 'full' ) ); ?></div>
<?php endif; ?>
<?php if ( isset( $galleries ) && is_array( $galleries ) ): ?>
<?php foreach ( $galleries as $src ): ?>
<div class="swiper-slide"><img src="<?php echo esc_url( $src ); ?>" alt="gallery"></div>
<?php endforeach; ?>
<?php endif; ?>
</div>
</div>
</div>
<?php else : ?>
<?php if ( has_post_thumbnail() ): ?>
<div class="property-thumbnail">
<?php the_post_thumbnail( 'full' ); ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if ( isset( $showinfo ) && $showinfo ): ?>
<div class="property-abs-info">
<div class="property-meta">
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
<div class="property-address clearfix">
<div class="pull-left">
<?php if ( $property->latitude && $property->longitude ) : ?>
<a href="<?php echo esc_url( $property->get_google_map_link() ); ?>" rel="nofollow" target="_blank">
<span class="property-view-map">
<i class="fa fa-map-marker"></i>
</span>
</a>
<?php endif; ?>
<?php echo esc_html( $property->get_address() ); ?>
</div>
</div>
</div>
<?php opalestate_get_single_short_meta(); ?>
<div class="single-price-content"><?php opalestate_property_loop_price(); ?></div>
</div>
<?php endif; ?>
</div>
</div>

View File

@@ -0,0 +1,56 @@
<?php
global $property;
$maps = $property->get_map();
if ( !empty($maps) ):
$id = time();
?>
<div class="property-preview property-preview-custom-size">
<div id="property-map<?php echo esc_attr($id); ?>" class="property-preview-map" data-latitude="<?php echo (isset($maps['latitude']) ? $maps['latitude'] : ''); ?>" data-longitude="<?php echo (isset($maps['longitude']) ? $maps['longitude'] : ''); ?>" data-icon="<?php echo esc_url(OPALESTATE_CLUSTER_ICON_URL);?>"></div>
<div id="property-search-places" class="property-search-places">
<div class="place-buttons">
<div class="nearby-container">
<div class="btn-map-search" data-group="hospital" data-type="hospital" data-icon="hospital.png">
<i class="fa fa-hospital-o" aria-hidden="true"></i>
<span><?php esc_html_e( 'Hospital', 'opalestate-pro' ); ?></span>
</div>
</div>
<div class="nearby-container">
<div class="btn-map-search" data-group="library" data-type="library" data-icon="libraries.png">
<i class="fa fa-bank" aria-hidden="true"></i>
<span><?php esc_html_e( 'Library', 'opalestate-pro' ); ?></span>
</div>
</div>
<div class="nearby-container">
<div class="btn-map-search" data-group="pharmacy" data-type="pharmacy" data-icon="pharmacy.png">
<i class="fa fa-plus-square" aria-hidden="true"></i>
<span><?php esc_html_e( 'Pharmacy', 'opalestate-pro' ); ?></span>
</div>
</div>
<div class="nearby-container">
<div class="btn-map-search" data-group="school" data-type="school" data-icon="school.png">
<i class="fa fa-graduation-cap" aria-hidden="true"></i>
<span><?php esc_html_e( 'School', 'opalestate-pro' ); ?></span>
</div>
</div>
<div class="nearby-container">
<div class="btn-map-search" data-group="shopping" data-type="grocery_or_supermarket" data-icon="supermarket.png">
<i class="fa fa-shopping-basket" aria-hidden="true"></i>
<span><?php esc_html_e( 'Shopping', 'opalestate-pro' ); ?></span>
</div>
</div>
<div class="nearby-container">
<div class="btn-map-search" data-group="trainstation" data-type="bus_station" data-icon="transportation.png">
<i class="fa fa-subway" aria-hidden="true"></i>
<span><?php esc_html_e( 'Trainstation', 'opalestate-pro' ); ?></span>
</div>
</div>
</div>
</div>
</div>
<?php endif;?>

View File

@@ -0,0 +1,32 @@
<?php global $property; ?>
<div class="property-preview property-mark-pics-preview">
<?php if ( has_post_thumbnail() ): ?>
<div class="property-thumbnail">
<?php the_post_thumbnail( 'full' ); ?>
</div>
<?php endif; ?>
<div class="container property-heading-top">
<div class="property-single-info">
<div class="group-items">
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
<?php opalestate_property_status(); ?>
<div class="property-meta">
<div class="property-address clearfix">
<div class="pull-left">
<?php if ( $property->latitude && $property->longitude ) : ?>
<a href="<?php echo esc_url( $property->get_google_map_link() ); ?>" rel="nofollow" target="_blank">
<span class="property-view-map"><i class="fa fa-map-marker"></i></span>
</a>
<?php endif; ?>
<?php echo esc_html( $property->get_address() ); ?>
</div>
</div>
</div>
</div>
<div class="single-price-content"><?php opalestate_property_loop_price(); ?></div>
</div>
</div>
</div>

View File

@@ -0,0 +1,97 @@
<?php
global $property;
$maps = $property->get_map();
if ( ! empty( $maps ) ):
$id = time();
?>
<div class="opalestate-preview opalestate-preview-tabs">
<div class="google-map-tabs opalestate-tab" data-active="tab-<?php echo esc_attr( $tab_active ); ?>">
<div class="opalestate-tab-wrap">
<div class="nav opalestate-tab-head" role="tablist">
<a aria-expanded="false" href="#tab-gallery-slider" role="tab" class="tab-item"><i class="fa fa-picture-o"></i> <span><?php esc_html_e( 'Gallery', 'opalestate-pro' ); ?></span></a>
<a aria-expanded="false" href="#tab-google-map" role="tab" class="tab-item"><i class="fa fa-map"></i> <span><?php esc_html_e( 'Map', 'opalestate-pro' ); ?></span></a>
<?php if ( $property->enable_google_mapview() ) : ?>
<a aria-expanded="true" href="#tab-street-view-map" role="tab" class="tab-item tab-google-street-view-btn" data-target=".tab-google-street-view-btn"><i
class="fa fa-street-view"></i> <span><?php esc_html_e( 'Street View', 'opalestate-pro' ); ?></span></a>
<?php endif; ?>
</div>
</div>
<div class="opalestate-map-content">
<div class="opalestate-tab-content" id="tab-gallery-slider">
<?php echo opalestate_load_template_path( 'single-property/preview/gallery-slider' ); ?>
</div>
<div class="opalestate-tab-content" id="tab-google-map">
<div class="property-preview property-preview-custom-size">
<div id="property-map<?php echo esc_attr( $id ); ?>" class="property-preview-map" data-latitude="<?php echo( isset( $maps['latitude'] ) ? $maps['latitude'] : '' ); ?>"
data-longitude="<?php echo( isset( $maps['longitude'] ) ? $maps['longitude'] : '' ); ?>" data-icon="<?php echo esc_url( OPALESTATE_CLUSTER_ICON_URL ); ?>"></div>
<div id="property-search-places" class="property-search-places">
<div class="place-buttons">
<div class="nearby-container">
<div class="btn-map-search" data-group="hospital" data-type="hospital" data-icon="hospital.png">
<i class="fa fa-hospital-o" aria-hidden="true"></i>
<span><?php esc_html_e( 'Hospital', 'opalestate-pro' ); ?></span>
</div>
</div>
<div class="nearby-container">
<div class="btn-map-search" data-group="library" data-type="library" data-icon="libraries.png">
<i class="fa fa-bank" aria-hidden="true"></i>
<span><?php esc_html_e( 'Library', 'opalestate-pro' ); ?></span>
</div>
</div>
<div class="nearby-container">
<div class="btn-map-search" data-group="pharmacy" data-type="pharmacy" data-icon="pharmacy.png">
<i class="fa fa-plus-square" aria-hidden="true"></i>
<span><?php esc_html_e( 'Pharmacy', 'opalestate-pro' ); ?></span>
</div>
</div>
<div class="nearby-container">
<div class="btn-map-search" data-group="school" data-type="school" data-icon="school.png">
<i class="fa fa-graduation-cap" aria-hidden="true"></i>
<span><?php esc_html_e( 'School', 'opalestate-pro' ); ?></span>
</div>
</div>
<div class="nearby-container">
<div class="btn-map-search" data-group="shopping" data-type="grocery_or_supermarket" data-icon="supermarket.png">
<i class="fa fa-shopping-basket" aria-hidden="true"></i>
<span><?php esc_html_e( 'Shopping', 'opalestate-pro' ); ?></span>
</div>
</div>
<div class="nearby-container">
<div class="btn-map-search" data-group="trainstation" data-type="bus_station" data-icon="transportation.png">
<i class="fa fa-subway" aria-hidden="true"></i>
<span><?php esc_html_e( 'Trainstation', 'opalestate-pro' ); ?></span>
</div>
</div>
</div>
</div>
</div>
</div>
<?php if ( $property->enable_google_mapview() ) : ?>
<div class="opalestate-tab-content" id="tab-street-view-map">
<div class="property-preview property-preview-custom-size property-preview-street-map" style="min-height:580px"
data-latitude="<?php echo( isset( $maps['latitude'] ) ? $maps['latitude'] : '' ); ?>"
data-longitude="<?php echo( isset( $maps['longitude'] ) ? $maps['longitude'] : '' ); ?>" id="property-streep-map-<?php echo esc_attr( $id ); ?>">
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
<?php endif; ?>

View File

@@ -0,0 +1,15 @@
<?php
global $property;
$virtualTour = $property->get_virtual_tour();
?>
<?php if( $virtualTour ) : ?>
<div class="property-preview property-preview-custom-size">
<?php echo do_shortcode( $virtualTour ); ?>
</div>
<?php else : ?>
<?php if ( has_post_thumbnail() ): ?>
<div class="property-thumbnail">
<?php the_post_thumbnail( 'full' ); ?>
</div>
<?php endif; ?>
<?php endif; ?>

View File

@@ -0,0 +1,13 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
global $property, $post;
$fomart = $property->get_format_price();
?>
<div class="property-price">
<?php esc_html_e( 'Price:', 'opalestate-pro' ); ?><?php echo esc_html( $fomart . $property->get_price() ); ?>
</div>
<div class="property-saleprice">
<?php esc_html_e( 'Sale Price:', 'opalestate-pro' ); ?><?php echo esc_html( $fomart . $property->get_sale_price() ); ?>
</div>

View File

@@ -0,0 +1,21 @@
<?php
global $post;
$agent_id = Opalestate_Query::get_agent_by_property($post->ID);
$properties = Opalestate_Query::get_agent_property( get_the_ID(), $agent_id, 3 );
if( $properties->have_posts() ) :
?>
<div class="box-info property-same-agent-section clearfix">
<h4 class="box-heading"><?php printf( esc_html__( 'Properties by %s', 'opalestate-pro' ), get_the_title( $agent_id ) ); ?></h4>
<div class="box-content opalestate-rows">
<div class="<?php echo apply_filters('opalestate_row_container_class', 'opal-row');?>">
<?php while( $properties->have_posts() ) : $properties->the_post(); ?>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<?php echo opalestate_load_template_path( 'content-property-grid' ); ?>
</div>
<?php endwhile; ?>
</div>
</div>
</div>
<?php wp_reset_postdata(); ?>
<?php endif; ?>

View File

@@ -0,0 +1,81 @@
<?php
/**
* $Desc
*
* @version $Id$
* @package wpbase
* @author WPOpal Team <opalwordpress@gmail.com>
* @copyright Copyright (C) 2015 wpopal.com. All Rights Reserved.
* @license GNU/GPL v2 or later http://www.gnu.org/licenses/gpl-2.0.html
*
* @website http://www.wpopal.com
* @support http://www.wpopal.com/questions/
*/
/**
* Enable/distable share box
*/
global $post;
$args = array( 'position' => 'top', 'animation' => 'true' );
?>
<div class="<?php echo apply_filters('opalestate_row_container_class', 'row opal-row');?>">
<div class="col-lg-12 col-md-12">
<h6 class="pull-left"><?php esc_html_e("Share this:", "fullhouse"); ?></h6>
<div class="pbr-social-share">
<div class="bo-social-icons bo-sicolor social-radius-rounded">
<?php if((bool)opalestate_options('facebook_share_blog',true)): ?>
<a class="bo-social-facebook" data-toggle="tooltip" data-placement="<?php echo esc_attr($args['position']); ?>" data-animation="<?php echo esc_attr($args['animation']); ?>" data-original-title="Facebook" href="http://www.facebook.com/sharer.php?s=100&p&#91;url&#93;=<?php the_permalink(); ?>&p&#91;title&#93;=<?php the_title(); ?>" target="_blank" title="<?php esc_html_e('Share on facebook', 'opalestate-pro'); ?>">
<i class="fa fa-facebook"></i>
</a>
<?php endif; ?>
<?php if((bool)opalestate_options('twitter_share_blog',true)): ?>
<a class="bo-social-twitter" data-toggle="tooltip" data-placement="<?php echo esc_attr($args['position']); ?>" data-animation="<?php echo esc_attr($args['animation']); ?>" data-original-title="Twitter" href="http://twitter.com/home?status=<?php the_title(); ?> <?php the_permalink(); ?>" target="_blank" title="<?php esc_html_e('Share on Twitter', 'opalestate-pro'); ?>">
<i class="fa fa-twitter"></i>
</a>
<?php endif; ?>
<?php if((bool)opalestate_options('linkedin_share_blog',true)): ?>
<a class="bo-social-linkedin" data-toggle="tooltip" data-placement="<?php echo esc_attr($args['position']); ?>" data-animation="<?php echo esc_attr($args['animation']); ?>" data-original-title="LinkedIn" href="http://linkedin.com/shareArticle?mini=true&amp;url=<?php the_permalink(); ?>&amp;title=<?php the_title(); ?>" target="_blank" title="<?php esc_html_e('Share on LinkedIn', 'opalestate-pro'); ?>">
<i class="fa fa-linkedin"></i>
</a>
<?php endif; ?>
<?php if((bool)opalestate_options('tumblr_share_blog',true)): ?>
<a class="bo-social-tumblr" data-toggle="tooltip" data-placement="<?php echo esc_attr($args['position']); ?>" data-animation="<?php echo esc_attr($args['animation']); ?>" data-original-title="Tumblr" href="http://www.tumblr.com/share/link?url=<?php echo urlencode(get_permalink()); ?>&amp;name=<?php echo urlencode($post->post_title); ?>&amp;description=<?php echo urlencode(get_the_excerpt()); ?>" target="_blank" title="<?php esc_html_e('Share on Tumblr', 'opalestate-pro'); ?>">
<i class="fa fa-tumblr"></i>
</a>
<?php endif; ?>
<?php if((bool)opalestate_options('google_share_blog',true)): ?>
<a class="bo-social-google" data-toggle="tooltip" data-placement="<?php echo esc_attr($args['position']); ?>" data-animation="<?php echo esc_attr($args['animation']); ?>" data-original-title="Google plus" href="https://plus.google.com/share?url=<?php the_permalink(); ?>" onclick="javascript:window.open(this.href,
'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" target="_blank" title="<?php esc_html_e('Share on Google plus', 'opalestate-pro'); ?>">
<i class="fa fa-google-plus"></i>
</a>
<?php endif; ?>
<?php if((bool)opalestate_options('pinterest_share_blog',true)): ?>
<?php $full_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full'); ?>
<a class="bo-social-pinterest" data-toggle="tooltip" data-placement="<?php echo esc_attr($args['position']); ?>" data-animation="<?php echo esc_attr($args['animation']); ?>" data-original-title="Pinterest" href="http://pinterest.com/pin/create/button/?url=<?php echo urlencode(get_permalink()); ?>&amp;description=<?php echo urlencode($post->post_title); ?>&amp;media=<?php echo urlencode($full_image[0]); ?>" target="_blank" title="<?php esc_html_e('Share on Pinterest', 'opalestate-pro'); ?>">
<i class="fa fa-pinterest"></i>
</a>
<?php endif; ?>
<?php if((bool)opalestate_options('mail_share_blog',true)): ?>
<a class="bo-social-envelope" data-toggle="tooltip" data-placement="<?php echo esc_attr($args['position']); ?>" data-animation="<?php echo esc_attr($args['animation']); ?>" data-original-title="Email" href="mailto:?subject=<?php the_title(); ?>&amp;body=<?php the_permalink(); ?>" title="<?php esc_html_e('Email to a Friend', 'opalestate-pro'); ?>">
<i class="fa fa-envelope"></i>
</a>
<?php endif; ?>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,31 @@
<?php
global $property;
$meta_content = apply_filters( 'opalestate_single_meta_info', '' );
if ( empty( $meta_content ) ) {
$meta = $property->get_meta_shortinfo();
?>
<ul class="property-meta-list list-inline">
<?php if ( $meta ) : ?>
<?php foreach ( $meta as $key => $info ) : ?>
<?php if ( trim( $info['value'] ) ) : ?>
<li class="property-label-<?php echo esc_attr( $key ); ?>">
<div class="icon-box">
<i class="icon-property-<?php echo esc_attr( $key ); ?>"></i>
</div>
<div class="info-meta">
<span class="label-content">
<?php echo apply_filters( 'opalestate-pro' . $key . '_unit_format',
trim( $info['value'] ) ); ?>
</span>
<span class="label-property"><?php echo esc_html( $info['label'] ); ?></span>
</div>
</li>
<?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>
</ul>
<?php } else {
echo wp_kses_post( $meta_content );
}

View File

@@ -0,0 +1,123 @@
<?php
if( !isset($id) ){
$id = get_the_ID();
}
if( !isset($prefix) ){
$prefix = OPALESTATE_AGENCY_PREFIX;
}
$avatar = get_post_meta( $id , $prefix . "avatar", true );
$post = get_post( $id );
$link = get_permalink( $id );
$name = get_the_title( $id );
$trusted = get_post_meta( $id, $prefix.'trusted', true );
?>
<div class="property-agent-contact ">
<?php $is_sticky = get_post_meta( $id, $prefix . 'sticky', true ); ?>
<div class="agent-box agency-box">
<div class="team-header">
<?php if( $type =='agency'): ?>
<div class="agent-preview has-avatar"><a href="<?php echo esc_url($link); ?>">
<?php if ( has_post_thumbnail( $id ) ) : ?>
<?php echo get_the_post_thumbnail( $id, 'full' ); ?>
<?php endif; ?>
<img src="<?php echo esc_url($avatar);?> " class="agent-avatar"></a>
<?php if( $trusted ): ?>
<span class="trusted-label hint--top" aria-label="<?php esc_html_e('Trusted Member', 'opalestate-pro'); ?>" title="<?php esc_html_e('Trusted Member', 'opalestate-pro'); ?>">
<i class="fa fa-star"></i>
</span>
<?php endif; ?>
</div>
<?php else : ?>
<div class="agent-preview"><a href="<?php echo esc_url($link); ?>">
<img src="<?php echo esc_url($avatar);?> " class="agent-avatar"></a>
</div>
<?php endif; ?>
</div>
<div class="agent-box-meta">
<h4 class="agent-box-title">
<a href="<?php echo esc_url( $link ); ?>">
<?php echo esc_html( $post->post_title ); ?>
</a>
</h4><!-- /.agent-box-title -->
<?php $email = get_post_meta( $id, $prefix . 'email', true ); ?>
<?php if ( ! empty( $email ) ) : ?>
<div class="agent-box-email">
<i class="fa fa-envelope"></i>
<a href="mailto:<?php echo esc_attr( $email ); ?>">
<span><?php echo esc_attr( $email ); ?></span>
</a>
</div><!-- /.agent-box-email -->
<?php endif; ?>
<?php $phone = get_post_meta( $id, $prefix . 'phone', true ); ?>
<?php if ( ! empty( $phone ) ) : ?>
<div class="agent-box-phone">
<i class="fa fa-phone"></i><span><a href="tel:<?php echo sanitize_title( $phone ); ?>"><?php echo esc_attr( $phone ); ?></a></span>
</div><!-- /.agent-box-phone -->
<?php endif; ?>
<?php $mobile = get_post_meta( $id, $prefix . 'mobile', true ); ?>
<?php if ( ! empty( $mobile ) ) : ?>
<div class="agent-box-mobile">
<i class="fa fa-mobile"></i><span><a href="tel:<?php echo sanitize_title( $phone ); ?>"><?php echo esc_attr( $mobile ); ?></a></span>
</div><!-- /.agent-box-phone -->
<?php endif; ?>
<?php $fax = get_post_meta( $id, $prefix . 'fax', true ); ?>
<?php if ( ! empty( $fax ) ) : ?>
<div class="agent-box-fax">
<i class="fa fa-fax"></i><span><?php echo esc_attr( $fax ); ?></span>
</div><!-- /.agent-box-phone -->
<?php endif; ?>
<?php $web = get_post_meta( $id, $prefix . 'web', true ); ?>
<?php if ( ! empty( $web ) ) : ?>
<div class="agent-box-web">
<i class="fa fa-globe"></i>
<a href="<?php echo esc_attr( $web ); ?>" rel="nofollow" target="_blank">
<span><?php echo esc_attr( $web ); ?></span>
</a>
</div><!-- /.agent-box-web -->
<?php endif; ?>
<?php
$facebook = get_post_meta( $id, $prefix . 'facebook', true );
$twitter = get_post_meta( $id, $prefix . 'twitter', true );
$pinterest = get_post_meta( $id, $prefix . 'pinterest', true );
$google = get_post_meta( $id, $prefix . 'google', true );
$instagram = get_post_meta( $id, $prefix . 'instagram', true );
$linkedIn = get_post_meta( $id, $prefix . 'linkedIn', true );
?>
<div class="opalestate-social-icons">
<?php if( $facebook && $facebook != "#" && !empty($facebook) ){ ?>
<a class="opalestate-social-white radius-x" rel="nofollow" href="<?php echo esc_url( $facebook ); ?>"> <i class="fa fa-facebook"></i> </a>
<?php } ?>
<?php if( $twitter && $twitter != "#" && !empty($twitter) ){ ?>
<a class="opalestate-social-white radius-x" rel="nofollow" href="<?php echo esc_url( $twitter ); ?>"><i class="fa fa-twitter"></i> </a>
<?php } ?>
<?php if( $pinterest && $pinterest != "#" && !empty($pinterest)){ ?>
<a class="opalestate-social-white radius-x" rel="nofollow" href="<?php echo esc_url( $pinterest ); ?>"><i class="fa fa-pinterest"></i> </a>
<?php } ?>
<?php if( $google && $google != "#" && !empty($google) ){ ?>
<a class="opalestate-social-white radius-x" rel="nofollow" href="<?php echo esc_url( $google ); ?>"> <i class="fa fa-google"></i></a>
<?php } ?>
<?php if( $instagram && $instagram != "#" && !empty($instagram) ){ ?>
<a class="opalestate-social-white radius-x" rel="nofollow" href="<?php echo esc_url( $instagram ); ?>"> <i class="fa fa-instagram"></i></a>
<?php } ?>
<?php if( $linkedIn && $linkedIn != "#" && !empty($linkedIn) ){ ?>
<a class="opalestate-social-white radius-x" rel="nofollow" href="<?php echo esc_url( $linkedIn ); ?>"> <i class="fa fa-linkedIn"></i></a>
<?php } ?>
</div>
</div><!-- /.agent-box-content -->
</div><!-- /.agent-box-->
</div>

View File

@@ -0,0 +1,110 @@
<?php if ( $author ): ?>
<div class="property-agent-contact ">
<?php
if ( ! isset( $prefix ) ) {
$prefix = OPALESTATE_USER_PROFILE_PREFIX;
}
$user_id = $author->ID;
$is_sticky = get_user_meta( $user_id, $prefix . 'sticky', true );
$picture = OpalEstate_User::get_author_picture( $user_id );
$desciption = get_user_meta( $user_id, 'description', true );
$roles = opalestate_user_roles_by_user_id( $user_id );
if ( ! is_array( $roles ) ) {
$roles = [ $roles ];
}
$related = get_user_meta( $user_id, $prefix . 'related_id', true );
$trusted = false;
if ( in_array( 'opalestate_agency', $roles ) || in_array( 'opalestate_agent', $roles ) ) {
$link = get_permalink( $related );
$author_name = get_the_title( $related );
$trusted = get_post_meta( $related, $prefix . 'trusted', true );
} elseif ( $related ) {
$link = get_permalink( $related );
$author_name = get_the_title( $related );
$trusted = get_user_meta( $user_id, $prefix . 'trusted', true );
} else {
$link = get_author_posts_url( $user_id );
$author_name = $author->display_name;
$trusted = get_user_meta( $user_id, $prefix . 'trusted', true );
}
?>
<div class="agent-box-list">
<div class="inner">
<div class="agent-preview">
<a href="<?php echo esc_url( $link ); ?>" class="agent-box-image-inner">
<img src="<?php echo esc_url( $picture ); ?>" title="<?php echo esc_attr( $author_name ); ?>">
</a>
</div>
<div class="agent-box-meta">
<h4>
<?php if ( $trusted ): ?>
<span class="trusted-label hint--top" aria-label="<?php esc_html_e( 'Trusted Member', 'opalestate-pro' ); ?>"
title="<?php esc_html_e( 'Trusted Member', 'opalestate-pro' ); ?>">
<i class="fa fa-star"></i>
</span>
<?php endif; ?>
<a href="<?php echo esc_url( $link ); ?>"><?php echo esc_html( $author_name ); ?></a>
</h4>
<?php
$job = get_user_meta( $user_id, $prefix . 'address', true );
?>
<p class="agent-box-address"><?php echo esc_html( $job ); ?></p>
<?php $phone = get_user_meta( $user_id, $prefix . 'phone', true ); ?>
<?php if ( ! empty( $phone ) ) : ?>
<div class="agent-box-phone">
<i class="fa fa-phone"></i><span><a href="tel:<?php echo sanitize_title( $phone ); ?>"><?php echo esc_attr( $phone ); ?></a></span>
</div><!-- /.agent-box-phone -->
<?php endif; ?>
</div><!-- /.agent-box-content -->
<?php
$facebook = get_user_meta( $user_id, $prefix . 'facebook', true );
$twitter = get_user_meta( $user_id, $prefix . 'twitter', true );
$pinterest = get_user_meta( $user_id, $prefix . 'pinterest', true );
$google = get_user_meta( $user_id, $prefix . 'googleplus', true );
$instagram = get_user_meta( $user_id, $prefix . 'instagram', true );
$linkedIn = get_user_meta( $user_id, $prefix . 'linkedIn', true );
?>
</div>
<div class="opalestate-social-icons text-center">
<?php if ( $facebook && $facebook != "#" && ! empty( $facebook ) ) { ?>
<a class="opalestate-social-white radius-x" href="<?php echo esc_url( $facebook ); ?>"> <i class="fa fa-facebook"></i> </a>
<?php } ?>
<?php if ( $twitter && $twitter != "#" && ! empty( $twitter ) ) { ?>
<a class="opalestate-social-white radius-x" href="<?php echo esc_url( $twitter ); ?>"><i class="fa fa-twitter"></i> </a>
<?php } ?>
<?php if ( $pinterest && $pinterest != "#" && ! empty( $pinterest ) ) { ?>
<a class="opalestate-social-white radius-x" href="<?php echo esc_url( $pinterest ); ?>"><i class="fa fa-pinterest"></i> </a>
<?php } ?>
<?php if ( $google && $google != "#" && ! empty( $google ) ) { ?>
<a class="opalestate-social-white radius-x" href="<?php echo esc_url( $google ); ?>"> <i class="fa fa-google-plus"></i></a>
<?php } ?>
<?php if ( $instagram && $instagram != "#" && ! empty( $instagram ) ) { ?>
<a class="opalestate-social-white radius-x" href="<?php echo esc_url( $instagram ); ?>"> <i class="fa fa-instagram"></i></a>
<?php } ?>
<?php if ( $linkedIn && $linkedIn != "#" && ! empty( $linkedIn ) ) { ?>
<a class="opalestate-social-white radius-x" href="<?php echo esc_url( $linkedIn ); ?>"> <i class="fa fa-linkedIn"></i></a>
<?php } ?>
</div>
</div><!-- /.agent-box-->
</div>
<?php endif; ?>

View File

@@ -0,0 +1,153 @@
<?php if ( $author ): ?>
<div class="property-agent-contact ">
<?php
if ( ! isset( $prefix ) ) {
$prefix = OPALESTATE_USER_PROFILE_PREFIX;
}
$user_id = $author->ID;
$is_sticky = get_user_meta( $user_id, $prefix . 'sticky', true );
$desciption = get_user_meta( $user_id, 'description', true );
$roles = opalestate_user_roles_by_user_id( $user_id );
if ( ! is_array( $roles ) ) {
$roles = [ $roles ];
}
$related = get_user_meta( $user_id, $prefix . 'related_id', true );
$trusted = false;
if ( in_array( 'opalestate_agency', $roles ) || in_array( 'opalestate_agent', $roles ) ) {
$post = get_post( $related );
$link = get_permalink( $related );
$author_name = $post->post_title;
if ( $post->post_type == 'opalestate_agency' ) {
$prefixs = OPALESTATE_AGENCY_PREFIX;
$picture = OpalEstate_Agency::get_avatar_url( $post->ID );
} else {
$prefixs = OPALESTATE_AGENT_PREFIX;
$picture = OpalEstate_Agent::get_avatar_url( $post->ID );
}
$trusted = get_post_meta( $related, $prefixs . 'trusted', true );
} elseif ( $related ) {
$post = get_post( $related );
$link = get_permalink( $related );
$author_name = $post->post_title;
if ( $post->post_type == 'opalestate_agency' ) {
$prefixs = OPALESTATE_AGENCY_PREFIX;
$picture = OpalEstate_Agency::get_avatar_url( $post->ID );
} else {
$prefixs = OPALESTATE_AGENT_PREFIX;
$picture = OpalEstate_Agent::get_avatar_url( $post->ID );
}
$trusted = get_post_meta( $related, $prefixs . 'trusted', true );
} else {
$link = get_author_posts_url( $user_id );
$author_name = $author->display_name;
$trusted = get_user_meta( $user_id, $prefix . 'trusted', true );
$picture = OpalEstate_User::get_author_picture( $user_id );
}
?>
<div class="agent-box">
<div class="agent-preview">
<div class="team-header <?php if ( empty( $picture ) ) {
echo 'without-image';
} ?>">
<?php if ( $trusted ): ?>
<span class="trusted-label hint--top" aria-label="<?php esc_html_e( 'Trusted Member', 'opalestate-pro' ); ?>"
title="<?php esc_html_e( 'Trusted Member', 'opalestate-pro' ); ?>">
<i class="fa fa-star"></i>
</span>
<?php endif; ?>
<a href="<?php echo esc_url( $link ); ?>" class="agent-box-image-inner">
<img src="<?php echo esc_url( $picture ); ?>" title="<?php echo esc_attr( $author_name ); ?>">
</a>
</div>
</div><!-- /.agent-preview -->
<div class="agent-box-meta">
<h4 class="agent-box-title">
<a href="<?php echo esc_url( $link ); ?>"><?php echo esc_html( $author_name ); ?></a>
</h4><!-- /.agent-box-title -->
<?php
$job = get_user_meta( $user_id, $prefix . 'job', true );
?>
<p class="agent-box-job"><?php echo esc_html( $job ); ?></p>
<?php $email = get_user_meta( $user_id, $prefix . 'email', true ); ?>
<?php if ( ! empty( $email ) ) : ?>
<div class="agent-box-email">
<i class="fa fa-envelope"></i>
<a href="mailto:<?php echo esc_attr( $email ); ?>">
<span><?php echo esc_attr( $email ); ?></span>
</a>
</div><!-- /.agent-box-email -->
<?php endif; ?>
<?php $phone = get_user_meta( $user_id, $prefix . 'phone', true ); ?>
<?php if ( ! empty( $phone ) ) : ?>
<div class="agent-box-phone">
<i class="fa fa-phone"></i><span><a href="tel:<?php echo sanitize_title( $phone ); ?>"><?php echo esc_attr( $phone ); ?></a></span>
</div><!-- /.agent-box-phone -->
<?php endif; ?>
<?php $web = get_user_meta( $user_id, $prefix . 'web', true ); ?>
<?php if ( ! empty( $web ) ) : ?>
<div class="agent-box-web">
<i class="fa fa-globe"></i>
<a href="<?php echo esc_attr( $web ); ?>">
<span><?php echo esc_attr( $web ); ?></span>
</a>
</div><!-- /.agent-box-web -->
<?php endif; ?>
<?php
$facebook = get_user_meta( $user_id, $prefix . 'facebook', true );
$twitter = get_user_meta( $user_id, $prefix . 'twitter', true );
$pinterest = get_user_meta( $user_id, $prefix . 'pinterest', true );
$google = get_user_meta( $user_id, $prefix . 'googleplus', true );
$instagram = get_user_meta( $user_id, $prefix . 'instagram', true );
$linkedIn = get_user_meta( $user_id, $prefix . 'linkedIn', true );
?>
<div class="opalestate-social-icons">
<?php if ( $facebook && $facebook != "#" && ! empty( $facebook ) ) { ?>
<a class="opalestate-social-white radius-x" href="<?php echo esc_url( $facebook ); ?>"> <i class="fa fa-facebook"></i> </a>
<?php } ?>
<?php if ( $twitter && $twitter != "#" && ! empty( $twitter ) ) { ?>
<a class="opalestate-social-white radius-x" href="<?php echo esc_url( $twitter ); ?>"><i class="fa fa-twitter"></i> </a>
<?php } ?>
<?php if ( $pinterest && $pinterest != "#" && ! empty( $pinterest ) ) { ?>
<a class="opalestate-social-white radius-x" href="<?php echo esc_url( $pinterest ); ?>"><i class="fa fa-pinterest"></i> </a>
<?php } ?>
<?php if ( $google && $google != "#" && ! empty( $google ) ) { ?>
<a class="opalestate-social-white radius-x" href="<?php echo esc_url( $google ); ?>"> <i class="fa fa-google-plus"></i></a>
<?php } ?>
<?php if ( $instagram && $instagram != "#" && ! empty( $instagram ) ) { ?>
<a class="opalestate-social-white radius-x" href="<?php echo esc_url( $instagram ); ?>"> <i class="fa fa-instagram"></i></a>
<?php } ?>
<?php if ( $linkedIn && $linkedIn != "#" && ! empty( $linkedIn ) ) { ?>
<a class="opalestate-social-white radius-x" href="<?php echo esc_url( $linkedIn ); ?>"> <i class="fa fa-linkedIn"></i></a>
<?php } ?>
</div>
</div><!-- /.agent-box-content -->
</div><!-- /.agent-box-->
</div>
<?php endif; ?>

View File

@@ -0,0 +1,19 @@
<?php
global $property;
if ( ! $property->get_block_setting( 'video' ) ) {
return;
}
$videoURL = $property->get_video_url();
?>
<?php if ( $videoURL ) : ?>
<div class="opalestate-box-content property-video-session">
<h4 class="outbox-title" id="block-video"><?php esc_html_e( 'Video', 'opalestate-pro' ); ?></h4>
<div class="opalestate-box">
<div class="box-info">
<?php echo wp_oembed_get( $videoURL ); ?>
</div>
</div>
</div>
<?php endif; ?>

View File

@@ -0,0 +1,83 @@
<?php
global $property;
if ( ! $property->get_block_setting( 'views_statistics' ) ) {
return;
}
$limit = opalestate_get_option( 'single_views_statistics_limit', 8 );
$stats = new Opalestate_View_Stats( $property->get_id(), $limit );
$array_label = json_encode( $stats->get_traffic_labels() );
$array_values = json_encode( $stats->get_traffic_data_accordion() );
?>
<div class="opalestate-box-content property-views-statistics-session">
<h4 class="outbox-title" id="block-statistics"><?php esc_html_e( 'Page Views Statistics', 'opalestate-pro' ); ?></h4>
<div class="opalestate-box">
<div class="box-info">
<canvas id="views-chart"></canvas>
</div>
</div>
</div>
<script>
jQuery(document).ready(function () {
var ctx = document.getElementById('views-chart').getContext("2d");
var labels = <?php echo $array_label; ?>;
var traffic_data = <?php echo $array_values; ?>;
var label = '<?php esc_html_e( 'Page Views Statistics', 'opalestate-pro' ); ?>';
var myChart = new Chart(ctx, {
type: 'line',
data: {
labels: labels,
datasets: [{
label: label,
borderColor: "#2f73e9",
pointBorderColor: "#2f73e9",
pointBackgroundColor: "#2f73e9",
pointHoverBackgroundColor: "#2f73e9",
pointHoverBorderColor: "#2f73e9",
pointBorderWidth: 1,
pointHoverRadius: 1,
pointHoverBorderWidth: 1,
pointRadius: 2,
fill: false,
borderWidth: 1,
data: traffic_data
}]
},
options: {
legend: {
position: "none"
},
scales: {
yAxes: [{
ticks: {
fontColor: "#7e7e7e",
fontStyle: "bold",
beginAtZero: true,
maxTicksLimit: 5,
padding: 20
},
gridLines: {
drawTicks: false,
display: false
}
}],
xAxes: [{
gridLines: {
zeroLineColor: "transparent"
},
ticks: {
padding: 20,
fontColor: "#7e7e7e",
fontStyle: "bold"
}
}]
}
}
});
});
</script>

View File

@@ -0,0 +1,15 @@
<?php
global $property;
$virtualTour = $property->get_virtual_tour();
?>
<?php if( $virtualTour ) : ?>
<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>
<div class=" opalestate-box">
<div class="box-info">
<?php echo do_shortcode( $virtualTour ); ?>
</div>
</div>
</div>
<?php endif; ?>

View File

@@ -0,0 +1,56 @@
<?php
global $property;
if ( ! $property->get_block_setting( 'walkscores' ) ) {
return;
}
$walkscore = opalestate_get_property_walkscore_results( $property );
?>
<div class="opalestate-box-content property-walkscore-session">
<h4 class="outbox-title" id="block-scores"><?php esc_html_e( 'Walk Scores', 'opalestate-pro' ); ?></h4>
<div class="walkscores-logo"><img src="<?php echo esc_url( OPALESTATE_PLUGIN_URL . 'assets/images/walk-score.png' ); ?>" alt="walkscore"></div>
<div class="opalestate-box">
<div class="box-info">
<?php if ( isset( $walkscore->walkscore ) ) : ?>
<div class="walk_details">
<div class="number-holder">
<h4 class="scores-label"><?php echo esc_html( $walkscore->walkscore ); ?></h4>
</div>
<div class="text-holder">
<h6><a href="<?php echo esc_url( $walkscore->ws_link ); ?>" target="_blank"><?php echo esc_html__( 'Walk Scores', 'opalestate-pro' ) ?></a></h6>
<span><?php echo esc_html( $walkscore->description ); ?></span>
</div>
<a href="<?php echo esc_url( $walkscore->ws_link ); ?>" class="walk-more-details" target="_blank"><?php esc_html_e( 'more details here', 'opalestate-pro' ) ?></a>
</div>
<?php endif; ?>
<?php if ( isset( $walkscore->transit ) && $walkscore->transit->score ) : ?>
<div class="walk_details">
<div class="number-holder">
<h4 class="scores-label"><?php echo esc_html( $walkscore->transit->score ); ?></h4>
</div>
<div class="text-holder">
<h6><a href="<?php echo esc_url( $walkscore->ws_link ); ?>" target="_blank"><?php echo esc_html__( 'Transit Scores', 'opalestate-pro' ) ?></a></h6>
<span><?php echo esc_html( $walkscore->transit->description ); ?></span>
</div>
<a href="<?php echo esc_url( $walkscore->ws_link ); ?>" target="_blank"><?php esc_html_e( 'more details here', 'opalestate-pro' ) ?></a>
</div>
<?php endif; ?>
<?php if ( isset( $walkscore->bike ) ) : ?>
<div class="walk_details">
<div class="number-holder">
<h4 class="scores-label"><?php echo esc_html( $walkscore->bike->score ); ?></h4>
</div>
<div class="text-holder">
<h6><a href="<?php echo esc_url( $walkscore->ws_link ); ?>" target="_blank"><?php echo esc_html__( 'Bikeable Scores', 'opalestate-pro' ) ?></a></h6>
<span><?php echo esc_html( $walkscore->bike->description ); ?></span>
</div>
<a href="<?php echo esc_url( $walkscore->ws_link ); ?>" target="_blank"><?php esc_html_e( 'More details here', 'opalestate-pro' ) ?></a>
</div>
<?php endif; ?>
</div>
</div>
</div>