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

BIN
templates/.DS_Store vendored Executable file

Binary file not shown.

View File

@@ -0,0 +1,82 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$form = 'search-agency-form';
get_header(); ?>
<div class="opalestate-head opalestate-archive-agency">
<div class="container">
<div class="opalestate-heading">
<h1 class="opalestate-head-title"><?php esc_html_e( 'Find A Local Real Estate Agencies', 'opalestate-pro' ); ?></h1>
<p><?php esc_html_e( 'Reality Agencies are local expert who can get you better results for lower fees', 'opalestate-pro' ); ?></p>
</div>
<div class="opalestate-head-form">
<?php echo opalestate_load_template_path( 'parts/' . $form, [ 'current_uri' => true ] ); ?>
</div>
</div>
</div>
<section id="main-container" class="site-main container" role="main">
<div id="primary" class="content content-area clearfix">
<header class="page-header">
<?php
the_archive_title( '<h1 class="page-title">', '</h1>' );
the_archive_description( '<div class="taxonomy-description">', '</div>' );
?>
</header><!-- .page-header -->
<?php if ( have_posts() ) : ?>
<?php global $wp_query; ?>
<div class="opalesate-archive-top">
<div class="<?php echo apply_filters( 'opalestate_row_container_class', 'opal-row' ); ?>">
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="opalestate-results">
<?php if ( $wp_query->found_posts ): ?>
<span><?php echo sprintf( esc_html__( 'Found %s Agency', 'opalestate-pro' ), $wp_query->found_posts ); ?></span>
<?php endif; ?>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-6 text-right">
<div class="opalestate-sortable">
<?php echo opalestate_render_sortable_dropdown(); ?>
</div>
<?php opalestate_show_display_modes(); ?>
</div>
</div>
</div>
<div class="opal-row">
<?php
$cnt = 0;
$column = 3;
$colclass = floor( 12 / $column );
$layout = isset( $_GET['display'] ) && $_GET['display'] == 'list' ? 'list' : 'grid';
while ( have_posts() ) : the_post();
$cls = '';
if ( $cnt++ % $column == 0 ) {
$cls .= ' first-child';
}
$grid = $layout == 'list' ? "col-lg-12 col-md-12 col-sm-12" : $cls;
?>
<div class="col-lg-<?php echo esc_attr( $colclass ); ?> col-md-<?php echo esc_attr( $colclass ); ?> col-sm-12 <?php echo esc_attr( $grid ); ?>">
<?php echo opalestate_load_template_path( 'content-agency-' . $layout ); ?>
</div>
<?php endwhile; ?>
</div>
<?php echo opalestate_load_template_path( 'parts/pagination' ); ?>
<?php else : ?>
<?php echo opalestate_load_template_path( 'content-no-results' ); ?>
<?php endif; ?>
</div><!-- .site-main -->
</section><!-- .content-area -->
<?php get_footer(); ?>

View File

@@ -0,0 +1,70 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$form = "search-agents-form-address";
get_header();
?>
<div class="opalestate-head opalestate-archive-agent">
<div class="container">
<div class="opalestate-heading">
<h1 class="opalestate-head-title"><?php esc_html_e( 'Find The Best Real Estate Agent For Your', 'opalestate-pro' ); ?></h1>
<p><?php esc_html_e( 'Browser home sales, rating and review to find the best agent to sell or lease your home', 'opalestate-pro' ); ?></p>
</div>
<div class="opalestate-head-form">
<?php echo opalestate_load_template_path( 'parts/' . $form, [ 'current_uri' => true ] ); ?>
</div>
</div>
</div>
<section id="main-container" class="site-main container" role="main">
<div id="primary" class="content content-area clearfix">
<header class="page-header">
<?php
the_archive_title( '<h1 class="page-title">', '</h1>' );
the_archive_description( '<div class="taxonomy-description">', '</div>' );
?>
</header><!-- .page-header -->
<?php if ( have_posts() ) : ?>
<?php global $wp_query; ?>
<div class="opalesate-archive-top">
<div class="opal-row">
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="opalestate-results">
<?php if ( $wp_query->found_posts ): ?>
<span><?php echo sprintf( esc_html__( 'Found %s Agents', 'opalestate-pro' ), $wp_query->found_posts ); ?></span>
<?php endif; ?>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-6 text-right">
<div class="opalestate-sortable">
<?php echo opalestate_render_sortable_dropdown(); ?>
</div>
<?php opalestate_show_display_modes(); ?>
</div>
</div>
</div>
<div class="<?php echo apply_filters( 'opalestate_row_container_class', 'opal-row' ); ?>">
<?php
$layout = isset( $_GET['display'] ) && $_GET['display'] == 'list' ? 'list' : 'grid';
$grid = $layout == 'list' ? "col-lg-12 col-md-12 col-sm-12" : "col-lg-4 col-md-4 col-sm-6";
while ( have_posts() ) : the_post(); ?>
<div class="<?php echo esc_attr( $grid ); ?>">
<?php echo opalestate_load_template_path( 'content-agent-' . $layout ); ?>
</div>
<?php endwhile; ?>
</div>
<?php echo opalestate_load_template_path( 'parts/pagination' ); ?>
<?php else : ?>
<?php echo opalestate_load_template_path( 'content-no-results' ); ?>
<?php endif; ?>
</div><!-- .site-main -->
</section><!-- .content-area -->
<?php get_footer(); ?>

View File

@@ -0,0 +1,65 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
global $wp_query;
get_header();
$list_layout = 'content-property-' . opalestate_get_option( 'property_archive_list_layout', 'list' );
$grid_layout = 'content-property-' . opalestate_get_option( 'property_archive_grid_layout', 'grid' );
?>
<?php do_action( "opalestate_archive_property_page_before" ); ?>
<section id="main-container" class="site-main container" role="main">
<div id="primary" class="content content-area clearfix">
<?php if ( have_posts() ) : ?>
<header class="page-header">
<?php
the_archive_title( '<h1 class="page-title">', '</h1>' );
the_archive_description( '<div class="taxonomy-description">', '</div>' );
?>
</header><!-- .page-header -->
<div class="opaleslate-archive-container">
<?php echo opalestate_load_template_path( 'parts/archive-simple-bars' ); ?>
<div class="opalesate-archive-bottom opalestate-rows opalestate-collection">
<div class="opal-row">
<?php if ( ( isset( $_GET['display'] ) && $_GET['display'] == 'list' ) || opalestate_get_display_mode( 'list' ) == 'list' ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<div class="col-lg-12 col-md-12 col-sm-12">
<?php echo opalestate_load_template_path( $list_layout ); ?>
</div>
<?php endwhile; ?>
<?php else : ?>
<?php
$column = apply_filters( 'opalestate_properties_column_row', 3 );
$clscol = floor( 12 / $column );
$cnt = 0;
while ( have_posts() ) : the_post();
$cls = '';
if ( $cnt++ % $column == 0 ) {
$cls .= ' first-child';
}
?>
<div class="<?php echo esc_attr( $cls ); ?> col-lg-<?php echo esc_attr( $clscol ); ?> col-sm-6">
<?php echo opalestate_load_template_path( $grid_layout ); ?>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
</div>
</div>
<?php echo opalestate_load_template_path( 'parts/pagination' ); ?>
<?php else : ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php endif; ?>
</div><!-- .site-main -->
</section><!-- .content-area -->
<?php do_action( 'opalestate_archive_property_page_after' ); ?>
<?php get_footer(); ?>

View File

@@ -0,0 +1,69 @@
<?php
$agency = new OpalEstate_Agency();
$agency_id = get_the_ID();
$address = get_post_meta( get_the_ID(), OPALESTATE_AGENCY_PREFIX . 'address', true );
?>
<article <?php post_class( 'agency-grid-style' ); ?>>
<div class="agency-inner">
<header class="team-header agency-header">
<?php opalestate_get_loop_agent_thumbnail(); ?>
<?php if ( $agency->is_featured() ): ?>
<div class="agency-label">
<span class="label label-featured" aria-label="<?php esc_attr_e( 'Featured Agency', 'opalestate-pro' ); ?>" title="<?php esc_attr_e( 'Featured Agency', 'opalestate-pro' ); ?>">
<?php esc_html_e( 'Featured', 'opalestate-pro' ); ?>
</span>
</div>
<?php endif; ?>
<?php if ( $agency->get_trusted() ): ?>
<span class="trusted-label hint--top" aria-label="<?php esc_attr_e( 'Trusted Member', 'opalestate-pro' ); ?>" title="<?php esc_attr_e( 'Trusted Member', 'opalestate-pro' ); ?>">
<i class="fa fa-star"></i>
</span>
<?php endif; ?>
</header>
<div class="agency-body-content clearfix">
<div class="agency-info">
<div class="agency-logo">
<?php $data = OpalEstate_Agency::get_link( $agency_id ); ?>
<a href="<?php echo esc_url( $data['link'] ); ?>">
<img src="<?php echo esc_url( $data['avatar'] ); ?>">
</a>
</div>
<div class="agency-content">
<h6 class="agency-box-title text-uppercase">
<a href="<?php the_permalink(); ?>"><?php the_title() ?></a>
</h6><!-- /.agency-box-title -->
<h3 class="agency-name hide"><?php the_title(); ?></h3>
<p class="agency-address">
<?php echo esc_html( $address ); ?>
</p>
</div>
</div>
<div class="agency-box-meta">
<?php $phone = get_post_meta( get_the_ID(), OPALESTATE_AGENCY_PREFIX . 'phone', true ); ?>
<?php if ( ! empty( $phone ) ) : ?>
<div class="agency-box-phone">
<i class="fa fa-phone"></i>
<a href="tel:<?php echo sanitize_title( $phone ); ?>">
<span><?php echo esc_html( $phone ); ?></span>
</a>
</div><!-- /.agency-box-phone -->
<?php endif; ?>
<?php $email = get_post_meta( get_the_ID(), OPALESTATE_AGENCY_PREFIX . 'email', true ); ?>
<?php if ( ! empty( $email ) ) : ?>
<div class="agency-box-email ">
<i class="fa fa-envelope"></i>
<a href="mailto:<?php echo esc_attr( $email ); ?>">
<span><?php echo esc_html( $email ); ?></span>
</a>
</div><!-- /.agency-box-email -->
<?php endif; ?>
</div><!-- /.agency-box-meta -->
</div>
</div>
</article>

View File

@@ -0,0 +1,65 @@
<?php
$agency = new OpalEstate_Agency();
$agency_id = get_the_ID();
$address = get_post_meta( get_the_ID(), OPALESTATE_AGENCY_PREFIX . 'address', true );
?>
<article <?php post_class( 'agency-list-style' ); ?>>
<div class="agency-inner">
<header class="team-header agency-header">
<?php opalestate_get_loop_agent_thumbnail(); ?>
<?php if ( $agency->is_featured() ): ?>
<div class="agency-label">
<span class="label label-featured" data-toggle="tooltip" data-placement="top" title="<?php esc_attr_e( 'Featured Agency', 'opalestate-pro' ); ?>">
<?php esc_html_e( 'Featured', 'opalestate-pro' ); ?>
</span>
</div>
<?php endif; ?>
</header>
<div class="agency-body-content clearfix">
<div class="agency-info">
<div class="agency-content">
<h4 class="agency-box-title text-uppercase">
<a href="<?php the_permalink(); ?>"><?php the_title() ?></a>
</h4><!-- /.agency-box-title -->
<?php if ( $agency->get_trusted() ): ?>
<span class="trusted-label hint--top" aria-label="<?php esc_attr_e( 'Trusted Member', 'opalestate-pro' ); ?>"
title="<?php esc_attr_e( 'Trusted Member', 'opalestate-pro' ); ?>">
<i class="fa fa-star"></i>
</span>
<?php endif; ?>
<h3 class="agency-name hide"><?php the_title(); ?></h3>
<p class="agency-address"><?php echo esc_html( $address ); ?></p>
</div>
<div class="agency-logo">
<?php $data = OpalEstate_Agency::get_link( $agency_id ); ?>
<a href="<?php echo esc_url( $data['link'] ); ?>">
<img src="<?php echo esc_url( $data['avatar'] ); ?>">
</a>
</div>
</div>
<div class="agency-box-meta">
<?php $phone = get_post_meta( get_the_ID(), OPALESTATE_AGENCY_PREFIX . 'phone', true ); ?>
<?php if ( ! empty( $phone ) ) : ?>
<div class="agency-box-phone">
<i class="fa fa-phone"></i>
<a href="tel:<?php echo sanitize_title( $phone ); ?>">
<span><?php echo esc_html( $phone ); ?></span>
</a>
</div><!-- /.agency-box-phone -->
<?php endif; ?>
<?php $email = get_post_meta( get_the_ID(), OPALESTATE_AGENCY_PREFIX . 'email', true ); ?>
<?php if ( ! empty( $email ) ) : ?>
<div class="agency-box-email ">
<i class="fa fa-envelope"></i>
<a href="mailto:<?php echo esc_attr( $email ); ?>">
<span><?php echo esc_html( $email ); ?></span>
</a>
</div><!-- /.agency-box-email -->
<?php endif; ?>
</div><!-- /.agency-box-meta -->
</div>
</div>
</article>

View File

@@ -0,0 +1,33 @@
<?php
$agent = new OpalEstate_Agent();
?>
<article <?php post_class( 'agent-grid-style' ); ?>>
<div class="team-v2 agent-inner">
<header class="team-header agent-header">
<?php opalestate_get_loop_agent_thumbnail( opalestate_get_option( 'agent_image_size', 'large' ) ); ?>
<?php if ( $agent->is_featured() ): ?>
<span class="agent-featured" data-toggle="tooltip" data-placement="top" title="<?php esc_attr_e( 'Featured Agent', 'opalestate-pro' ); ?>">
<span class="agent-label">
<span><?php esc_html_e( 'Featured', 'opalestate-pro' ); ?></span>
</span>
</span>
<?php endif; ?>
<?php if ( $agent->get_trusted() ): ?>
<span class="trusted-label hint--top" aria-label="<?php esc_attr_e( 'Trusted Member', 'opalestate-pro' ); ?>" title="<?php esc_attr_e( 'Trusted Member', 'opalestate-pro' ); ?>">
<i class="fa fa-star"></i>
</span>
<?php endif; ?>
</header>
<div class="team-body agent-body">
<div class="team-body-content">
<h5 class="agent-box-title">
<a href="<?php the_permalink(); ?>"><?php the_title() ?></a>
</h5><!-- /.agent-box-title -->
<h3 class="team-name hide"><?php the_title(); ?></h3>
</div>
</div>
</div>
</article>

115
templates/content-agent-grid.php Executable file
View File

@@ -0,0 +1,115 @@
<?php
$agent = new OpalEstate_Agent();
?>
<article <?php post_class( 'agent-grid-style' ); ?>>
<div class="team-v1 agent-inner">
<header class="team-header agent-header">
<?php opalestate_get_loop_agent_thumbnail( opalestate_get_option( 'agent_image_size', 'large' ) ); ?>
<?php $agent->render_level(); ?>
<?php if ( $agent->is_featured() ): ?>
<span class="agent-featured" data-toggle="tooltip" data-placement="top" title="<?php esc_attr_e( 'Featured Agent', 'opalestate-pro' ); ?>">
<span class="agent-label">
<span><?php esc_html_e( 'Featured', 'opalestate-pro' ); ?></span>
</span>
</span>
<?php endif; ?>
<?php if ( $agent->get_trusted() ): ?>
<span class="trusted-label hint--top" aria-label="<?php esc_attr_e( 'Trusted Member', 'opalestate-pro' ); ?>" title="<?php esc_attr_e( 'Trusted Member', 'opalestate-pro' ); ?>">
<i class="fa fa-star"></i>
</span>
<?php endif; ?>
</header>
<div class="team-body agent-body">
<div class="team-body-content">
<h5 class="agent-box-title">
<a href="<?php the_permalink(); ?>"><?php the_title() ?></a>
</h5>
<h3 class="team-name hide"><?php the_title(); ?></h3>
<?php $job = $agent->get_meta( 'job' ); ?>
<?php if ( ! empty( $job ) ) : ?>
<p class="agent-job"><?php echo esc_html( $job ); ?></p>
<?php endif; ?>
</div>
<div class="agent-box-meta">
<?php $email = $agent->get_meta( 'email' ); ?>
<?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_html( $email ); ?></span>
</a>
</div>
<?php endif; ?>
<?php $phone = $agent->get_meta( 'phone' ); ?>
<?php if ( ! empty( $phone ) ) : ?>
<div class="agent-box-phone">
<i class="fa fa-phone"></i>
<a href="tel:<?php echo sanitize_title( $phone ); ?>">
<span><?php echo esc_html( $phone ); ?></span>
</a>
</div>
<?php endif; ?>
<?php $mobile = $agent->get_meta( 'mobile' ); ?>
<?php if ( ! empty( $mobile ) ) : ?>
<div class="agent-box-mobile">
<i class="fa fa-mobile"></i>
<a href="tel:<?php echo sanitize_title( $mobile ); ?>">
<span><?php echo esc_html( $mobile ); ?></span>
</a>
</div>
<?php endif; ?>
<?php $fax = $agent->get_meta( 'fax' ); ?>
<?php if ( ! empty( $fax ) ) : ?>
<div class="agent-box-fax">
<i class="fa fa-fax"></i><span><?php echo esc_attr( $fax ); ?></span>
</div>
<?php endif; ?>
<?php $web = $agent->get_meta( 'web' ); ?>
<?php if ( ! empty( $web ) ) : ?>
<div class="agent-box-web">
<i class="fa fa-globe"></i>
<a href="<?php echo esc_url( $web ); ?>" rel="nofollow" target="_blank">
<span><?php echo esc_url( $web ); ?></span>
</a>
</div>
<?php endif; ?>
<?php $socials = $agent->get_socials(); ?>
<?php if ( $socials ) : ?>
<div class="opalestate-social-icons">
<?php if ( isset( $socials['facebook'] ) && $socials['facebook'] ) : ?>
<a class="opalestate-social-white radius-x opalestate-social-facebook" href="<?php echo esc_url( $socials['facebook'] ); ?>" target="_blank"> <i class="fa fa-facebook"></i> </a>
<?php endif; ?>
<?php if ( isset( $socials['twitter'] ) && $socials['twitter'] ) : ?>
<a class="opalestate-social-white radius-x opalestate-social-twitter" href="<?php echo esc_url( $socials['twitter'] ); ?>" target="_blank"><i class="fa fa-twitter"></i> </a>
<?php endif; ?>
<?php if ( isset( $socials['pinterest'] ) && $socials['pinterest'] ) : ?>
<a class="opalestate-social-white radius-x opalestate-social-printerest" href="<?php echo esc_url( $socials['pinterest'] ); ?>" target="_blank"><i class="fa fa-pinterest"></i> </a>
<?php endif; ?>
<?php if ( isset( $socials['google'] ) && $socials['google'] ) : ?>
<a class="opalestate-social-white radius-x opalestate-social-google" href="<?php echo esc_url( $socials['google'] ); ?>" target="_blank"> <i class="fa fa-google"></i></a>
<?php endif; ?>
<?php if ( isset( $socials['instagram'] ) && $socials['instagram'] ) : ?>
<a class="opalestate-social-white radius-x opalestate-social-instagram" href="<?php echo esc_url( $socials['instagram'] ); ?>" target="_blank"> <i class="fa fa-instagram"></i></a>
<?php endif; ?>
<?php if ( isset( $socials['linkedIn'] ) && $socials['linkedIn'] ) : ?>
<a class="opalestate-social-white radius-x opalestate-social-linkedIn" href="<?php echo esc_url( $socials['linkedIn'] ); ?>" target="_blank"> <i class="fa fa-linkedIn"></i></a>
<?php endif; ?>
</div>
<?php endif; ?>
</div><!-- /.agent-box-content -->
</div>
</div>
</article>

View File

@@ -0,0 +1,78 @@
<?php
$agent = new OpalEstate_Agent();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'agent-list-style' ); ?>>
<div class="team-v2">
<div class="<?php echo apply_filters( 'opalestate_row_container_class', 'opal-row' ); ?>">
<div class="col-lg-3 col-md-4 col-sm-5">
<header class="team-header">
<?php opalestate_get_loop_agent_thumbnail( opalestate_get_option( 'agent_image_size', 'large' ) ); ?>
<?php $agent->render_level(); ?>
<?php if ( $agent->is_featured() ): ?>
<span class="agent-featured" data-toggle="tooltip" data-placement="top" title="<?php esc_attr_e( 'Featured Agent', 'opalestate-pro' ); ?>">
<span class="agent-label">
<span><?php esc_html_e( 'Featured', 'opalestate-pro' ); ?></span>
</span>
</span>
<?php endif; ?>
</header>
</div>
<div class="col-lg-9 col-md-8 col-sm-7">
<div class="team-body">
<div class="team-body-content">
<h4 class="agent-box-title">
<a href="<?php the_permalink(); ?>"><?php the_title() ?></a>
<?php if ( $agent->get_trusted() ): ?>
<span class="trusted-label hint--top" aria-label="<?php esc_attr_e( 'Trusted Member', 'opalestate-pro' ); ?>"
title="<?php esc_attr_e( 'Trusted Member', 'opalestate-pro' ); ?>">
<i class="fa fa-star"></i>
</span>
<?php endif; ?>
</h4><!-- /.agent-box-title -->
<h3 class="team-name hide"><?php the_title(); ?></h3>
<?php $job = $agent->get_meta( 'job' ); ?>
<?php if ( ! empty( $job ) ) : ?>
<p class="agent-job"><?php echo esc_html( $job ); ?></p>
<?php endif; ?>
</div>
<div class="agent-box-meta">
<?php $socials = $agent->get_socials(); ?>
<?php if ( $socials ) : ?>
<div class="opalestate-social-icons">
<?php if ( isset( $socials['facebook'] ) && $socials['facebook'] ) : ?>
<a class="opalestate-social-white radius-x opalestate-social-facebook" href="<?php echo esc_url( $socials['facebook'] ); ?>" target="_blank"> <i class="fa fa-facebook"></i> </a>
<?php endif; ?>
<?php if ( isset( $socials['twitter'] ) && $socials['twitter'] ) : ?>
<a class="opalestate-social-white radius-x opalestate-social-twitter" href="<?php echo esc_url( $socials['twitter'] ); ?>" target="_blank"><i class="fa fa-twitter"></i> </a>
<?php endif; ?>
<?php if ( isset( $socials['pinterest'] ) && $socials['pinterest'] ) : ?>
<a class="opalestate-social-white radius-x opalestate-social-printerest" href="<?php echo esc_url( $socials['pinterest'] ); ?>" target="_blank"><i class="fa fa-pinterest"></i> </a>
<?php endif; ?>
<?php if ( isset( $socials['google'] ) && $socials['google'] ) : ?>
<a class="opalestate-social-white radius-x opalestate-social-google" href="<?php echo esc_url( $socials['google'] ); ?>" target="_blank"> <i class="fa fa-google"></i></a>
<?php endif; ?>
<?php if ( isset( $socials['instagram'] ) && $socials['instagram'] ) : ?>
<a class="opalestate-social-white radius-x opalestate-social-instagram" href="<?php echo esc_url( $socials['instagram'] ); ?>" target="_blank"> <i class="fa fa-instagram"></i></a>
<?php endif; ?>
<?php if ( isset( $socials['linkedIn'] ) && $socials['linkedIn'] ) : ?>
<a class="opalestate-social-white radius-x opalestate-social-linkedIn" href="<?php echo esc_url( $socials['linkedIn'] ); ?>" target="_blank"> <i class="fa fa-linkedIn"></i></a>
<?php endif; ?>
</div>
<?php endif; ?>
</div><!-- /.agent-box-meta -->
</div>
<p class="team-info">
<?php echo opalestate_fnc_excerpt( 14, '...' ); ?>
</p>
</div>
</div>
</div>
</article>

View File

@@ -0,0 +1,8 @@
<div class="nothing-wrapper">
<header class="page-header">
<h3 class="page-title"><?php esc_html_e( 'Nothing Found', 'opalestate-pro' ); ?></h3>
</header>
<div class="notfound-content">
<p><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'opalestate-pro' ); ?></p>
</div><!-- .page-content -->
</div>

View File

@@ -0,0 +1,67 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
global $property, $post;
$property = opalesetate_property( get_the_ID() );
?>
<article itemscope itemtype="http://schema.org/Property" <?php post_class( 'property-featured-v1' ); ?>>
<div class="property-featured">
<div class="featured-info">
<div class="entry-content">
<div class="property-group-label">
<?php opalestate_property_label(); ?>
</div>
<?php the_title( '<h4 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h4>' ); ?>
<div class="entry-summary">
<div class="property-address">
<?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 if ( $property->get_address() ) : ?>
<span class="property-address__text"><?php echo esc_html( $property->get_address() ); ?></span>
<?php endif; ?>
</div>
<p class="property-description">
<?php echo opalestate_fnc_excerpt( 14, '...' ); ?>
</p>
</div>
</div><!-- .entry-content -->
<?php opalestate_get_single_short_meta(); ?>
<div class="property-meta-bottom">
<?php opalestate_property_loop_price(); ?>
</div>
<?php do_action( 'opalestate_after_property_loop_item' ); ?>
</div>
<header class="property-featured__header">
<div class="property-group-status">
<?php opalestate_property_status(); ?>
</div>
<?php
if ( has_post_thumbnail() ) {
$image = get_the_post_thumbnail_url( get_the_ID(), opalestate_get_option( 'loop_image_size', 'large' ) );
} else {
$image = opalestate_get_image_placeholder( opalestate_get_option( 'loop_image_size', 'large' ) );
}
?>
<div class="property-bg-thumbnail">
<a href="<?php echo esc_url( get_permalink() ); ?>" style="background-image:url('<?php echo esc_url( $image ); ?>')"></a>
</div>
<div class="entry-content-bottom clearfix">
<?php echo wp_kses_post( $property->render_author_link() ); ?>
<?php echo do_shortcode( '[opalestate_favorite_button property_id=' . get_the_ID() . ']' ); ?>
</div>
</header>
</div> <!-- .property-featured -->
<meta itemprop="url" content="<?php the_permalink(); ?>"/>
</article><!-- #post-## -->

View File

@@ -0,0 +1,52 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
global $property, $post;
$property = opalesetate_property( get_the_ID() );
?>
<article itemscope itemtype="http://schema.org/Property" <?php post_class( 'property-grid-v2' ); ?>>
<div class="property-grid">
<div class="entry-content">
<?php the_title( '<h5 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h5>' ); ?>
<div class="entry-summary">
<div class="property-address">
<?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 if ( $property->get_address() ) : ?>
<span class="property-address__text"><?php echo esc_html( $property->get_address() ); ?></span>
<?php endif; ?>
</div>
</div>
</div><!-- .entry-content -->
<header>
<div class="property-group-label">
<?php opalestate_property_label(); ?>
</div>
<div class="property-group-status">
<?php opalestate_property_status(); ?>
</div>
<?php opalestate_get_loop_thumbnail( opalestate_get_option( 'loop_image_size', 'large' ) ); ?>
</header>
<?php opalestate_get_single_short_meta(); ?>
<div class="entry-content-bottom clearfix">
<div class="property-meta-bottom">
<?php opalestate_property_loop_price(); ?>
</div>
<?php echo wp_kses_post( $property->render_author_link() ); ?>
<?php echo do_shortcode( '[opalestate_favorite_button property_id=' . get_the_ID() . ']' ); ?>
</div>
<?php do_action( 'opalestate_after_property_loop_item' ); ?>
</div> <!-- .property-grid -->
<meta itemprop="url" content="<?php the_permalink(); ?>"/>
</article><!-- #post-## -->

View File

@@ -0,0 +1,52 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
global $property, $post;
$property = opalesetate_property( get_the_ID() );
?>
<article itemscope itemtype="http://schema.org/Property" <?php post_class( 'property-grid-v3' ); ?>>
<div class="property-grid">
<header>
<div class="property-group-label">
<?php opalestate_property_label(); ?>
</div>
<div class="property-group-status">
<?php opalestate_property_status(); ?>
</div>
<?php opalestate_get_loop_thumbnail( opalestate_get_option( 'loop_image_size', 'large' ) ); ?>
<div class="property-meta-bottom">
<?php opalestate_property_loop_price(); ?>
</div>
</header>
<div class="entry-content">
<?php the_title( '<h5 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h5>' ); ?>
<div class="entry-summary">
<div class="property-address">
<?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 if ( $property->get_address() ) : ?>
<span class="property-address__text"><?php echo esc_html( $property->get_address() ); ?></span>
<?php endif; ?>
</div>
</div>
<?php opalestate_get_loop_short_meta(); ?>
</div><!-- .entry-content -->
<div class="entry-content-bottom clearfix">
<?php echo wp_kses_post( $property->render_author_link() ); ?>
<?php echo do_shortcode( '[opalestate_favorite_button property_id=' . get_the_ID() . ']' ); ?>
</div>
<?php do_action( 'opalestate_after_property_loop_item' ); ?>
</div> <!-- .property-grid -->
<meta itemprop="url" content="<?php the_permalink(); ?>"/>
</article><!-- #post-## -->

View File

@@ -0,0 +1,61 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
global $property, $post;
$property = opalesetate_property( get_the_ID() );
?>
<article itemscope itemtype="http://schema.org/Property" <?php post_class( 'property-grid-v1' ); ?>>
<div class="property-grid">
<div class="entry-content">
<?php the_title( '<h5 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h5>' ); ?>
<div class="entry-summary">
<div class="property-address">
<?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 if ( $property->get_address() ) : ?>
<span class="property-address__text"><?php echo esc_html( $property->get_address() ); ?></span>
<?php endif; ?>
</div>
</div>
</div><!-- .entry-content -->
<header class="property-grid__header">
<div class="property-group-label">
<?php opalestate_property_label(); ?>
</div>
<div class="property-group-status">
<?php opalestate_property_status(); ?>
</div>
<?php opalestate_get_loop_thumbnail( opalestate_get_option( 'loop_image_size', 'large' ) ); ?>
<?php echo wp_kses_post( $property->render_author_link() ); ?>
<div class="property-options">
<?php if ( ( $count = $property->get_gallery_count() ) && $count > 1 ) : ?>
<a href="#view-gallery" class="opalestate-ajax-gallery" data-id="<?php echo get_the_ID(); ?>"><i class="fa fa-camera"></i></a>
<?php endif; ?>
</div>
</header>
<?php opalestate_get_loop_short_meta(); ?>
<div class="entry-content-bottom clearfix">
<div class="property-meta-bottom">
<?php opalestate_property_loop_price(); ?>
</div>
<?php echo do_shortcode( '[opalestate_favorite_button property_id=' . get_the_ID() . ']' ); ?>
</div>
</div><!-- .property-grid -->
<?php do_action( 'opalestate_after_property_loop_item' ); ?>
<meta itemprop="url" content="<?php the_permalink(); ?>"/>
</article><!-- #post-## -->

View File

@@ -0,0 +1,37 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
global $property, $post;
$property = opalesetate_property( get_the_ID() );
?>
<article itemscope itemtype="http://schema.org/Property" <?php post_class( "property-list-style-v2" ); ?>>
<div class="property-list container-cols-2">
<header class="property-list__header">
<div class="property-group-label">
<?php opalestate_property_label(); ?>
</div>
<div class="property-group-status">
<?php opalestate_property_status(); ?>
</div>
<?php opalestate_get_loop_thumbnail( opalestate_get_option( 'loop_image_size', 'large' ) ); ?>
</header>
<div class="abs-col-item">
<div class="entry-content">
<?php the_title( '<h5 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h5>' ); ?>
<div class="property-address">
<?php echo esc_html( $property->get_address() ); ?>
</div>
<?php opalestate_property_loop_price(); ?>
</div><!-- .entry-content -->
<?php opalestate_get_loop_short_meta(); ?>
</div>
</div>
<?php do_action( 'opalestate_after_property_loop_item' ); ?>
<meta itemprop="url" content="<?php the_permalink(); ?>"/>
</article><!-- #post-## -->

View File

@@ -0,0 +1,68 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$property = opalesetate_property( get_the_ID() );
global $property, $post;
?>
<article itemscope itemtype="http://schema.org/Property" <?php post_class('property-list-style-v1'); ?>>
<div class="property-list container-cols-3">
<header class="property-list__header">
<div class="property-group-label">
<?php opalestate_property_label(); ?>
</div>
<div class="property-group-status">
<?php opalestate_property_status(); ?>
</div>
<div class="property-meta-bottom clearfix">
<div class="meta-item"><?php echo wp_kses_post( $property->render_author_link() ); ?></div>
<div class="meta-item">
<?php echo do_shortcode('[opalestate_favorite_button property_id='.get_the_ID() .']'); ?>
</div>
</div>
<?php opalestate_get_loop_thumbnail( opalestate_get_option('loop_image_size','large') ); ?>
</header>
<div class="abs-col-item">
<div class="entry-content">
<?php the_title( '<h5 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h5>' ); ?>
<div class="property-address">
<?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 if ( $property->get_address() ) : ?>
<span class="property-address__text"><?php echo esc_html( $property->get_address() ); ?></span>
<?php endif; ?>
</div>
<?php opalestate_property_loop_price(); ?>
</div><!-- .entry-content -->
<?php opalestate_get_single_short_meta(); ?>
</div>
<div class="entry-summary">
<h5><?php echo esc_html__( 'Description', 'opalestate-pro' ); ?></h5>
<?php echo wp_trim_words( get_the_excerpt(), 30, '...' ); ?>
</div><!-- .entry-summary -->
</div>
<?php do_action( 'opalestate_after_property_loop_item' ); ?>
<meta itemprop="url" content="<?php the_permalink(); ?>" />
</article><!-- #post-## -->

View File

@@ -0,0 +1,26 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
global $property, $post;
$property = opalesetate_property( get_the_ID() );
$bg = get_the_post_thumbnail_url( get_the_ID(), opalestate_get_option( 'loop_image_size', 'large' ) );
$style = $bg ? 'style="background-image: url(' . esc_url( $bg ) . ');"' : '';
?>
<article itemscope itemtype="http://schema.org/Property" <?php post_class( 'property-mark-hover-item' ); ?>>
<div class="property-grid">
<header class="property-grid__header" <?php echo $style; ?>>
<div class="entry-content">
<?php the_title( '<h5 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h5>' ); ?>
<div class="property-meta">
<div class="property-price-wrapper"><?php opalestate_property_loop_price(); ?></div>
<div class="property-areasize"><?php echo apply_filters( 'opalestate_areasize_unit_format', $property->get_metabox_value( 'areasize' ) ); ?></div>
</div>
<?php // opalestate_get_loop_short_meta(); ?>
</div><!-- .entry-content -->
</header>
<?php do_action( 'opalestate_after_property_loop_item' ); ?>
</div> <!-- .property-grid -->
<meta itemprop="url" content="<?php the_permalink(); ?>"/>
</article><!-- #post-## -->

18
templates/content-property.php Executable file
View File

@@ -0,0 +1,18 @@
<article itemscope itemtype="http://schema.org/Property" <?php post_class(); ?>>
<?php do_action( 'opalestate_before_property_loop_item' ); ?>
<header>
<?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?>
</header>
<div class="entry-content">
<?php opalestate_get_loop_thumbnail( opalestate_get_option( 'loop_image_size', 'large' ) ); ?>
<?php echo do_shortcode( '[opalestate_favorite_button property_id=' . get_the_ID() . ']' ); ?>
</div><!-- .entry-content -->
<?php do_action( 'opalestate_after_property_loop_item' ); ?>
<meta itemprop="url" content="<?php the_permalink(); ?>"/>
</article><!-- #post-## -->

View File

@@ -0,0 +1,148 @@
<?php global $post, $agency;
$agency = opalesetate_agency( get_the_ID() );
$maps = $agency->get_meta( 'map' );
$address = $agency->get_meta( 'address' );
$rowcls = apply_filters( 'opalestate_row_container_class', 'opal-row' );
$id = time();
?>
<article id="post-<?php the_ID(); ?>" itemscope itemtype="http://schema.org/RealEstateAgency" <?php post_class( 'opalestate_single_agency' ); ?>>
<div class="<?php echo esc_attr( $rowcls ); ?>">
<div class="col-lg-8 col-md-8 col-sm-12">
<div class="agency-box-top opalestate-sidebar-box">
<?php echo opalestate_load_template_path( 'single-agency/author-box' ); ?>
</div>
<?php
$team = opalestate_load_template_path( 'single-agency/team' );
$properties = opalestate_load_template_path( 'single-agency/properties' );
$tabs = [
'description' => [ 'enable' => 1, 'name' => esc_html__( 'Description', 'opalestate-pro' ) ],
'address' => [ 'enable' => 1, 'name' => esc_html__( 'Address', 'opalestate-pro' ) ],
'properties' => [ 'enable' => ! empty( $properties ), 'name' => esc_html__( 'Listing', 'opalestate-pro' ) ],
'team' => [ 'enable' => ! empty( $team ), 'name' => esc_html__( 'Team', 'opalestate-pro' ) ],
];
?>
<div class="agency-nav-tabs">
<div class="opalestate-tab">
<div class="nav opalestate-tab-head" role="tablist">
<?php foreach ( $tabs as $key => $tab ): ?>
<?php if ( $tab['enable'] ): ?>
<a aria-expanded="true" href="#tab-content-<?php echo esc_attr( $key ); ?>" role="tab" class="tab-item">
<span><?php echo esc_html( $tab['name'] ); ?></span>
</a>
<?php endif; ?>
<?php endforeach; ?>
</div>
<div class="opalestate-tabs-content">
<div class="opalestate-tab-content" id="tab-content-description">
<div class="opalestate-box-content">
<h4 class="outbox-title"><?php esc_html_e( 'Description', 'opalestate-pro' ); ?></h4>
<div class="opalestate-box">
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
the_content( sprintf(
__( 'Continue reading %s', 'opalestate-pro' ),
the_title( '<span class="screen-reader-text">', '</span>', false )
) );
$end = 4;
?>
</div><!-- .entry-content -->
<?php echo opalestate_load_template_path( 'single-agency/gallery' ); ?>
</div>
</div>
</div>
<div class="opalestate-tab-content" id="tab-content-address">
<?php if ( isset( $maps ) ): ?>
<div class="opalestate-box-content">
<h4 class="outbox-title"><?php esc_html_e( 'Address', 'opalestate-pro' ); ?></h4>
<div class="opalestate-box agency-address-map">
<div class="agency-google-map-content">
<?php if ( $address ): ?>
<p>
<i class="fa fa-map-marker"></i> <span><?php esc_html_e( 'Head Agency:', 'opalestate-pro' ); ?></span> <?php echo wp_kses_post( $address ); ?>.
<?php
$terms = wp_get_post_terms( get_the_ID(), 'opalestate_agency_location' );
if ( $terms && ! is_wp_error( $terms ) ) {
echo '<strong>' . esc_html__( 'Location:', 'opalestate-pro' ) . '</strong>';
$output = '<span class="property-locations">';
foreach ( $terms as $term ) {
$output .= $term->name;
}
$output .= '</span>';
echo wp_kses_post( $output );
}
?>
</p>
<?php endif; ?>
<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>
</div>
</div>
<?php endif ?>
</div>
<?php if ( $team ): ?>
<div class="opalestate-tab-content" id="tab-content-team">
<div class="opalestate-box-content">
<h4 class="outbox-title"><?php esc_html_e( 'Team', 'opalestate-pro' ); ?></h4>
<?php echo $team; ?>
</div>
</div>
<?php endif; ?>
<?php if ( $properties ): ?>
<div class="opalestate-tab-content" id="tab-content-properties">
<div class="opalestate-box-content">
<h4 class="outbox-title"><?php esc_html_e( 'Properties', 'opalestate-pro' ); ?></h4>
<div class="opalestate-box">
<?php echo $properties; ?>
</div>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
<?php comments_template(); ?>
<div class="content-bottom">
<?php do_action( 'opalestate_single_agency_content_bottom' ); ?>
</div>
<?php // echo opalestate_load_template_path( 'single-agency/tabs' ); ?>
<meta itemprop="url" content="<?php the_permalink(); ?>"/>
</div>
<div class="col-lg-4 col-md-4 col-sm-12 opalestate-sticky-column">
<div class="agency-contact-form opalestate-sidebar-box">
<?php
$email = $agency->get_meta( 'email' );
$args = [
'post_id' => get_the_ID(),
'id' => get_the_ID(),
'email' => $email,
'heading' => esc_html__( 'Contact Us', 'opalestate-pro' ),
'message' => sprintf( esc_html__( 'Hi %s. I saw your profile and wanted to see if you could help me.', 'opalestate-pro' ), get_the_title() ),
'type' => 'agency',
];
echo apply_filters( 'opalestate_render_contact_form', opalestate_load_template_path( 'messages/contact-form', $args ), $args );
?>
</div>
</div>
</div>
</article><!-- #post-## -->
<?php do_action( 'opalestate_single_content_agency_after' ); ?>

View File

@@ -0,0 +1,112 @@
<?php
global $post, $agent;
$agent = opalesetate_agent( get_the_ID() );
$maps = $agent->get_meta( 'map' );
$address = $agent->get_meta( 'address' );
$id = time();
?>
<div class="agent-single-top">
<div class="agency-single-stick-bars keep-top-bars ">
<div class="container">
<div class="<?php echo apply_filters( 'opalestate_row_container_class', 'opal-row' ); ?>">
<div class="col-md-4 col-sm-12"></div>
<div class="col-md-8 col-sm-12">
<ul class="list-inline opalestate-scroll-elements">
<li><a href="#block-description" class="active"><?php esc_html_e( 'Description', 'opalestate-pro' ); ?></a></li>
<li><a href="#reviews"><?php esc_html_e( 'Review', 'opalestate-pro' ); ?></a></li>
<li><a href="#block-my-properties"><?php esc_html_e( 'Properties', 'opalestate-pro' ); ?></a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<article id="post-<?php the_ID(); ?>" itemscope itemtype="http://schema.org/RealEstateAgent" <?php post_class( 'single-agent' ); ?>>
<div class="opal-row" id="block-description">
<div class="col-lg-4 col-md-4 col-sm-12 agent-sidebar">
<div class="agent-box">
<?php echo opalestate_load_template_path( 'single-agent/author-box' ); ?>
<div class="opalestate-sidebar-box">
<?php
$email = $agent->get_meta( 'email' );
$args = [
'post_id' => get_the_ID(),
'id' => get_the_ID(),
'email' => $email,
'message' => '',
'type' => 'agent',
];
echo apply_filters( 'opalestate_render_contact_form', opalestate_load_template_path( 'messages/contact-form', $args ), $args );
?>
</div>
</div>
<?php do_action( 'opalestate_single_content_agent_sidebar' ); ?>
</div>
<div class="col-lg-8 col-md-8 col-sm-12">
<header class="hide">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header>
<div class="entry-content">
<div class="opalestate-box agent-description">
<h5 class="box-heading"><?php esc_html_e( 'About the Agent', '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( [
'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>
<div class="content-bottom">
<?php do_action( 'opalestate_single_agent_content_bottom' ); ?>
</div>
<?php if ( isset( $maps ) ): ?>
<div class="opalestate-box agent-address-map">
<h5 class="box-heading"><?php esc_html_e( 'My Address', 'opalestate-pro' ); ?></h5>
<div class="agent-google-map-content">
<?php if ( $address ): ?>
<p>
<i class="fa fa-map-marker"></i> <span><?php esc_html_e( 'Address:', 'opalestate-pro' ); ?></span> <?php echo wp_kses_post( $address ); ?>.
<?php
$terms = wp_get_post_terms( get_the_ID(), 'opalestate_agent_location' );
if ( $terms && ! is_wp_error( $terms ) ) {
echo '<strong>' . esc_html__( 'Location:', 'opalestate-pro' ) . '</strong>';
$output = '<span class="property-locations">';
foreach ( $terms as $term ) {
$output .= $term->name;
}
$output .= '</span>';
echo $output;
}
?>
</p>
<?php endif; ?>
<div id="property-map<?php echo esc_attr( $id ); ?>" class="property-preview-map" style="height:400px"
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>
</div>
<?php endif ?>
</div><!-- .entry-content -->
<?php comments_template(); ?>
<meta itemprop="url" content="<?php the_permalink(); ?>"/>
<?php do_action( 'opalestate_single_content_agent_after' ); ?>
</div>
</div>
</article><!-- #post-## -->
</div>

View File

@@ -0,0 +1,83 @@
<?php global $property, $post;
$property_id = isset( $property_id ) ? $property_id : get_the_ID();
$property = opalesetate_property( $property_id );
?>
<div class="property-single-top">
<div class="container">
<header class="property-single-header">
<div class="property-single-info">
<div class="group-items">
<h2 class="entry-title"><?php echo get_the_title( $property_id ); ?></h2>
<?php opalestate_property_label(); ?>
<?php opalestate_property_status(); ?>
<div class="property-meta">
<div class="property-meta__list">
<?php opalestate_property_types_list(); ?>
<?php opalestate_property_categories_list(); ?>
</div>
<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-address__view-map property-view-map"><i class="fa fa-map-marker"></i></span>
</a>
<?php endif; ?>
<?php if ( $property->get_address() ) : ?>
<span class="property-address__text"><?php echo esc_html( $property->get_address() ); ?></span>
<?php endif; ?>
</div>
</div>
</div>
</div>
<div class="single-price-content"><?php opalestate_property_loop_price(); ?></div>
</div>
</header>
<?php if ( has_post_thumbnail( $property_id ) ): ?>
<?php echo get_the_post_thumbnail( $property_id, 'full' ); ?>
<?php endif; ?>
</div>
</div>
<div class="container">
<article id="property-<?php echo absint( $property_id ); ?>" <?php post_class( "opalestate-single-property opalestate-single-property--print" ); ?>>
<div class="opalestate-box-content">
<h4 class="outbox-title"><?php esc_html_e( 'Property Description', 'opalestate-pro' ); ?></h4>
<div class="summary entry-summary opalestate-rows">
<div class="property-meta-top">
<div class="property-id">
<?php if ( $property->get_sku() ) : ?>
<span><?php esc_html_e( 'Property ID: ', 'opalestate-pro' ) ?></span>
<span class="property-sku"><strong><?php echo esc_html( $property->get_sku() ); ?></strong></span>
<?php endif; ?>
</div>
</div>
<?php
opalestate_get_single_short_meta();
opalestate_property_content();
opalestate_property_information();
opalestate_property_amenities();
opalestate_property_facilities();
?>
</div><!-- .summary -->
<?php
opalestate_property_apartments();
opalestate_property_floor_plans();
?>
</div>
<div class="clear clearfix"></div>
</article><!-- #post-## -->
</div>
<style>
.breadcrumbs,
#wrapper-navbar,
#wrapper-footer {
display: none;
}
</style>

View File

@@ -0,0 +1,166 @@
<?php global $property, $post;
$property = opalesetate_property( get_the_ID() );
$floors = $property->get_floor_plans();
$floors_enabled = $property->get_block_setting( 'floor_plans' );
$attachments = $property->get_attachments();
$attachments_enabled = $property->get_block_setting( 'attachments' );
$header = apply_filters( 'opalestate_single_show_heading', true );
?>
<div class="container">
<article id="property-<?php the_ID(); ?>" itemscope itemtype="http://schema.org/Property" <?php post_class( "opalestate-single-property opalestate-single-property--version-2" ); ?>>
<?php if ( $header ): ?>
<header class="property-single-header">
<div class="property-single-info">
<div class="group-items">
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
<?php opalestate_property_label(); ?>
<?php opalestate_property_status(); ?>
<div class="property-meta">
<div class="property-meta__list">
<?php opalestate_property_types_list(); ?>
<?php opalestate_property_categories_list(); ?>
</div>
<div class="property-address clearfix">
<?php if ( $property->latitude && $property->longitude ) : ?>
<a href="<?php echo esc_url( $property->get_google_map_link() ); ?>" rel="nofollow" target="_blank">
<span class="property-address__view-map property-view-map"><i class="fa fa-map-marker"></i></span>
</a>
<?php endif; ?>
<?php if ( $property->get_address() ) : ?>
<span class="property-address__text"><?php echo esc_html( $property->get_address() ); ?></span>
<?php endif; ?>
</div>
<div class="property-date">
<?php
printf(
/* translators: %s: property date */
__( 'Posted: %s', 'opalestate-pro' ),
esc_html( $property->get_posted() )
);
?>
</div>
</div>
</div>
<div class="single-price-content"><?php opalestate_property_loop_price(); ?></div>
</div>
</header>
<?php endif; ?>
<div class="opal-row">
<div class="col-lg-8 col-md-8 col-sm-12">
<?php
/**
* opalestate_before_single_property_summary hook
*/
do_action( 'opalestate_single_property_preview' );
?>
<meta itemprop="url" content="<?php the_permalink(); ?>"/>
<div class="entry-summary-tabs summary entry-summary">
<?php
$tabs = [
'summary' => [ 'enable' => 1, 'name' => esc_html__( 'Description', 'opalestate-pro' ) ],
'information' => [ 'enable' => 1, 'name' => esc_html__( 'Information', 'opalestate-pro' ) ],
'floors' => [ 'enable' => $floors_enabled && $floors, 'name' => esc_html__( 'Floor Plans', 'opalestate-pro' ) ],
'attachment' => [ 'enable' => $attachments_enabled && $attachments, 'name' => esc_html__( 'Attachment', 'opalestate-pro' ) ],
]; ?>
<div class="opalestate-tab">
<div class="nav opalestate-tab-head" role="tablist">
<?php foreach ( $tabs as $key => $tab ): ?>
<?php if ( $tab['enable'] ): ?>
<a aria-expanded="true" href="#tab-content-<?php echo esc_attr( $key ); ?>" role="tab" class="tab-item">
<span><?php echo esc_html( $tab['name'] ); ?></span>
</a>
<?php endif; ?>
<?php endforeach; ?>
</div>
<div class="opalestate-tabs-content">
<div class="opalestate-tab-content" id="tab-content-summary">
<div class="opalestate-box-content">
<h4 class="outbox-title"><?php esc_html_e( 'Property Description', 'opalestate-pro' ); ?></h4>
<div class="property-tab-content">
<div class="property-meta-top">
<ul class="list-inline property-meta-top__list">
<?php if ( $property->get_sku() ) : ?>
<li class="list-inline__sku">
<span><?php esc_html_e( 'Property ID: ', 'opalestate-pro' ) ?></span>
<span class="property-sku"><?php echo esc_html( $property->get_sku() ); ?></span>
</li>
<?php endif; ?>
<li class="list-inline__request-viewing">
<?php opalestate_property_request_viewing_button( true ); ?>
</li>
<li class="list-inline__print property-meta-top__button">
<?php opalestate_property_print_button( $property->get_id() ); ?>
</li>
<li class="list-inline__favorite property-meta-top__button">
<?php echo do_shortcode( '[opalestate_favorite_button property_id=' . get_the_ID() . ']' ); ?>
</li>
</ul>
</div>
<div class=" opalestate-rows">
<?php
/**
* opalestate_single_property_summary hook
*/
do_action( 'opalestate_single_property_summary' );
?>
<div class="content-bottom">
<?php do_action( 'opalestate_single_content_bottom' ); ?>
</div>
</div><!-- .summary -->
</div>
</div>
</div>
<div class="opalestate-tab-content" id="tab-content-information">
<div class="opalestate-box-content">
<h4 class="outbox-title"><?php esc_html_e( 'Property Information', 'opalestate-pro' ); ?></h4>
<div class="property-tab-content">
<?php opalestate_property_information(); ?>
<?php opalestate_property_amenities(); ?>
<?php opalestate_property_facilities(); ?>
</div>
</div>
</div>
<?php if ( $attachments ): ?>
<div class="opalestate-tab-content" id="tab-content-attachment">
<div class="opalestate-box-content">
<h4 class="outbox-title"><?php esc_html_e( 'Property Attachments', 'opalestate-pro' ); ?></h4>
<div class="property-tab-content">
<?php opalestate_property_attachments(); ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if ( $floors ): ?>
<div class="opalestate-tab-content" id="tab-content-floors">
<?php opalestate_property_floor_plans(); ?>
</div>
<?php endif; ?>
</div>
</div>
</div>
<?php
/**
* opalestate_after_single_property_summary hook
*/
do_action( 'opalestate_after_single_property_summary' );
?>
<div class="clear clearfix"></div>
</div>
<div class="col-lg-4 col-md-4 col-sm-12 single-property-sidebar">
<?php do_action( 'opalestate_single_property_sidebar' ); ?>
</div>
</div>
</article><!-- #post-## -->
</div>

View File

@@ -0,0 +1,113 @@
<?php global $property, $post;
$property = opalesetate_property( get_the_ID() );
$header = apply_filters( 'opalestate_single_show_heading', true );
?>
<div class="property-single-top">
<?php
/**
* opalestate_before_single_property_summary hook
*/
do_action( 'opalestate_single_property_preview' );
?>
<div class="property-single-stick-bars keep-top-bars ">
<div class="container">
<ul class="list-inline">
<li class="list-inline__favorite">
<?php echo do_shortcode( '[opalestate_favorite_button property_id=' . get_the_ID() . ']' ); ?>
</li>
<li class="list-inline__print">
<?php opalestate_property_print_button( $property->get_id() ); ?>
</li>
<li class="list-inline__request-viewing single-property-buttons">
<?php opalestate_property_request_viewing_button(); ?>
</li>
</ul>
</div>
</div>
</div>
<div class="property-single-content container">
<article id="property-<?php the_ID(); ?>" itemscope itemtype="http://schema.org/Property" <?php post_class( "opalestate-single-property opalestate-single-property--version-3" ); ?>>
<div class="opal-row">
<div class="col-lg-8 col-md-8 col-sm-12">
<?php if ( $header ): ?>
<header class="property-single-header">
<div class="property-single-info">
<div class="single-price-content"><?php opalestate_property_loop_price(); ?></div>
<div class="group-items">
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
<?php opalestate_property_label(); ?>
<?php opalestate_property_status(); ?>
<div class="property-meta">
<div class="property-meta__list">
<?php opalestate_property_types_list(); ?>
<?php opalestate_property_categories_list(); ?>
</div>
<div class="property-address clearfix">
<?php if ( $property->latitude && $property->longitude ) : ?>
<a href="<?php echo esc_url( $property->get_google_map_link() ); ?>" rel="nofollow" target="_blank">
<span class="property-address__view-map property-view-map"><i class="fa fa-map-marker"></i></span>
</a>
<?php endif; ?>
<?php if ( $property->get_address() ) : ?>
<span class="property-address__text"><?php echo esc_html( $property->get_address() ); ?></span>
<?php endif; ?>
</div>
<div class="property-date">
<?php
printf(
/* translators: %s: property date */
__( 'Posted: %s', 'opalestate-pro' ),
esc_html( $property->get_posted() )
);
?>
</div>
</div>
</div>
</div>
</header>
<?php endif; ?>
<div class="opalestate-box-content">
<h4 class="outbox-title"><?php esc_html_e( 'Property Description', 'opalestate-pro' ); ?></h4>
<div class="summary entry-summary opalestate-rows">
<div class="property-meta-top">
<div class="property-id">
<?php if ( $property->get_sku() ) : ?>
<span><?php esc_html_e( 'Property ID: ', 'opalestate-pro' ) ?></span>
<span class="property-sku"><?php echo esc_html( $property->get_sku() ); ?></span>
<?php endif; ?>
</div>
</div>
<?php
/**
* opalestate_single_property_summary hook
*/
do_action( 'opalestate_single_property_summary' );
?>
<div class="content-bottom">
<?php do_action( 'opalestate_single_content_bottom' ); ?>
</div>
</div><!-- .summary -->
</div>
<meta itemprop="url" content="<?php the_permalink(); ?>"/>
<?php
/**
* opalestate_after_single_property_summary hook
*/
do_action( 'opalestate_after_single_property_summary' );
?>
</div>
<div class="col-lg-4 col-md-4 col-sm-12 single-property-sidebar">
<?php do_action( 'opalestate_single_property_sidebar' ); ?>
</div>
</div>
<div class="clear clearfix"></div>
</article><!-- #post-## -->
</div>

View File

@@ -0,0 +1,108 @@
<?php global $property, $post;
$property = opalesetate_property( get_the_ID() );
$header = apply_filters( 'opalestate_single_show_heading', true );
?>
<div class="container">
<article id="property-<?php the_ID(); ?>" itemscope itemtype="http://schema.org/Property" <?php post_class( "opalestate-single-property opalestate-single-property--version-4" ); ?>>
<div class="opal-row">
<div class="col-lg-8 col-md-8 col-sm-12">
<?php if ( $header ): ?>
<header class="property-single-header">
<div class="property-single-info">
<div class="group-items">
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
<?php opalestate_property_label(); ?>
<?php opalestate_property_status(); ?>
<div class="property-meta">
<div class="property-meta__list">
<?php opalestate_property_types_list(); ?>
<?php opalestate_property_categories_list(); ?>
</div>
<div class="property-address clearfix">
<?php if ( $property->latitude && $property->longitude ) : ?>
<a href="<?php echo esc_url( $property->get_google_map_link() ); ?>" rel="nofollow" target="_blank">
<span class="property-address__view-map property-view-map"><i class="fa fa-map-marker"></i></span>
</a>
<?php endif; ?>
<?php if ( $property->get_address() ) : ?>
<span class="property-address__text"><?php echo esc_html( $property->get_address() ); ?></span>
<?php endif; ?>
</div>
<div class="property-date">
<?php
printf(
/* translators: %s: property date */
__( 'Posted: %s', 'opalestate-pro' ),
esc_html( $property->get_posted() )
);
?>
</div>
</div>
</div>
<div class="single-price-content"><?php opalestate_property_loop_price(); ?></div>
</div>
</header>
<?php endif; ?>
<?php
/**
* opalestate_before_single_property_summary hook
*/
do_action( 'opalestate_single_property_preview' );
?>
<div class="opalestate-box-content">
<h4 class="outbox-title"><?php esc_html_e( 'Property Description', 'opalestate-pro' ); ?></h4>
<div class="summary entry-summary opalestate-rows">
<div class="property-meta-top">
<ul class="list-inline property-meta-top__list">
<?php if ( $property->get_sku() ) : ?>
<li class="list-inline__sku">
<span><?php esc_html_e( 'Property ID: ', 'opalestate-pro' ) ?></span>
<span class="property-sku"><?php echo esc_html( $property->get_sku() ); ?></span>
</li>
<?php endif; ?>
<li class="list-inline__request-viewing">
<?php opalestate_property_request_viewing_button( true ); ?>
</li>
<li class="list-inline__print property-meta-top__button">
<?php opalestate_property_print_button( $property->get_id() ); ?>
</li>
<li class="list-inline__favorite property-meta-top__button">
<?php echo do_shortcode( '[opalestate_favorite_button property_id=' . get_the_ID() . ']' ); ?>
</li>
</ul>
</div>
<?php
/**
* opalestate_single_property_summary hook
*/
do_action( 'opalestate_single_property_summary' );
?>
<div class="content-bottom">
<?php do_action( 'opalestate_single_content_bottom' ); ?>
</div>
</div><!-- .summary -->
</div>
<meta itemprop="url" content="<?php the_permalink(); ?>"/>
<?php
/**
* opalestate_after_single_property_summary hook
*/
do_action( 'opalestate_after_single_property_summary' );
?>
<div class="clear clearfix"></div>
</div>
<div class="col-lg-4 col-md-4 col-sm-12 single-property-sidebar opalestate-sticky-column">
<div class="inner">
<?php do_action( 'opalestate_single_property_sidebar' ); ?>
</div>
</div>
</div>
</article><!-- #post-## -->
</div>

View File

@@ -0,0 +1,136 @@
<?php global $property, $post;
$property = opalesetate_property( get_the_ID() );
$header = apply_filters( 'opalestate_single_show_heading', true );
?>
<div class="property-single-top ">
<?php
/**
* opalestate_before_single_property_summary hook
*/
do_action( 'opalestate_single_property_preview' );
?>
<div class="property-single-stick-bars keep-top-bars ">
<div class="container">
<ul class="list-inline opalestate-scroll-elements">
<li><a href="#block-description"><?php esc_html_e( 'Description', 'opalestate-pro' ); ?></a></li>
<?php if ( $property->get_block_setting( 'video' ) ) : ?>
<li><a href="#block-video"><?php esc_html_e( 'Video', 'opalestate-pro' ); ?></a></li>
<?php endif; ?>
<?php if ( $property->get_block_setting( 'map' ) && apply_filters( 'opalestate_single_show_map', true ) ) : ?>
<li><a href="#block-map"><?php esc_html_e( 'Map', 'opalestate-pro' ); ?></a></li>
<?php endif; ?>
<?php if ( $property->get_block_setting( 'walkscores' ) ) : ?>
<li><a href="#block-scores"><?php esc_html_e( 'Scores', 'opalestate-pro' ); ?></a></li>
<?php endif; ?>
<?php if ( $property->get_block_setting( 'views_statistics' ) ) : ?>
<li><a href="#block-statistics"><?php esc_html_e( 'Statistics', 'opalestate-pro' ); ?></a></li>
<?php endif; ?>
<?php if ( $property->get_block_setting( 'apartments' ) && $property->get_apartments() ) : ?>
<li><a href="#block-apartments"><?php esc_html_e( 'Apartments', 'opalestate-pro' ); ?></a></li>
<?php endif; ?>
<?php if ( $property->get_block_setting( 'floor_plans' ) && $property->get_floor_plans() ) : ?>
<li><a href="#block-floor-plans"><?php esc_html_e( 'Floor Plans', 'opalestate-pro' ); ?></a></li>
<?php endif; ?>
<li><a href="#reviews"><?php esc_html_e( 'Reviews', 'opalestate-pro' ); ?></a></li>
<li class="single-property-buttons">
<?php opalestate_property_request_viewing_button(); ?>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<article id="property-<?php the_ID(); ?>" itemscope itemtype="http://schema.org/Property" <?php post_class( "opalestate-single-property opalestate-single-property--version-5" ); ?>>
<meta itemprop="url" content="<?php the_permalink(); ?>"/>
<div class="opal-row">
<div class="col-lg-8 col-md-8 col-sm-12">
<?php if ( $header ): ?>
<header class="property-single-header">
<div class="property-single-info">
<div class="single-price-content"><?php opalestate_property_loop_price(); ?></div>
<div class="group-items">
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
<?php opalestate_property_label(); ?>
<?php opalestate_property_status(); ?>
<div class="property-meta">
<div class="property-meta__list">
<?php opalestate_property_types_list(); ?>
<?php opalestate_property_categories_list(); ?>
</div>
<div class="property-address clearfix">
<?php if ( $property->latitude && $property->longitude ) : ?>
<a href="<?php echo esc_url( $property->get_google_map_link() ); ?>" rel="nofollow" target="_blank">
<span class="property-address__view-map property-view-map"><i class="fa fa-map-marker"></i></span>
</a>
<?php endif; ?>
<?php if ( $property->get_address() ) : ?>
<span class="property-address__text"><?php echo esc_html( $property->get_address() ); ?></span>
<?php endif; ?>
</div>
<div class="property-date">
<?php
printf(
/* translators: %s: property date */
__( 'Posted: %s', 'opalestate-pro' ),
esc_html( $property->get_posted() )
);
?>
</div>
</div>
</div>
</div>
</header>
<?php endif; ?>
<div class="opalestate-box-content">
<h4 class="outbox-title" id="block-description"><?php esc_html_e( 'Property Description', 'opalestate-pro' ); ?></h4>
<div class="summary entry-summary opalestate-rows">
<div class="property-meta-top">
<ul class="list-inline property-meta-top__list">
<?php if ( $property->get_sku() ) : ?>
<li class="list-inline__sku">
<span><?php esc_html_e( 'Property ID: ', 'opalestate-pro' ) ?></span>
<span class="property-sku"><?php echo esc_html( $property->get_sku() ); ?></span>
</li>
<?php endif; ?>
<li class="list-inline__print property-meta-top__button">
<?php opalestate_property_print_button( $property->get_id() ); ?>
</li>
<li class="list-inline__favorite property-meta-top__button">
<?php echo do_shortcode( '[opalestate_favorite_button property_id=' . get_the_ID() . ']' ); ?>
</li>
</ul>
</div>
<?php
/**
* opalestate_single_property_summary hook
*/
do_action( 'opalestate_single_property_summary' );
?>
<div class="content-bottom">
<?php do_action( 'opalestate_single_content_bottom' ); ?>
</div>
</div><!-- .summary -->
</div>
<?php
/**
* opalestate_after_single_property_summary hook
*/
do_action( 'opalestate_after_single_property_summary' );
?>
<div class="clear clearfix"></div>
</div>
<div class="col-lg-4 col-md-4 col-sm-12 single-property-sidebar">
<div class="inner">
<?php do_action( 'opalestate_single_property_sidebar' ); ?>
</div>
</div>
</div>
</article><!-- #post-## -->
</div>

View File

@@ -0,0 +1,112 @@
<?php global $property, $post;
$property = opalesetate_property( get_the_ID() );
$header = apply_filters( 'opalestate_single_show_heading', true );
?>
<div class="property-single-top">
<div class="container">
<header class="property-single-header">
<div class="property-single-info">
<div class="group-items">
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
<?php opalestate_property_label(); ?>
<?php opalestate_property_status(); ?>
<div class="property-meta">
<div class="property-meta__list">
<?php opalestate_property_types_list(); ?>
<?php opalestate_property_categories_list(); ?>
</div>
<div class="property-address clearfix">
<?php if ( $property->latitude && $property->longitude ) : ?>
<a href="<?php echo esc_url( $property->get_google_map_link() ); ?>" rel="nofollow" target="_blank">
<span class="property-address__view-map property-view-map"><i class="fa fa-map-marker"></i></span>
</a>
<?php endif; ?>
<?php if ( $property->get_address() ) : ?>
<span class="property-address__text"><?php echo esc_html( $property->get_address() ); ?></span>
<?php endif; ?>
</div>
<div class="property-date">
<?php
printf(
/* translators: %s: property date */
__( 'Posted: %s', 'opalestate-pro' ),
esc_html( $property->get_posted() )
);
?>
</div>
</div>
</div>
<div class="single-price-content"><?php opalestate_property_loop_price(); ?></div>
</div>
</header>
<?php
/**
* opalestate_before_single_property_summary hook
*/
do_action( 'opalestate_single_property_preview' );
?>
</div>
</div>
<div class="container">
<article id="property-<?php the_ID(); ?>" itemscope itemtype="http://schema.org/Property" <?php post_class( "opalestate-single-property opalestate-single-property--version-1" ); ?>>
<div class="opal-row">
<div class="col-lg-8 col-md-8 col-sm-12">
<div class="opalestate-box-content">
<h4 class="outbox-title"><?php esc_html_e( 'Property Description', 'opalestate-pro' ); ?></h4>
<div class="summary entry-summary opalestate-rows">
<div class="property-meta-top">
<ul class="list-inline property-meta-top__list">
<?php if ( $property->get_sku() ) : ?>
<li class="list-inline__sku">
<span><?php esc_html_e( 'Property ID: ', 'opalestate-pro' ) ?></span>
<span class="property-sku"><?php echo esc_html( $property->get_sku() ); ?></span>
</li>
<?php endif; ?>
<li class="list-inline__request-viewing">
<?php opalestate_property_request_viewing_button( true ); ?>
</li>
<li class="list-inline__print property-meta-top__button">
<?php opalestate_property_print_button( $property->get_id() ); ?>
</li>
<li class="list-inline__favorite property-meta-top__button">
<?php echo do_shortcode( '[opalestate_favorite_button property_id=' . get_the_ID() . ']' ); ?>
</li>
</ul>
</div>
<?php
/**
* opalestate_single_property_summary hook
*/
do_action( 'opalestate_single_property_summary' );
?>
<div class="content-bottom">
<?php do_action( 'opalestate_single_content_bottom' ); ?>
</div>
</div><!-- .summary -->
</div>
<meta itemprop="url" content="<?php the_permalink(); ?>"/>
<?php
/**
* opalestate_after_single_property_summary hook
*/
do_action( 'opalestate_after_single_property_summary' );
?>
<div class="clear clearfix"></div>
</div>
<div class="col-lg-4 col-md-4 col-sm-12 single-property-sidebar opalestate-sticky-column">
<div class="inner">
<?php do_action( 'opalestate_single_property_sidebar' ); ?>
</div>
</div>
</div>
</article><!-- #post-## -->
</div>

148
templates/content-user-grid.php Executable file
View File

@@ -0,0 +1,148 @@
<?php
$agent_id = get_user_meta( $user_id, OPALESTATE_USER_PROFILE_PREFIX . 'related_id', true );
$user = get_userdata( $user_id );
$user = $user->data;
$picture = OpalEstate_User::get_author_picture( $user_id );
if ( $agent_id ) {
$agent = opalesetate_agent( $agent_id );
$post = get_post( $agent_id );
$facebook = get_post_meta( $agent_id, OPALESTATE_AGENT_PREFIX . 'facebook', true );
$twitter = get_post_meta( $agent_id, OPALESTATE_AGENT_PREFIX . 'twitter', true );
$pinterest = get_post_meta( $agent_id, OPALESTATE_AGENT_PREFIX . 'pinterest', true );
$google = get_post_meta( $agent_id, OPALESTATE_AGENT_PREFIX . 'google', true );
$instagram = get_post_meta( $agent_id, OPALESTATE_AGENT_PREFIX . 'instagram', true );
$linkedIn = get_post_meta( $agent_id, OPALESTATE_AGENT_PREFIX . 'linkedIn', true );
$job = get_post_meta( $agent_id, OPALESTATE_AGENT_PREFIX . 'job', true );
$title = $post->post_title;
$author_link = get_permalink( $agent_id );
wp_reset_query();
} else {
$title = $user->display_name;
$facebook = get_post_meta( $user_id, OPALESTATE_USER_PROFILE_PREFIX . 'facebook', true );
$twitter = get_post_meta( $user_id, OPALESTATE_USER_PROFILE_PREFIX . 'twitter', true );
$pinterest = get_post_meta( $user_id, OPALESTATE_USER_PROFILE_PREFIX . 'pinterest', true );
$google = get_post_meta( $user_id, OPALESTATE_USER_PROFILE_PREFIX . 'google', true );
$instagram = get_post_meta( $user_id, OPALESTATE_USER_PROFILE_PREFIX . 'instagram', true );
$linkedIn = get_post_meta( $user_id, OPALESTATE_USER_PROFILE_PREFIX . 'linkedIn', true );
$job = get_post_meta( $user_id, OPALESTATE_USER_PROFILE_PREFIX . 'job', true );
$author_link = get_author_posts_url( $user_id );
}
?>
<article <?php post_class( 'agent-grid-style', $agent_id ? $agent_id : 0 ); ?>>
<div class="team-v1 agent-inner">
<header class="team-header agent-header">
<div class="agent-box-image">
<img src="<?php echo esc_url( $picture ); ?>" alt="user image">
</div>
<?php if ( $agent ) : ?>
<?php $agent->render_level(); ?>
<?php if ( $agent->is_featured() ): ?>
<span class="agent-featured" data-toggle="tooltip" data-placement="top" title="<?php esc_html_e( 'Featured Agent', 'opalestate-pro' ); ?>">
<span class="agent-label">
<span><?php esc_html_e( 'Featured', 'opalestate-pro' ); ?></span>
</span>
</span>
<?php endif; ?>
<?php if ( $agent->get_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; ?>
<?php endif; ?>
</header>
<div class="team-body agent-body">
<div class="team-body-content">
<h5 class="agent-box-title">
<a href="<?php echo esc_url( $author_link ); ?>"><?php echo esc_html( $title ); ?></a>
</h5><!-- /.agent-box-title -->
<?php if ( $title ) : ?>
<h3 class="team-name hide"><?php echo esc_html( $title ); ?></h3>
<?php endif; ?>
<?php if ( ! empty( $job ) ) : ?>
<p class="agent-job"><?php echo esc_html( $job ); ?></p>
<?php endif; ?>
</div>
<div class="agent-box-meta">
<?php if ( $agent ) : ?>
<?php $email = $agent->get_meta( 'email' ); ?>
<?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>
<?php endif; ?>
<?php $phone = $agent->get_meta( 'phone' ); ?>
<?php if ( ! empty( $phone ) ) : ?>
<div class="agent-box-phone">
<i class="fa fa-phone"></i>
<a href="tel:<?php echo sanitize_title( $phone ); ?>">
<span><?php echo esc_attr( $phone ); ?></span>
</a>
</div>
<?php endif; ?>
<?php $mobile = $agent->get_meta( 'mobile' ); ?>
<?php if ( ! empty( $mobile ) ) : ?>
<div class="agent-box-mobile">
<i class="fa fa-mobile"></i>
<a href="tel:<?php echo sanitize_title( $mobile ); ?>">
<span><?php echo esc_attr( $mobile ); ?></span>
</a>
</div>
<?php endif; ?>
<?php $fax = $agent->get_meta( 'fax' ); ?>
<?php if ( ! empty( $fax ) ) : ?>
<div class="agent-box-fax">
<i class="fa fa-fax"></i><span><?php echo esc_attr( $fax ); ?></span>
</div>
<?php endif; ?>
<?php $web = $agent->get_meta( 'web' ); ?>
<?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>
<?php endif; ?>
<?php endif; ?>
<div class="opalestate-social-icons">
<?php if ( $facebook && $facebook != "#" && ! empty( $facebook ) ) : ?>
<a class="opalestate-social-white radius-x opalestate-social-facebook" href="<?php echo esc_url( $facebook ); ?>"> <i class="fa fa-facebook"></i> </a>
<?php endif; ?>
<?php if ( $twitter && $twitter != "#" && ! empty( $twitter ) ) : ?>
<a class="opalestate-social-white radius-x opalestate-social-twitter" href="<?php echo esc_url( $twitter ); ?>"><i class="fa fa-twitter"></i> </a>
<?php endif; ?>
<?php if ( $pinterest && $pinterest != "#" && ! empty( $pinterest ) ) : ?>
<a class="opalestate-social-white radius-x opalestate-social-pinterest" href="<?php echo esc_url( $pinterest ); ?>"><i class="fa fa-pinterest"></i> </a>
<?php endif; ?>
<?php if ( $google && $google != "#" && ! empty( $google ) ) : ?>
<a class="opalestate-social-white radius-x opalestate-social-google" href="<?php echo esc_url( $google ); ?>"> <i class="fa fa-google"></i></a>
<?php endif; ?>
<?php if ( $instagram && $instagram != "#" && ! empty( $instagram ) ) : ?>
<a class="opalestate-social-white radius-x opalestate-social-instagram" href="<?php echo esc_url( $instagram ); ?>"> <i class="fa fa-instagram"></i></a>
<?php endif; ?>
<?php if ( $linkedIn && $linkedIn != "#" && ! empty( $linkedIn ) ) : ?>
<a class="opalestate-social-white radius-x opalestate-social-linkedIn" href="<?php echo esc_url( $linkedIn ); ?>"> <i class="fa fa-linkedIn"></i></a>
<?php endif; ?>
</div>
</div><!-- /.agent-box-content -->
</div>
</div>
</article>

View File

@@ -0,0 +1,59 @@
<?php
$settings = $this->get_settings_for_display();
$layout = $settings['item_layout'];
$attrs = $this->get_render_attribute_string( 'wrapper-style' );
if( isset($_GET['display']) && $_GET['display'] == 'grid' ){
$layout = 'grid';
}else if( isset($_GET['display']) && $_GET['display'] == 'list' ){
$layout = 'list';
$attrs = 'class="column-list"';
}
$onlyfeatured = 0;
if( isset($_GET['s_agents']) ) {
$query = Opalestate_Query::get_agencies( array("posts_per_page"=>$limit, 'paged' => $paged), $onlyfeatured );
} else {
$query = OpalEstate_Search::get_search_agencies_query();
}
$rowcls = apply_filters('opalestate_row_container_class', 'opal-row');
?>
<?php if( $settings['enable_sortable_bar'] ): ?>
<div class="opalesate-archive-top"><div class="<?php echo $rowcls;?>">
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="collection-counter">
<span><?php echo sprintf( esc_html__('Found %s Agency', 'opalestate-pro'), '<span class="text-primary">'.$query->found_posts.'</span>' ) ?></span>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-6 text-right">
<div class="opalestate-sortable">
<?php echo opalestate_render_sortable_dropdown(); ?>
</div>
<?php opalestate_show_display_modes(); ?>
</div>
</div></div>
<?php endif; ?>
<div class="agency-collection-wrap">
<?php if( $query->have_posts() ): ?>
<div class="agency-container">
<div <?php echo $attrs; ?>>
<?php $cnt=0; while( $query->have_posts() ): $query->the_post(); ?>
<div class="column-item ">
<?php echo opalestate_load_template_path( 'content-agency-'.$layout ); ?>
</div>
<?php endwhile; ?>
</div>
</div>
<?php if( $query->max_num_pages ): ?>
<div class="w-pagination">
<?php opalestate_pagination( $query->max_num_pages ); ?>
</div>
<?php endif; ?>
<?php else: ?>
<div class="agency-results">
<?php echo opalestate_load_template_path( 'content-no-results' ); ?>
</div>
<?php endif; ?>
</div>
<?php wp_reset_postdata(); ?>

View File

@@ -0,0 +1,62 @@
<?php
$settings = $this->get_settings_for_display();
$layout = $settings['item_layout'];
$attrs = $this->get_render_attribute_string( 'wrapper-style' );
if( isset($_GET['display']) && $_GET['display'] == 'grid' ){
$layout = 'grid';
}else if( isset($_GET['display']) && $_GET['display'] == 'list' ){
$layout = 'list';
$attrs = 'class="column-list"';
}
$onlyfeatured = 0 ;
if( isset($_GET['s_agents']) ) {
$query = Opalestate_Query::get_agents( array("posts_per_page"=>$limit, 'paged' => $paged), $onlyfeatured );
} else {
$query = OpalEstate_Search::get_search_agents_query();
}
$form = $settings['search_form'] ? "search-agents-form-".$settings['search_form']: "search-agents-form";
$rowcls = apply_filters('opalestate_row_container_class', 'opal-row');
?>
<?php if( $settings['enable_sortable_bar'] ): ?>
<div class="opalesate-archive-top"><div class="<?php echo esc_attr( $rowcls ); ?>">
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="collection-counter">
<span><?php echo sprintf( esc_html__('Found %s Agents', 'opalestate-pro'), '<span class="text-primary">'.$query->found_posts.'</span>' ) ?></span>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-6 text-right">
<div class="opalestate-sortable">
<?php echo opalestate_render_sortable_dropdown(); ?>
</div>
<?php opalestate_show_display_modes(); ?>
</div>
</div></div>
<?php endif; ?>
<div class="agents-collection-wrap">
<?php if( $query->have_posts() ): ?>
<div class="agents-container">
<div <?php echo $attrs; ?>>
<?php $cnt=0; while( $query->have_posts() ): $query->the_post(); ?>
<div class="column-item ">
<?php echo opalestate_load_template_path( 'content-agent-'.$layout ); ?>
</div>
<?php endwhile; ?>
</div>
</div>
<?php if( $query->max_num_pages ): ?>
<div class="w-pagination">
<?php opalestate_pagination( $query->max_num_pages ); ?>
</div>
<?php endif; ?>
<?php else: ?>
<div class="agents-results">
<?php echo opalestate_load_template_path( 'content-no-results' ); ?>
</div>
<?php endif; ?>
</div>
<?php wp_reset_postdata(); ?>

View File

@@ -0,0 +1,66 @@
<?php
$args = [
'number' => $settings['limit'],
'orderby' => $settings['orderby'],
'order' => $settings['order'],
];
if ( $settings['categories'] ) {
$args['slug'] = $settings['categories'];
}
$terms = Opalestate_Taxonomy_Categories::get_list( $args );
$attrs = $this->get_render_attribute_string( 'wrapper-style' );
?>
<div class="category-list-collection ">
<div <?php echo $attrs; ?>>
<?php foreach ( $terms as $category ): ?>
<?php
$tax_link = get_term_link( $category->term_id );
$image = wp_get_attachment_image_url( get_term_meta( $category->term_id, 'opalestate_category_image_id', true ), 'full' );
?>
<div class="column-item property-category ">
<a href="<?php echo esc_url( $tax_link ); ?>" class="category-overlay"></a>
<?php
$style = '';
if ( $image ) {
$style = 'style="background-image:url(' . esc_url( $image ) . ')"';
} else {
$style = 'style="background-image:url(' . opalestate_get_image_placeholder_src() . ')"';
}
?>
<div class="property-category-bg" <?php echo $style; ?>>
</div>
<div class="static-content">
<div class="property-category-info text-center">
<?php if ( $category->name ) : ?>
<h4 class="property-category-title">
<a href="<?php echo esc_url( $tax_link ); ?>"><?php echo esc_html( $category->name ); ?></a>
</h4>
<?php endif; ?>
<?php if ( $category->count ) : ?>
<div class="property-category-count">
<?php
printf(
/* translators: 1: number of properties */
_nx(
'%1$s Property',
'%1$s Properties',
$category->count,
'opalestate-pro'
),
number_format_i18n( $category->count )
);
?>
</div>
<?php endif; ?>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
</div>

View File

@@ -0,0 +1,66 @@
<?php
$args = [
'number' => $settings['limit'],
'orderby' => $settings['orderby'],
'order' => $settings['order'],
];
if ( $settings['categories'] ) {
$args['slug'] = $settings['categories'];
}
$terms = Opalestate_Taxonomy_City::get_list( $args );
$attrs = $this->get_render_attribute_string( 'wrapper-style' );
?>
<div class="city-list-collection ">
<div <?php echo $attrs; ?>>
<?php foreach ( $terms as $city ): ?>
<?php
$tax_link = get_term_link( $city->term_id );
$image = wp_get_attachment_image_url( get_term_meta( $city->term_id, 'opalestate_city_image_id', true ), 'full' );
?>
<div class="column-item property-city ">
<a href="<?php echo esc_url( $tax_link ); ?>" class="city-overlay"></a>
<?php
$style = '';
if ( $image ) {
$style = 'style="background-image:url(' . esc_url( $image ) . ')"';
} else {
$style = 'style="background-image:url(' . opalestate_get_image_placeholder_src() . ')"';
}
?>
<div class="property-city-bg" <?php echo $style; ?>>
</div>
<div class="static-content">
<div class="property-city-info text-center">
<?php if ( $city->name ) : ?>
<h4 class="property-city-title">
<a href="<?php echo esc_url( $tax_link ); ?>"><?php echo esc_html( $city->name ); ?></a>
</h4>
<?php endif; ?>
<?php if ( $city->count ) : ?>
<div class="property-city-count">
<?php
printf(
/* translators: 1: number of properties */
_nx(
'%1$s Property',
'%1$s Properties',
$city->count,
'opalestate-pro'
),
number_format_i18n( $city->count )
);
?>
</div>
<?php endif; ?>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
</div>

View File

@@ -0,0 +1,30 @@
<?php
/**
* The template for form builder.
*
* @version 1.0.0
*/
defined( 'ABSPATH' ) || exit;
?>
<form class="opalestate-search-form" action="<?php echo opalestate_get_search_link(); ?>" method="get">
<?php if ( isset( $settings['fields'] ) ) : ?>
<div class="opal-row">
<?php foreach ( $settings['fields'] as $field ): ?>
<?php if ( $field['field'] ): ?>
<div class="col-md-<?php echo $field['column']; ?> col-sm-12">
<?php echo opalestate_load_template_path( 'search-box/fields/' . $field['field'] ); ?>
</div>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php do_action( 'opalestate_after_search_properties_form' ); ?>
</form>
<?php if ( 0 ): ?>
<div class="opalesate-properties-ajax opalesate-properties-results" data-mode="html">
<?php echo opalestate_load_template_path( 'shortcodes/ajax-map-search-result' ); ?>
</div>
<?php endif; ?>

View File

@@ -0,0 +1,18 @@
<?php if( isset($settings['enable_static']) && $settings['enable_static'] ): ?>
<div class="opalestate-map-preview-wrap maps-container-fixed" >
<?php else : ?>
<div class="opalestate-map-preview-wrap" >
<?php endif; ?>
<div id="opalestate-map-preview" style="min-height:700px">
<div id="mapView">
<div class="mapPlaceholder"><!-- <span class="fa fa-spin fa-spinner"></span> <?php //esc_html_e( 'Loading map...', 'opalestate-pro' ); ?> -->
<div class="sk-folding-cube">
<div class="sk-cube1 sk-cube"></div>
<div class="sk-cube2 sk-cube"></div>
<div class="sk-cube4 sk-cube"></div>
<div class="sk-cube3 sk-cube"></div>
</div>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,34 @@
<?php
extract( $settings );
return;
?>
<?php if ( isset( $description ) ): ?>
<div class="search-agent-form-description"><?php echo $description; ?></div>
<?php endif; ?>
<?php if ( class_exists( "Opalestate_Template_Loader" ) ) : ?>
<div class="opalestate-search-tabs">
<ul class="nav nav-tabs tab-v8" role="tablist">
<li class="active">
<a aria-expanded="false" href="#search-agent" role="tab" class="tab-item">
<span><?php esc_html_e( 'Find An Agent', 'opalestate-pro' ); ?></span>
</a>
</li>
<li>
<a aria-expanded="true" href="#search-agency" role="tab" class="tab-item">
<span><?php esc_html_e( 'Find An Agency', 'opalestate-pro' ); ?></span>
</a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane fade out active in" id="search-agent">
<?php echo opalestate_load_template_path( 'parts/search-agents-form' ); ?>
</div>
<div class="tab-pane fade out" id="search-agency">
<?php echo opalestate_load_template_path( 'parts/search-agency-form' ); ?>
</div>
</div>
</div>
<?php endif; ?>

View File

@@ -0,0 +1,54 @@
<?php
$settings = array_merge( [
'limit' => 5,
'column' => 3,
'paged' => 1,
'showsortby' => false,
'style' => 'grid',
], $settings );
extract( $settings );
if ( is_front_page() ) {
$paged = ( get_query_var( 'page' ) ) ? get_query_var( 'page' ) : 1;
} else {
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
}
$args = [
'posts_per_page' => $posts_per_page,
'paged' => $paged,
'cities' => $cities,
'categories' => $categories,
'operator' => $cat_operator,
'types' => $types,
'statuses' => $statuses,
'showmode' => $showmode,
'labels' => $labels,
];
$query = Opalestate_Query::get_property_query( $args );
$class = 'column-item';
?>
<?php if ( isset( $showsortby ) && $showsortby ): ?>
<?php echo opalestate_load_template_path( 'collection-navigator', [ 'mode' => 'list' ] ); ?>
<?php endif; ?>
<div class="opalesate-property-collection">
<?php if ( $query->have_posts() ): ?>
<div <?php echo $this->get_render_attribute_string( 'wrapper-style' ); ?>>
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
<div class="column-item">
<?php echo opalestate_load_template_path( 'content-property-' . $style ); ?>
</div>
<?php endwhile; ?>
</div>
<?php if ( isset( $pagination ) && $pagination && ( ! isset( $enable_carousel ) || ! $enable_carousel ) ): ?>
<div class="w-pagination"><?php opalestate_pagination( $pagination_page_limit ); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo opalestate_load_template_path( 'content-no-results' ); ?>
<?php endif; ?>
</div>
<?php wp_reset_postdata(); ?>

View File

@@ -0,0 +1,11 @@
<?php
$settings = $this->get_settings_for_display();
$layout = $settings['item_layout'];
$form = $settings['search_form'] ? "search-agency-form-".$settings['search_form']: "search-agency-form";
?>
<div class="search-agency-form-wrap">
<?php echo opalestate_load_template_path( 'parts/'.$form, array('current_uri' => $settings['current_uri'] ) ); ?>
</div>

View File

@@ -0,0 +1,10 @@
<?php
$settings = $this->get_settings_for_display();
$layout = $settings['item_layout'];
$form = $settings['search_form'] ? "search-agents-form-".$settings['search_form']: "search-agents-form";
?>
<div class="search-agents-form-wrap">
<?php echo opalestate_load_template_path( 'parts/'.$form, array('current_uri' => $settings['current_uri'] ) ); ?>
</div>

View File

@@ -0,0 +1,14 @@
<?php
$display = array(
'style' => $settings['style'],
'column' => $settings['column']
);
// echo time().'<pre> ha congtein' . print_r( $display ,1 ).'</pre>';
?>
<div class="opalesate-properties-ajax opalesate-properties-results" data-mode="html">
<?php echo opalestate_load_template_path( 'shortcodes/ajax-map-search-result' , $display ); ?>
</div>

View File

@@ -0,0 +1,9 @@
<?php
if ( ! class_exists( 'OpalEstate_Search' ) ) {
return;
}
?>
<div class="search-properies-form">
<?php echo opalestate_load_template_path( 'search-box/'.$settings['style'] , $settings ); ?>
</div>

View File

@@ -0,0 +1,37 @@
<?php
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
$rowcls = apply_filters( 'opalestate_row_container_class', 'opal-row' );
?>
<div class="ajax-map-search-split full-width">
<div class="inner">
<div class="<?php echo esc_attr( $rowcls ); ?>">
<div class="col-lg-6 col-md-12 col-sm-12 split-maps-container">
<div id="opalestate-map-preview" style="height:800px;" data-page="<?php echo esc_attr( $paged ); ?>">
<div id="mapView">
<div class="mapPlaceholder"><span class="fa fa-spin fa-spinner"></span> <?php esc_html_e( 'Loading map...', 'opalestate-pro' ); ?>
<div class="sk-folding-cube">
<div class="sk-cube1 sk-cube"></div>
<div class="sk-cube2 sk-cube"></div>
<div class="sk-cube4 sk-cube"></div>
<div class="sk-cube3 sk-cube"></div>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-6 col-md-12 col-sm-12 pull-right">
<div class="split-search-container">
<div class="ajax-search-form">
<?php echo opalestate_load_template_path( 'search-box/' . $settings['search_form'], [ 'nobutton' => true ] ); ?>
</div>
<div class="opalesate-properties-ajax opalesate-properties-results" data-mode="html">
<?php echo opalestate_load_template_path( 'shortcodes/ajax-map-search-result', [ 'column' => 2 ] ); ?>
</div>
</div>
</div>
</div>
</div>
</div>

11
templates/emails/contact.php Executable file
View File

@@ -0,0 +1,11 @@
Hi {receiver_name},<br>
You have got message from {name} with email {email} and phone number {phone}
<br>
<br>Here is detail:
<br>
<br>
{message}
<br>
&nbsp;<br>
<br>
<em>This message was sent by {site_link} on {current_time}.</em>

12
templates/emails/enquiry.php Executable file
View File

@@ -0,0 +1,12 @@
Hi {receiver_name},<br>
You have got message from {name} with email {email} and phone number {phone}
<br>
At Property {property_link}
<br>Here is detail:
<br>
<br>
{message}
<br>
&nbsp;<br>
<br>
<em>This message was sent by {site_link} on {current_time}.</em>

View File

@@ -0,0 +1,15 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
Hi <?php echo $user->first_name . ' ' . $user->last_name; ?>,
Your property have published.
<br>
<?php $permalink = get_permalink( $post->ID ); ?>
<?php if ( ! empty( $permalink ) ) : ?>
<strong><?php echo esc_html__( 'URL', 'opalestate-pro' ); ?>: </strong> <?php echo esc_attr( $permalink ); ?><br>
<?php endif; ?>

View File

@@ -0,0 +1,15 @@
Hi {receiver_name},<br>
You have got message request reviewing from {name} with email {email} and phone number {phone}
<br>
At Property {property_name} ( {property_link} )
<br>Here is detail:
<br>
<br>
Schedule Date At: {schedule_time} - {schedule_date}
<br>
{message}
<br>
&nbsp;<br>
<br>
<em>This message was sent by {site_link} on {current_time}.</em>

47
templates/fullwidth-page.php Executable file
View File

@@ -0,0 +1,47 @@
<?php
/**
* Template Name: Full Width Page
*
* Template for displaying a page without sidebar even if a sidebar widget is published.
*
* @package wpopalbootstrap
*/
if (!defined('ABSPATH')) {
exit; // Exit if accessed directly.
}
get_header();
?>
<div class="wrapper" id="full-width-page-wrapper">
<div class="container-full" id="content">
<div class="opal-row">
<div class="wp-col-md-12 content-area" id="primary">
<div class="site-main" id="main" role="main">
<?php while (have_posts()) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry-content">
<?php
the_content();
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>',
'pagelink' => '<span class="screen-reader-text">' . esc_html__( 'Page', 'opalestate-pro' ) . ' </span>%',
'separator' => '<span class="screen-reader-text">, </span>',
)
);
?>
</div><!-- .entry-content -->
</article><!-- #post-<?php the_ID(); ?> -->
<?php endwhile; // end of the loop. ?>
</div><!-- #main -->
</div><!-- #primary -->
</div><!-- .row end -->
</div><!-- Container end -->
</div><!-- Wrapper end -->
<?php get_footer(); ?>

View File

@@ -0,0 +1,44 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if( !isset($type) ){
$type = 'property';
}
if( !isset($heading) ){
$heading = esc_html__( 'Contact Me', 'opalestate-pro' );
}
$object = OpalEstate_User_Message::get_instance();
$fields = $object->get_contact_form_fields();
$form = OpalEstate()->html->render_form( $fields );
$id = 'send-contact-form'
?>
<?php if ( ! empty( $email ) ) : ?>
<div class="contact-form-container">
<h5 class="contact-form-title"><?php echo $heading; ?></h5>
<div class="property-equire-form-container">
<div class="box-content">
<form method="post" class="opalestate-message-form">
<?php do_action('opalestate_message_form_before'); ?>
<?php echo $form;?>
<?php do_action( 'opalestate_message_form_after' ); ?>
<?php wp_nonce_field( $id, 'message_action' ); ?>
<button class="button btn btn-primary btn-3d" data-loading-text="<i class='fa fa-circle-o-notch fa-spin'></i> <?php esc_html_e( ' Processing', 'opalestate-pro' ); ?>" type="submit" name="contact-form"><?php echo esc_html__( 'Send message', 'opalestate-pro' ); ?></button>
</form>
</div><!-- /.agent-contact-form -->
</div><!-- /.agent-contact-->
</div><!-- /.agent-contact-->
<?php endif; ?>

View File

@@ -0,0 +1,45 @@
<?php
global $post;
$message = sprintf(__('Hi, I am interested in %s (Property ID: %s)', 'opalestate-pro'), get_the_title() , get_the_ID() );
$property_id = get_the_ID();
$heading = esc_html__( 'Enquire about property', 'opalestate-pro' );
$object = OpalEstate_User_Message::get_instance();
$fields = $object->get_equiry_form_fields( $message );
$form = OpalEstate()->html->render_form( $fields );
$id = 'send-enquiry-form';
?>
<?php if( isset($nowrap) && $nowrap ) : ?>
<form method="post" class="opalestate-message-form">
<?php do_action('opalestate_message_form_before'); ?>
<?php echo $form;?>
<?php do_action( 'opalestate_message_form_after' ); ?>
<?php wp_nonce_field( $id, 'message_action' ); ?>
<button class="button btn btn-primary btn-3d" data-loading-text="<i class='fa fa-circle-o-notch fa-spin'></i> <?php esc_html_e( ' Processing', 'opalestate-pro' ); ?>" type="submit" name="contact-form"><?php echo esc_html__( 'Send message', 'opalestate-pro' ); ?></button>
</form>
<?php else : ?>
<div class="opalestate-box-content property-equire-form">
<div class="opalestate-box">
<div class="property-equire-form-container">
<h5 class="contact-form-title"><?php echo $heading; ?></h5>
<div class="box-content">
<form method="post" class="opalestate-message-form">
<?php do_action('opalestate_message_form_before'); ?>
<?php echo $form;?>
<?php do_action( 'opalestate_message_form_after' ); ?>
<?php wp_nonce_field( $id, 'message_action' ); ?>
<button class="button btn btn-primary btn-3d" data-loading-text="<i class='fa fa-circle-o-notch fa-spin'></i> <?php esc_html_e( ' Processing', 'opalestate-pro' ); ?>" type="submit" name="contact-form"><?php echo esc_html__( 'Send message', 'opalestate-pro' ); ?></button>
</form>
</div><!-- /.agent-contact-form -->
</div><!-- /.agent-contact-->
</div>
</div>
<?php endif; ?>

View File

@@ -0,0 +1,14 @@
<div id="<?php echo $id; ?>-popup" class="white-popup mfp-hide opalestate-mfp-popup">
<h4><?php echo $heading; ?></h4>
<p class="opalestate-note"><?php echo $description; ?></p>
<?php echo '<form action="//' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . '" class="opalestate-message-form" method="post" id="'.$id.'" enctype="multipart/form-data" data-action="send_email_request_reviewing">'; ?>
<?php do_action( 'opalestate_message_form_before' ); ?>
<?php echo $form; ?>
<?php wp_nonce_field( $id, 'message_action' ); ?>
<?php do_action( 'opalestate_message_form_after' ); ?>
<button type="submit" name="submit" value="<?php esc_html_e( 'Send now', 'opalestate-pro' ); ?>" class="btn btn-primary">
<?php esc_html_e( 'Send now', 'opalestate-pro' ); ?>
</button>
<?php echo '</form>'; ?>
</div>

27
templates/notices/error.php Executable file
View File

@@ -0,0 +1,27 @@
<?php
/**
* $Desc$
*
* @version $Id$
* @package opalestate
* @author Opal Team <info@wpopal.com >
* @copyright Copyright (C) 2016 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/support/forum.html
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
if ( ! $messages ) return;
?>
<ul class="opalestate-notice opalestate-notice-error">
<?php foreach ( $messages as $message ) : ?>
<li>
<?php printf( '%s', $message ) ?>
</li>
<?php endforeach; ?>
</ul>

24
templates/notices/success.php Executable file
View File

@@ -0,0 +1,24 @@
<?php
/**
* $Desc$
*
* @version $Id$
* @package opalestate
* @author Opal Team <info@wpopal.com >
* @copyright Copyright (C) 2016 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/support/forum.html
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
if ( ! $messages ) return;
foreach ( $messages as $message ) : ?>
<div class="opalestate-notice opalestate-notice-success">
<?php printf( '%s', $message ) ?>
</div>
<?php endforeach; ?>

24
templates/notices/warning.php Executable file
View File

@@ -0,0 +1,24 @@
<?php
/**
* $Desc$
*
* @version $Id$
* @package opalestate
* @author Opal Team <info@wpopal.com >
* @copyright Copyright (C) 2016 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/support/forum.html
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
if ( ! $messages ) return;
?>
<?php foreach ( $messages as $message ) : ?>
<div class="opalestate-notice opalestate-notice-warning alert alert-warning">
<?php printf( '%s', $message ) ?>
</div>
<?php endforeach; ?>

View File

@@ -0,0 +1,12 @@
<?php
$layout = 'collapse-city';
$settings = array();
?>
<div class="opalestate-archive-search-block">
<div class="container">
<div class="search-properies-form">
<?php echo opalestate_load_template_path( 'search-box/'.$layout , $settings ); ?>
</div>
</div>
</div>

View File

@@ -0,0 +1,17 @@
<?php global $wp_query; ?>
<div class="opalesate-archive-top"><div class="<?php echo apply_filters('opalestate_row_container_class', 'opal-row');?>">
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="opalestate-results">
<?php if( $wp_query->found_posts ): ?>
<span><?php echo sprintf( esc_html__( 'Found %s Properties', 'opalestate-pro' ) , $wp_query->found_posts ); ?></span>
<?php endif; ?>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-6 text-right">
<div class="opalestate-sortable">
<?php echo opalestate_render_sortable_dropdown(); ?>
</div>
<?php opalestate_show_display_modes(); ?>
</div>
</div></div>

View File

@@ -0,0 +1,29 @@
<?php
$selected = '';
$mode = isset($mode)?$mode:'';
?>
<div class="opalesate-archive-top">
<div class="<?php echo apply_filters('opalestate_row_container_class', 'opal-row');?>">
<div class="col-lg-8 col-md-7 col-sm-6">
<?php opalestate_show_display_status();
?>
</div>
<div class="col-lg-4 col-md-5 col-sm-6 space-margin-top-10p">
<div class="opalestate-sortable pull-right">
<?php echo opalestate_render_sortable_dropdown( $selected ); ?>
</div>
<div class="pull-right">
<?php opalestate_show_display_modes( $mode ); ?>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,9 @@
<?php
global $property;
if ( ! $property->is_featured() ) {
return;
}
?>
<span class="label-featured label"><?php esc_html_e( 'Featured', 'opalestate-pro' ); ?></span>

View File

@@ -0,0 +1,5 @@
<div class="opal-has-warning">
<p class="warning warning-danger">
<?php esc_html_e( 'Hi! you could not edit/create a property at this time, you have not permission to do.', 'opalestate-pro' ); ?>
<p>
</div>

View File

@@ -0,0 +1,27 @@
<?php
$package_id = get_the_ID();
$pack_listings = get_post_meta( $package_id, OPALMEMBERSHIP_PACKAGES_PREFIX.'package_listings', true );
$pack_featured_listings = get_post_meta( $package_id, OPALMEMBERSHIP_PACKAGES_PREFIX.'package_featured_listings', true );
$pack_unlimited_listings = get_post_meta( $package_id, OPALMEMBERSHIP_PACKAGES_PREFIX.'unlimited_listings', true );
$unlimited_listings = $pack_unlimited_listings == 'on' ? 0 : 1;
?>
<div class="pricing-more-info">
<div class="item-info">
<span>
<?php if( !empty($pack_listings) && $unlimited_listings == 0 ): ?>
<?php echo trim( $pack_listings); ?><?php esc_html_e( ' Listings' , 'opalestate-pro' );?>
<?php else: ?>
<?php esc_html_e('Unlimited', 'opalestate-pro');?><?php esc_html_e( ' Listings' , 'opalestate-pro' );?>
<?php endif; ?>
</span>
</div>
<div class="item-info">
<span>
<?php if( !empty($pack_featured_listings) && $unlimited_listings == 0 ): ?>
<?php echo trim( $pack_featured_listings); ?><?php esc_html_e( ' Featured' , 'opalestate-pro' );?>
<?php else: ?>
<?php esc_html_e('Unlimited', 'opalestate-pro');?><?php esc_html_e( ' Featured' , 'opalestate-pro' );?>
<?php endif; ?>
</span>
</div>
</div>

View File

@@ -0,0 +1,6 @@
<?php if( !opalesate_check_has_add_listing( $user_id ) ): ?>
<div class="alert alert-warning">
<p><?php esc_html_e( 'Your package has 0 left listing, you could not add any more. Please upgrade now', 'opalestate-pro' );?></p>
<p><a href="<?php echo opalmembership_get_membership_page_uri();?>" class="btn btn-primary"><?php esc_html_e( 'Click to this link to see plans', 'opalestate-pro' );?></a></p>
</div>
<?php endif; ?>

View File

@@ -0,0 +1,39 @@
<?php
$_id = 'posts-block-' . rand( 1, 9 );
$item = apply_filters( 'opalesate_carousel_property_column', 3, isset( $args ) ? $args : [] );
$data = [
'slidesPerView' => $item,
'spaceBetween' => 30,
'slidesPerGroup' => $item,
'loop' => false,
];
$template_style = isset( $args['style'] ) && $args['style'] ? sanitize_text_field( $args['style'] ) : 'content-property-grid';
?>
<div class="opalestate-box-content opalesate-related-properties">
<h4 class="outbox-title"><?php echo esc_html( $heading ); ?></h4>
<div class="opalesate-archive-bottom opalestate-rows">
<?php if ( $query->have_posts() ) : ?>
<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
$column = isset( $column ) ? $column : apply_filters( 'opalestate_properties_column_row', 3 );
$clscol = floor( 12 / $column );
while ( $query->have_posts() ) : $query->the_post(); ?>
<div class="swiper-slide">
<?php echo opalestate_load_template_path( $template_style, null, $style ); ?>
</div>
<?php endwhile; ?>
</div>
<?php if ( absint( $query->post_count ) > absint( $item ) ) : ?>
<div class="swiper-pagination"></div>
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
<?php endif; ?>
</div>
<?php else: ?>
<?php echo opalestate_load_template_path( 'content-no-results' ); ?>
<?php endif; ?>
</div>
</div>

View File

@@ -0,0 +1,180 @@
<?php
/**
* Mortgage widget template.
*
* @version 1.0.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
global $property;
$currency = opalestate_currency_symbol();
wp_enqueue_script( 'opalestate-mortgage-calculator', OPALESTATE_PLUGIN_URL . 'assets/js/mortgage.js', [ 'jquery' ], OPALESTATE_VERSION, true );
wp_enqueue_style( 'opalestate-mortgage-calculator', OPALESTATE_PLUGIN_URL . 'assets/mortgage.css', [], OPALESTATE_VERSION );
wp_localize_script( 'opalestate-scripts', 'opalestate_mortgage',
[
'ajax_url' => admin_url( 'admin-ajax.php' ),
'currency' => esc_attr__( $currency ),
'loan_amount_text' => esc_html__( 'Loan Amount', 'opalestate-pro' ),
'your_payment_text' => esc_html__( 'Your payment', 'opalestate-pro' ),
]
);
$max_price = intval( $property && $property->get_price() ) ? $property->get_price() : opalestate_options( 'search_max_price', 10000000 );
$max_price = str_replace( ",", "", $max_price );
$max_price = str_replace( ".", "", $max_price );
$start_price = $max_price;
$max_price = $max_price + ( $max_price * 20 / 100 );
$rate_start = 10;
$interest_rate_start = $rate_start / 100;
$years_start = 2;
$deposit_start = $max_price / 2;
$loan_amount = $max_price - $deposit_start;
$interest_rate_month = $interest_rate_start / 12;
$number_of_payments_month = $years_start * 12;
$monthly = round( ( $loan_amount * $interest_rate_month ) / ( 1 - pow( 1 + $interest_rate_month, -$number_of_payments_month ) ), 2 );
$total = $deposit_start + ( $monthly * $number_of_payments_month );
$price_percent = $loan_amount / $total * 100;
$deposit_percent = $deposit_start / $total * 100;
$deposit_color = apply_filters( 'opalestate_deposit_color', '#2f73e9' );
$data_sale_price = [
'id' => 'sale_price',
'decimals' => opalestate_get_price_decimals(),
'unit' => $currency,
'ranger_min' => 0,
'ranger_max' => $max_price,
'input_min' => 0,
'input_max' => $max_price,
'mode' => 1,
'start' => $start_price,
];
$data_deposit = [
'id' => 'deposit',
'decimals' => opalestate_get_price_decimals(),
'unit' => $currency,
'ranger_min' => 0,
'ranger_max' => $max_price,
'input_min' => 0,
'input_max' => $max_price,
'mode' => 1,
'start' => $deposit_start,
];
$data_interest_rate = [
'id' => 'interest_rate',
'unit' => '%',
'ranger_min' => 0,
'ranger_max' => 100,
'input_min' => 0,
'input_max' => 100,
'mode' => 1,
'start' => $rate_start,
];
$data_years = [
'id' => 'years',
'ranger_min' => 0,
'ranger_max' => 30,
'input_min' => 0,
'input_max' => 30,
'mode' => 1,
'start' => $years_start,
];
if ( opalestate_options( 'currency_position', 'before' ) == 'before' ) {
$data_sale_price['unit_position'] = 'prefix';
$data_deposit['unit_position'] = 'prefix';
}
?>
<div class="opalestate-box-content box-mortgage">
<h4 class="outbox-title"><?php esc_html_e( 'Mortgage Payment Calculator', 'opalestate-pro' ); ?></h4>
<div class="opalestate-box">
<div class="opalestate-mortgage-widget-wrap">
<form class="opalestate-mortgage-form">
<div class="opalestate-mortgage-chart-container">
<div class="opalestate-mortgage-chart">
<div class="opalestate-mortgage-chart-svg">
<svg viewBox="0 0 64 64" class="pie">
<circle r="25%" cx="50%" cy="50%" style="stroke-dasharray: <?php echo esc_attr( $price_percent ); ?> 100">
</circle>
<circle r="25%" cx="50%" cy="50%" style="stroke-dasharray: <?php echo esc_attr( $deposit_percent ); ?> 100; stroke: <?php echo esc_attr( $deposit_color ); ?>; stroke-dashoffset:
-<?php echo esc_attr( $price_percent ); ?>; animation-delay: 0.25s">
</circle>
</svg>
</div>
</div>
<div class="opalestate-mortgage-chart-desc">
<div class="opalestate-mortgage-chart-results">
<div class="opalestate-mortgage-output">
<div class='opalestate-mortgage-output-item opalestate-monthly'>
<label> <?php esc_html_e( 'Your payment', 'opalestate-pro' ); ?></label>
<span class="opalestate-monthly-value">
<?php echo esc_html( $currency ); ?><?php echo esc_html( $monthly ); ?>
</span> /
<small><?php esc_html_e( 'month', 'opalestate-pro' ); ?></small>
</div>
<div class='opalestate-mortgage-output-item opalestate-loan-amount'>
<label><?php esc_html_e( 'Loan Amount', 'opalestate-pro' ); ?></label>
<span class="opalestate-loan-amount-value">
<?php echo esc_html( $currency ); ?><?php echo esc_html( $loan_amount ); ?>
</span>
</div>
<div class="opalestate-mortgage-chart-notice">
<ul>
<li><span style="background-color:#02ce76;"></span><?php esc_html_e( 'Your price', 'opalestate-pro' ); ?></li>
<li><span style="background-color:<?php echo esc_attr( $deposit_color ); ?>;"></span><?php esc_html_e( 'Your deposit', 'opalestate-pro' ); ?></li>
<li><span style="background-color:#f06;"></span><?php esc_html_e( 'Your interest', 'opalestate-pro' ); ?></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="opalestate-mortgage-form-inputs">
<div class="form-group opalestate-mortgage-item">
<div class="opalestate-mortgage-label">
<?php opalesate_property_slide_ranger_template( esc_html__( 'Sale Price', 'opalestate-pro' ), $data_sale_price ); ?>
</div>
</div>
<div class="form-group opalestate-mortgage-item">
<div class="opalestate-mortgage-label">
<?php opalesate_property_slide_ranger_template( esc_html__( 'Deposit', 'opalestate-pro' ), $data_deposit ); ?>
</div>
</div>
<div class="form-group opalestate-mortgage-item">
<div class="opalestate-mortgage-label">
<?php opalesate_property_slide_ranger_template( esc_html__( 'Annual Interest', 'opalestate-pro' ), $data_interest_rate ); ?>
</div>
</div>
<div class="form-group opalestate-mortgage-item">
<div class="opalestate-mortgage-label">
<?php opalesate_property_slide_ranger_template( esc_html__( 'Years', 'opalestate-pro' ), $data_years ); ?>
</div>
</div>
<div class="mortgage-notes">
<span><?php esc_html_e( 'All calculation are based on tentative and estimated figure and shall not replace any financial advice', 'opalestate-pro' ); ?></span>
</div>
</div>
</form>
</div>
</div>
</div>

View File

@@ -0,0 +1,9 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<div class="alert alert-warning">
<?php echo esc_html__( 'You are not allowed to access this page.', 'opalestate-pro' ); ?>
</div>

23
templates/parts/pagination.php Executable file
View File

@@ -0,0 +1,23 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
global $wp_query;
if ( $wp_query->max_num_pages <= 1 ) {
return;
}
$args = apply_filters( 'opalestate_pagination_args', [
'prev_text' => __( '&laquo;' ),
'next_text' => __( '&raquo;' ),
'type' => 'list',
] );
?>
<nav class="opalestate-pagination">
<?php print paginate_links( $args ); // WPCS: xss ok. ?>
</nav>

View File

@@ -0,0 +1,6 @@
<?php
global $property;
echo get_the_term_list( $property->get_id(), 'property_category', '<div class="property-categories-list"><span class="property-categories-list__label">' . esc_html__( 'Categories:', 'opalestate-pro'
) .
'</span>', ', ', '</div>' );

View File

@@ -0,0 +1,19 @@
<?php
global $property;
opalestate_property_featured_label();
$labels = $property->get_labels();
if ( is_wp_error( $labels ) || ! $labels ) {
return;
}
?>
<ul class="property-label">
<?php foreach ( $labels as $key => $value ) : ?>
<li class="property-label-item property-label-<?php echo esc_attr( $value->slug ); ?>">
<span class="label-label label"><?php echo esc_html( $value->name ); ?></span>
</li>
<?php endforeach; ?>
</ul>

View File

@@ -0,0 +1,36 @@
<?php
/**
* Price HTML.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
global $property;
?>
<div class="property-price">
<?php if ( 'on' == $property->get_price_oncall() ): ?>
<div class="call-to-price"><?php esc_html_e( 'Call to Price', 'opalestate-pro' ); ?></div>
<?php elseif ( $property->get_price() ): ?>
<?php if ( $property->get_before_price_label() ): ?>
<span class="property-before-price-label"><?php echo esc_html( $property->get_before_price_label() ); ?></span>
<?php endif; ?>
<?php if ( $property->get_sale_price() ): ?>
<span class="property-regular-price has-saleprice">
<del><?php echo opalestate_price_format( $property->get_price() ); ?></del>
</span>
<span class="property-saleprice"><?php echo opalestate_price_format( $property->get_sale_price() ); ?></span>
<?php else : ?>
<span class="property-regular-price"><?php echo opalestate_price_format( $property->get_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; ?>
<?php else: ?>
<div class="property-no-price"><?php esc_html_e( 'Contact Property', 'opalestate-pro' ); ?></div>
<?php endif; ?>
</div>

View File

@@ -0,0 +1,33 @@
<?php
/**
* Short meta HTML.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
global $property;
$meta_content = apply_filters( 'opalestate_loop_meta_info', '' );
if ( empty( $meta_content ) ) {
$meta = $property->get_meta_shortinfo();
?>
<div class="property-meta">
<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 ); ?>" title="<?php echo esc_attr( $info['label'] ); ?>">
<span class="hint--top" aria-label="<?php echo esc_attr( $info['label'] ); ?>" title="<?php echo esc_attr( $info['label'] ); ?>"><i class="icon-property-<?php echo esc_attr( $key ); ?>"></i></span>
<span class="label-property"><?php echo esc_html( $info['label'] ); ?></span>
<span class="label-content"><?php echo apply_filters( 'opalestate-pro' . $key . '_unit_format', trim( $info['value'] ) ); ?></span>
</li>
<?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>
</ul>
</div>
<?php
} else {
echo wp_kses_post( $meta_content );
}

View File

@@ -0,0 +1,16 @@
<?php
global $property;
$statuses = $property->get_status();
if ( is_wp_error( $statuses ) || ! $statuses ) {
return;
}
?>
<ul class="property-status">
<?php foreach ( $statuses as $key => $value ) : ?>
<li class="property-status-item property-status-<?php echo esc_attr( $value->slug ); ?>">
<span class="label-status label"><?php echo esc_html( $value->name ); ?></span>
</li>
<?php endforeach; ?>
</ul>

View File

@@ -0,0 +1,5 @@
<?php
global $property;
echo get_the_term_list( $property->get_id(), 'opalestate_types', '<div class="property-types-list"><span class="property-types-list__label">' . esc_html__( 'Types:', 'opalestate-pro' ) . '</span>',
', ', '</div>' );

View File

@@ -0,0 +1,44 @@
<?php
$fields = OpalEstate_Search::get_setting_search_fields();
$stypes = isset($_GET['types'])? sanitize_text_field( $_GET['types'] ) : -1;
if( isset($current_uri) && $current_uri == true ) {
$uri = opalestate_get_current_uri();
} else {
$uri = opalestate_search_agent_uri();
}
?>
<form id="opalestate-search-agency-form" class="opalestate-search-agency-form opalestate-search-form" action="<?php echo esc_attr( $uri ); ?>" method="get">
<div class="<?php echo apply_filters('opalestate_row_container_class', 'opal-row');?>">
<div class="col-lg-6 col-md-6 col-sm-12">
<p class="search-agent-title"><?php esc_html_e( 'Find an experienced agent with:' ,'opalestate-pro'); ?></p>
</div>
<div class="col-lg-6 col-md-6 hidden-sm hidden-xs">
<p class="search-agent-title hide"><?php esc_html_e( 'Who sale between:' ,'opalestate-pro'); ?></p>
</div>
</div>
<div class="<?php echo apply_filters('opalestate_row_container_class', 'opal-row');?>">
<div class="col-lg-7 col-md-3 col-sm-7">
<?php echo opalestate_load_template_path( 'search-box/fields/search-city-text' ); ?>
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
<?php Opalestate_Taxonomy_Type::dropdown_list( $stypes ); ?>
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<input type="hidden" name="s_agency" value="1">
<button type="submit" class="btn btn-secondary btn-block btn-search btn-3d">
<i class="fa fa-search"></i>
<span><?php esc_html_e('Search','opalestate-pro'); ?></span>
</button>
</div>
</div>
</form>

View File

@@ -0,0 +1,32 @@
<?php
$fields = OpalEstate_Search::get_setting_search_fields();
$slocation = isset($_GET['location'])? sanitize_text_field( $_GET['location'] ): opalestate_get_session_location_val();
$search_text = isset($_GET['search_text'])? sanitize_text_field( $_GET['search_text'] ):'';
if( isset($current_uri) && $current_uri == true ) {
$uri = opalestate_get_current_uri();
} else {
$uri = opalestate_search_agency_uri();
}
?>
<form id="opalestate-search-agency-form" class="opalestate-search-agency-form opalestate-search-form" action="<?php echo esc_url( $uri ); ?>" method="get">
<div class="<?php echo apply_filters('opalestate_row_container_class', 'opal-row');?>">
<div class="col-lg-4 col-md-4 col-sm-4">
<?php Opalestate_Taxonomy_Location::dropdown_list( $slocation );?>
</div>
<div class="col-lg-6 col-md-6 col-sm-6">
<label class="opalestate-label opalestate-label--geo-location"><?php esc_html_e( 'Agency', 'opalestate-pro' ); ?></label>
<input name="search_text" value="<?php echo esc_attr($search_text); ?>" maxlength="40" class="form-control input-large input-search" size="20" placeholder="<?php esc_html_e( 'Enter Agency Name', 'opalestate-pro' ); ?>" type="text">
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<input type="hidden" name="s_agency" value="1">
<button type="submit" class="btn btn-secondary btn-block btn-search btn-3d">
<i class="fa fa-search"></i>
<span><?php esc_html_e('Search','opalestate-pro'); ?></span>
</button>
</div>
</div>
</form>

View File

@@ -0,0 +1,40 @@
<?php
$stypes = isset($_GET['types'])? sanitize_text_field( $_GET['types'] ):-1;
if( isset($current_uri) && $current_uri == true ) {
$uri = opalestate_get_current_uri();
} else {
$uri = opalestate_search_agent_uri();
}
?>
<form id="opalestate-search-agents-form" class="opalestate-search-agents-form opalestate-search-form" action="<?php echo esc_url( $uri ); ?>" method="get">
<div class="<?php echo apply_filters('opalestate_row_container_class', 'opal-row');?>">
<div class="col-lg-6 col-md-6 col-sm-12">
<p class="search-agent-title"><?php esc_html_e( 'Find an experienced agent with:' ,'opalestate-pro'); ?></p>
</div>
<div class="col-lg-6 col-md-6 hidden-sm hidden-xs">
<p class="search-agent-title hide"><?php esc_html_e( 'Who sale between:' ,'opalestate-pro'); ?></p>
</div>
</div>
<div class="<?php echo apply_filters('opalestate_row_container_class', 'opal-row');?>">
<div class="col-lg-7 col-md-3 col-sm-7">
<?php echo opalestate_load_template_path( 'search-box/fields/search-city-text' ); ?>
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
<?php Opalestate_Taxonomy_Type::dropdown_list( $stypes ); ?>
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<input type="hidden" name="s_agents" value="1">
<button type="submit" class="btn btn-secondary btn-block btn-search btn-3d">
<i class="fa fa-search"></i>
<span><?php esc_html_e('Search','opalestate-pro'); ?></span>
</button>
</div>
</div>
</form>

View File

@@ -0,0 +1,59 @@
<?php
$fields = OpalEstate_Search::get_setting_search_fields();
$slocation = isset($_GET['location'])?$_GET['location']: opalestate_get_session_location_val();
$stypes = isset($_GET['types'])?$_GET['types']:-1;
$sstatus = isset($_GET['status'])?$_GET['status']:-1;
$search_min_price = isset($_GET['min_price']) ? $_GET['min_price'] : opalestate_options( 'search_agent_min_price',0 );
$search_max_price = isset($_GET['max_price']) ? $_GET['max_price'] : opalestate_options( 'search_agent_max_price',10000000 );
if( isset($current_uri) && $current_uri == true ) {
$uri = opalestate_get_current_uri();
} else {
$uri = opalestate_search_agent_uri();
}
?>
<form id="opalestate-search-agents-form" class="opalestate-search-agents-form opalestate-search-form" action="<?php echo esc_url( $uri ); ?>" method="get">
<div class="<?php echo apply_filters('opalestate_row_container_class', 'opal-row');?>">
<div class="col-lg-6 col-md-6 col-sm-12">
<p class="search-agent-title"><?php esc_html_e( 'Find an experienced agent with:' ,'opalestate-pro'); ?></p>
</div>
<div class="col-lg-6 col-md-6 hidden-sm hidden-xs">
<p class="search-agent-title hide"><?php esc_html_e( 'Who sale between:' ,'opalestate-pro'); ?></p>
</div>
</div>
<div class="<?php echo apply_filters('opalestate_row_container_class', 'opal-row');?>">
<div class="col-lg-3 col-md-3 col-sm-3">
<?php Opalestate_Taxonomy_Location::dropdown_list( $slocation );?>
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
<?php Opalestate_Taxonomy_Type::dropdown_list( $stypes ); ?>
</div>
<div class="col-lg-4 col-md-4 col-sm-4">
<?php
$data = array(
'id' => 'price',
'unit' => '$ ',
'ranger_min' => opalestate_options( 'search_agent_min_price',0 ),
'ranger_max' => opalestate_options( 'search_agent_max_price',10000000 ),
'input_min' => $search_min_price,
'input_max' => $search_max_price
);
opalesate_property_slide_ranger_template( esc_html__("Price:",'opalestate-pro'), $data );
?>
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<input type="hidden" name="s_agents" value="1">
<button type="submit" class="btn btn-secondary btn-block btn-search btn-3d">
<i class="fa fa-search"></i>
<span><?php esc_html_e('Search','opalestate-pro'); ?></span>
</button>
</div>
</div>
</form>

View File

@@ -0,0 +1,294 @@
<?php
/**
* Display single reviews (comments)
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
if ( ! comments_open() ) {
return;
}
$post_id = get_the_ID();
$post_type = get_post_type( $post_id );
$supports = Opalestate_Rating::get_rating_supports();
if ( ! isset( $supports[ $post_type ] ) ) {
return;
}
switch ( $supports[ $post_type ]['post_type'] ) {
case 'opalestate_property':
global $property;
$object = $property;
break;
case 'opalestate_agency':
global $agency;
$object = $agency;
break;
case 'opalestate_agent':
global $agent;
$object = $agent;
break;
}
$cpt_feature = $supports[ $post_type ]['features_cpt'];
$features = Opalestate_Rating_Helper::get_features( $cpt_feature );
$counts = [
5 => 0,
4 => 0,
3 => 0,
2 => 0,
1 => 0,
];
$average_stats = [];
if ( $features ) {
foreach ( $features as $feature_slug => $feature_title ) {
$average_stats[ $feature_slug ] = '0.00';
}
}
$count = $object->get_rating_counts();
$counts = $object->get_rating_count_stats() ? $object->get_rating_count_stats() : $counts;
$average = $object->get_average_rating();
$average_stats = $object->get_rating_average_stats() ? $object->get_rating_average_stats() : $average_stats;
?>
<div id="reviews" class="opalestate-box-content opalestate-reviews">
<h4 class="outbox-title opalestate-reviews-title" id="block-reviews">
<?php esc_html_e( 'Ratings & Reviews', 'opalestate-pro' ); ?>
</h4>
<div class="opalestate-box">
<div id="comments">
<div class="opalestate-rating-header">
<div class="opalestate-rating-percent">
<?php if ( $counts ) : ?>
<?php foreach ( $counts as $key => $value ) : ?>
<?php $pc = $count == 0 ? 0 : ( ( $value / $object->get_rating_counts() ) * 100 ); ?>
<div class="opalestate-rating-percent__item">
<label class="opalestate-rating-percent__label">
<span class="star-number">
<?php echo absint( $key ); ?>
</span>
<span class="star-text">
<?php esc_html_e( 'star', 'opalestate-pro' ); ?>
</span>
</label>
<div class="opalestate-process-bar">
<div class="opalestate-process-bar__item" style="width: <?php echo esc_attr( $pc ); ?>%;">
<?php echo round( $pc, 2 ); ?>%
</div>
</div>
<span class="opalestate-process-text">
<?php echo round( $pc, 0 ); ?>%
</span>
</div>
<?php endforeach; ?>
<?php endif; ?>
</div>
<div class="opalestate-overall">
<div class="opalestate-overall__info">
<div class="opalestate-overall__point">
<h3 class="point-number">
<?php echo esc_html( $object->get_average_rating() ? $object->get_average_rating() : '0.00' ); ?>
</h3>
</div>
<div class="opalestate-overall__star">
<h5 class="opalestate-overall__heading">
<?php esc_html_e( 'Overall rating', 'opalestate-pro' ); ?>
</h5>
<?php
if ( $average ) {
echo opalestate_get_rating_html( $average ); // WPCS: XSS ok.
}
?>
<span class="opalestate-overall__rating-count <?php echo ! $count ? 'no-rating' : ''; ?>">
<?php
printf(
/* translators: %s number of ratings */
_nx(
'%s rating',
'%s ratings',
absint( $count ),
'rating numbers',
'opalestate-pro'
),
number_format_i18n( absint( $count ) )
);
?>
</span>
<?php if ( $count ) : ?>
<span class="opalestate-overall__rating-desc">
<?php esc_html_e( 'based on all ratings', 'opalestate-pro' ); ?>
</span>
<?php endif; ?>
</div>
</div>
<?php if ( $average_stats ) : ?>
<div class="opalestate-overall-features">
<?php foreach ( $average_stats as $feature_slug => $average_stars ) : ?>
<?php
$args = [
'name' => $feature_slug,
'post_type' => $cpt_feature,
'post_status' => 'publish',
'numberposts' => 1,
];
$feature = get_posts( $args );
if ( ! $feature || ! isset( $feature[0] ) ) {
continue;
}
?>
<div class="opalestate-overall-features__item">
<label class="opalestate-overall-features__label">
<?php echo esc_html( $feature[0]->post_title ) ?>
</label>
<div class="opalestate-overall-features__percent">
<?php echo number_format( $average_stars / 5 * 100, 2 ); ?>%
</div>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>
</div>
<h5 class="opalestate-review-count">
<?php
printf(
/* translators: %s number of reviews */
_nx(
'%s review',
'%s reviews',
absint( $object->get_review_count() ),
'review numbers',
'opalestate-pro'
),
number_format_i18n( absint( $object->get_review_count() ) )
);
?>
</h5>
<?php if ( have_comments() ) : ?>
<ol class="commentlist">
<?php wp_list_comments( apply_filters( $post_type . '_review_list_args', [ 'callback' => 'opalestate_comments' ] ) ); ?>
</ol>
<?php
if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :
echo '<nav class="opalestate-pagination">';
paginate_comments_links(
apply_filters(
'opalestate_comment_pagination_args',
[
'prev_text' => '&larr;',
'next_text' => '&rarr;',
'type' => 'list',
]
)
);
echo '</nav>';
endif;
?>
<?php else : ?>
<p class="opalestate-noreviews"><?php esc_html_e( 'There are no reviews yet.', 'opalestate-pro' ); ?></p>
<?php endif; ?>
</div>
<?php if ( is_user_logged_in() ) : ?>
<?php $current_user_id = absint( get_current_user_id() );?>
<?php if ( $current_user_id !== absint( $post->post_author ) ) : ?>
<?php
$count_comment_reviewed = get_comments( [
'author__in' => $current_user_id,
'post_id' => $object->get_id(),
'status' => 'approve',
'count' => true,
] );
?>
<?php if ( ! $count_comment_reviewed ) : ?>
<div id="review_form_wrapper">
<div id="review_form">
<?php
$commenter = wp_get_current_commenter();
$comment_form = [
/* translators: %s is property title */
'title_reply' => have_comments() ? esc_html__( 'Add a review', 'opalestate-pro' ) : sprintf( esc_html__( 'Be the first to review &ldquo;%s&rdquo;', 'opalestate-pro' ), get_the_title() ),
/* translators: %s is property title */
'title_reply_to' => esc_html__( 'Leave a Reply to %s', 'opalestate-pro' ),
'title_reply_before' => '<h5 id="reply-title" class="comment-reply-title">',
'title_reply_after' => '</h5>',
'comment_notes_after' => '',
'fields' => [
'author' => '<p class="comment-form-author"><label for="author">' . esc_html__( 'Name', 'opalestate-pro' ) . '&nbsp;<span class="required">*</span></label> ' .
'<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30" required /></p>',
'email' => '<p class="comment-form-email"><label for="email">' . esc_html__( 'Email', 'opalestate-pro' ) . '&nbsp;<span class="required">*</span></label> ' .
'<input id="email" name="email" type="email" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30" required /></p>',
],
'label_submit' => esc_html__( 'Submit', 'opalestate-pro' ),
'logged_in_as' => '',
'comment_field' => '',
];
if ( $features ) {
$feature_inputs = '';
foreach ( $features as $feature_slug => $feature_title ) {
$feature_inputs .= '<div class="comment-form-rating"><label for="' . $cpt_feature . '_' . $feature_slug . '">' . esc_html( $feature_title ) . '</label><select class="opalestate_rating" name="' . $cpt_feature . '_' . $feature_slug . '" id="' . $cpt_feature . '_' . $feature_slug . '" required>
<option value="">' . esc_html__( 'Rate&hellip;', 'opalestate-pro' ) . '</option>
<option value="5">' . esc_html__( 'Perfect', 'opalestate-pro' ) . '</option>
<option value="4">' . esc_html__( 'Good', 'opalestate-pro' ) . '</option>
<option value="3">' . esc_html__( 'Average', 'opalestate-pro' ) . '</option>
<option value="2">' . esc_html__( 'Not that bad', 'opalestate-pro' ) . '</option>
<option value="1">' . esc_html__( 'Very poor', 'opalestate-pro' ) . '</option>
</select></div>';
}
$comment_form['comment_field'] = $feature_inputs;
} else {
$comment_form['comment_field'] = '<div class="comment-form-rating"><label for="opalestate_rating">' . esc_html__( 'Your rating', 'opalestate-pro' ) . '</label><select class="opalestate_rating" name="opalestate_rating" id="opalestate_rating" required>
<option value="">' . esc_html__( 'Rate&hellip;', 'opalestate-pro' ) . '</option>
<option value="5">' . esc_html__( 'Perfect', 'opalestate-pro' ) . '</option>
<option value="4">' . esc_html__( 'Good', 'opalestate-pro' ) . '</option>
<option value="3">' . esc_html__( 'Average', 'opalestate-pro' ) . '</option>
<option value="2">' . esc_html__( 'Not that bad', 'opalestate-pro' ) . '</option>
<option value="1">' . esc_html__( 'Very poor', 'opalestate-pro' ) . '</option>
</select></div>';
}
$comment_form['comment_field'] .= '<p class="comment-form-comment"><label for="comment">' . esc_html__( 'Your review',
'opalestate-pro' ) . '&nbsp;<span class="required">*</span></label><textarea id="comment" name="comment" cols="45" rows="8" required></textarea></p>';
comment_form( apply_filters( 'opalestate_property_review_comment_form_args', $comment_form ) );
?>
</div>
</div>
<?php else : ?>
<p class="opalestate-reviewed-notice"><?php esc_html_e( 'Your review already exists!', 'opalestate-pro' ); ?></p>
<?php endif; ?>
<?php else : ?>
<p class="opalestate-reviewed-notice"><?php esc_html_e( 'You cannot write review on your own post.', 'opalestate-pro' ); ?></p>
<?php endif; ?>
<?php else : ?>
<p class="opalestate-login-required">
<?php esc_html_e( 'You must be logged in to review.', 'opalestate-pro' ); ?>
<a href="#" class="opalestate-need-login"><?php esc_html_e( 'Click here to login', 'opalestate-pro' ); ?></a>
</p>
<?php endif; ?>
<div class="clear"></div>
</div>
</div>

View File

@@ -0,0 +1,27 @@
<?php
/**
* The template to display the reviewers meta data (name, verified owner, review date)
*/
defined( 'ABSPATH' ) || exit;
global $comment;
if ( '0' === $comment->comment_approved ) { ?>
<p class="meta">
<em class="opalestate-review__awaiting-approval">
<?php esc_html_e( 'Your review is awaiting approval', 'opalestate-pro' ); ?>
</em>
</p>
<?php } else { ?>
<p class="meta">
<span class="opalestate-review__author"><?php comment_author(); ?> </span>
<span class="opalestate-review__dash">&ndash;</span> <time class="opalestate-review__published-date" datetime="<?php echo esc_attr( get_comment_date( 'c' ) ); ?>"><?php echo esc_html(
get_comment_date( opalestate_date_format() ) ); ?></time>
</p>
<?php
}

View File

@@ -0,0 +1,46 @@
<?php
/**
* The template to display the reviewers star rating in reviews
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
global $comment;
$post_id = get_the_ID();
$post_type = get_post_type( $post_id );
$supports = Opalestate_Rating::get_rating_supports();
$cpt_feature = $supports[ $post_type ]['features_cpt'];
$features = Opalestate_Rating_Helper::get_features( $cpt_feature );
$average = Opalestate_Rating_Helper::get_average_rating( $comment, $cpt_feature );
?>
<?php if ( $features ) : ?>
<div class="opalestate-review__ratings">
<div class="opalestate-tooltip" data-tooltip-content="#tooltip_content_<?php echo absint( $comment->comment_ID ); ?>">
<?php
if ( $average ) {
echo opalestate_get_rating_html( $average ); // WPCS: XSS ok.
}
?>
</div>
<div class="opalestate-rating-detail-container">
<ul class="opalestate-rating-detail" id="tooltip_content_<?php echo absint( $comment->comment_ID ); ?>">
<?php foreach ( $features as $feature_slug => $feature_title ) : $feature_key = $cpt_feature . '_' . $feature_slug; ?>
<li class="opalestate-rating-detail__item">
<label><?php echo esc_html( $feature_title ); ?>:</label>
<span><?php echo absint( get_comment_meta( get_comment_ID(), $feature_key, true ) ); ?></span>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>
<?php else : ?>
<?php
if ( $average ) {
echo opalestate_get_rating_html( $average ); // WPCS: XSS ok.
} ?>
<?php endif; ?>

53
templates/rating/review.php Executable file
View File

@@ -0,0 +1,53 @@
<?php
/**
* Review Comments Template
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
?>
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
<div id="comment-<?php comment_ID(); ?>" class="comment_container">
<?php
/**
* The opalestate_review_before hook
*
* @hooked opalestate_review_display_gravatar - 10
*/
do_action( 'opalestate_review_before', $comment );
?>
<div class="comment-text">
<?php
/**
* The opalestate_review_before_comment_meta hook.
*
* @hooked opalestate_review_display_rating - 10
*/
do_action( 'opalestate_review_before_comment_meta', $comment );
/**
* The opalestate_review_meta hook.
*
* @hooked opalestate_review_display_meta - 10
*/
do_action( 'opalestate_review_meta', $comment );
do_action( 'opalestate_review_before_comment_text', $comment );
/**
* The opalestate_review_comment_text hook
*
* @hooked opalestate_review_display_comment_text - 10
*/
do_action( 'opalestate_review_comment_text', $comment );
do_action( 'opalestate_review_after_comment_text', $comment ); ?>
</div>
</div>

View File

@@ -0,0 +1,89 @@
<?php
/**
* The template for advanced v2 search
* // https://wpresidence.net/advanced-search-type-1/
*
* @version 1.0.0
*/
defined( 'ABSPATH' ) || exit;
$GLOBALS['group-info-column'] = 4;
if ( isset( $nobutton ) && $nobutton ) {
$grid = [
0 => 12,
1 => 0,
];
} else {
$grid = [
0 => 10,
1 => 2,
];
}
$display_country = isset( $display_country ) ? $display_country : true;
$display_state = isset( $display_state ) ? $display_state : false;
$display_city = isset( $display_city ) ? $display_city : false;
$display_more_options = isset( $display_more_options ) ? $display_more_options : true;
$form_classes = [
'opalestate-search-form',
'opalestate-search-form--advanced-2',
isset( $hidden_labels ) && $hidden_labels ? 'hidden-labels' : '',
];
?>
<form class="<?php echo esc_attr( implode( ' ', array_map( 'sanitize_html_class', $form_classes ) ) ); ?>" action="<?php echo esc_url( opalestate_get_search_link() ); ?>" method="GET">
<div class="opal-row">
<div class="col-lg-<?php echo esc_attr( $grid[0] ); ?> col-md-<?php echo esc_attr( $grid[0] ); ?> col-sm-<?php echo esc_attr( $grid[0] ); ?>">
<div class="opal-row">
<div class="col-lg-3 col-md-3 col-sm-3">
<?php echo opalestate_load_template_path( 'search-box/fields/types' ); ?>
</div>
<?php if ( $display_country ) : ?>
<div class="col-lg-3 col-md-3 col-sm-3">
<?php echo opalestate_load_template_path( 'search-box/fields/country-select' ); ?>
</div>
<?php endif; ?>
<?php if ( $display_state ) : ?>
<div class="col-lg-3 col-md-3 col-sm-3">
<?php echo opalestate_load_template_path( 'search-box/fields/state-select' ); ?>
</div>
<?php endif; ?>
<?php if ( $display_city ) : ?>
<div class="col-lg-3 col-md-3 col-sm-3">
<?php echo opalestate_load_template_path( 'search-box/fields/city-select' ); ?>
</div>
<?php endif; ?>
<?php echo opalestate_load_template_path( 'search-box/fields/group-info' ); ?>
<div class="col-lg-3 col-md-3 col-sm-3">
<?php echo opalestate_load_template_path( 'search-box/fields/price' ); ?>
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
<?php echo opalestate_load_template_path( 'search-box/fields/areasize' ); ?>
</div>
</div>
<?php
if ( $display_more_options ) {
echo opalestate_load_template_path( 'search-box/fields/more-options' );
}
?>
</div>
<?php if ( ! isset( $nobutton ) || ! $nobutton ) : ?>
<div class="col-lg-<?php echo esc_attr( $grid[1] ); ?> col-md-<?php echo esc_attr( $grid[1] ); ?> col-sm-<?php echo esc_attr( $grid[1] ); ?>">
<?php echo opalestate_load_template_path( 'search-box/fields/submit-button' ); ?>
</div>
<?php endif ?>
</div>
<?php do_action( 'opalestate_after_search_properties_form' ); ?>
</form>

View File

@@ -0,0 +1,73 @@
<?php
/**
* The template for advanced v3 search
* // https://wpresidence.net/advanced-search-type-4/
*
* @version 1.0.0
*/
defined( 'ABSPATH' ) || exit;
$GLOBALS['group-info-column'] = 4;
$display_country = isset( $display_country ) ? $display_country : true;
$display_state = isset( $display_state ) ? $display_state : false;
$display_city = isset( $display_city ) ? $display_city : false;
$display_more_options = isset( $display_more_options ) ? $display_more_options : true;
$form_classes = [
'opalestate-search-form',
'opalestate-search-form--advanced-3',
isset( $hidden_labels ) && $hidden_labels ? 'hidden-labels' : '',
];
?>
<form class="<?php echo esc_attr( implode( ' ', array_map( 'sanitize_html_class', $form_classes ) ) ); ?>" action="<?php echo esc_url( opalestate_get_search_link() ); ?>" method="GET">
<div class="opal-row">
<div class="col-lg-3 col-md-3 col-sm-3">
<?php echo opalestate_load_template_path( 'search-box/fields/types' ); ?>
</div>
<?php if ( $display_country ) : ?>
<div class="col-lg-3 col-md-3 col-sm-3">
<?php echo opalestate_load_template_path( 'search-box/fields/country-select' ); ?>
</div>
<?php endif; ?>
<?php if ( $display_state ) : ?>
<div class="col-lg-3 col-md-3 col-sm-3">
<?php echo opalestate_load_template_path( 'search-box/fields/state-select' ); ?>
</div>
<?php endif; ?>
<?php if ( $display_city ) : ?>
<div class="col-lg-3 col-md-3 col-sm-3">
<?php echo opalestate_load_template_path( 'search-box/fields/city-select' ); ?>
</div>
<?php endif; ?>
<?php echo opalestate_load_template_path( 'search-box/fields/group-info' ); ?>
<div class="col-lg-3 col-md-3 col-sm-3">
<?php echo opalestate_load_template_path( 'search-box/fields/price' ); ?>
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
<?php echo opalestate_load_template_path( 'search-box/fields/areasize' ); ?>
</div>
<?php if ( ! isset( $nobutton ) || ! $nobutton ) : ?>
<div class="col-lg-3 col-md-3 col-sm-3">
<?php echo opalestate_load_template_path( 'search-box/fields/submit-button' ); ?>
</div>
<?php endif ?>
</div>
<?php
if ( $display_more_options ) {
echo opalestate_load_template_path( 'search-box/fields/more-options' );
}
?>
<?php do_action( 'opalestate_after_search_properties_form' ); ?>
</form>

View File

@@ -0,0 +1,83 @@
<?php
/**
* The template for advanced v4 search
* // https://wpresidence.net/advanced-search-type-4/
*
* @version 1.0.0
*/
defined( 'ABSPATH' ) || exit;
$GLOBALS['group-info-column'] = 4;
$display_country = isset( $display_country ) ? $display_country : true;
$display_state = isset( $display_state ) ? $display_state : false;
$display_city = isset( $display_city ) ? $display_city : false;
$display_more_options = isset( $display_more_options ) ? $display_more_options : true;
$form_classes = [
'opalestate-search-form',
'opalestate-search-form--advanced-4',
isset( $hidden_labels ) && $hidden_labels ? 'hidden-labels' : '',
];
?>
<form class="<?php echo esc_attr( implode( ' ', array_map( 'sanitize_html_class', $form_classes ) ) ); ?>" action="<?php echo esc_url( opalestate_get_search_link() ); ?>" method="GET">
<div class="opal-row">
<div class="col-lg-12 col-md-12 col-sm-12">
<?php echo opalestate_load_template_path( 'search-box/fields/location' ); ?>
</div>
<div class="col-lg-12 col-md-12 col-sm-12">
<?php echo opalestate_load_template_path( 'search-box/fields/radius' ); ?>
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
<?php echo opalestate_load_template_path( 'search-box/fields/types' ); ?>
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
<?php echo opalestate_load_template_path( 'search-box/fields/status' ); ?>
</div>
<?php if ( $display_country ) : ?>
<div class="col-lg-3 col-md-3 col-sm-3">
<?php echo opalestate_load_template_path( 'search-box/fields/country-select' ); ?>
</div>
<?php endif; ?>
<?php if ( $display_state ) : ?>
<div class="col-lg-3 col-md-3 col-sm-3">
<?php echo opalestate_load_template_path( 'search-box/fields/state-select' ); ?>
</div>
<?php endif; ?>
<?php if ( $display_city ) : ?>
<div class="col-lg-3 col-md-3 col-sm-3">
<?php echo opalestate_load_template_path( 'search-box/fields/city-select' ); ?>
</div>
<?php endif; ?>
<?php echo opalestate_load_template_path( 'search-box/fields/group-info' ); ?>
<div class="col-lg-6 col-md-6 col-sm-6">
<?php echo opalestate_load_template_path( 'search-box/fields/price' ); ?>
<?php echo opalestate_load_template_path( 'search-box/fields/areasize' ); ?>
</div>
<?php if ( ! isset( $nobutton ) || ! $nobutton ) : ?>
<div class="col-lg-3 col-md-3 col-sm-3">
<?php echo opalestate_load_template_path( 'search-box/fields/submit-button' ); ?>
</div>
<?php endif; ?>
</div>
<?php
if ( $display_more_options ) {
echo opalestate_load_template_path( 'search-box/fields/more-options' );
}
?>
<?php do_action( 'opalestate_after_search_properties_form' ); ?>
</form>

View File

@@ -0,0 +1,70 @@
<?php
/**
* The template for advanced v5 search
* // http://homevillas.chimpgroup.com/home-v5/
*
* @version 1.0.0
*/
defined( 'ABSPATH' ) || exit;
if ( isset( $nobutton ) && $nobutton ) {
$grid = [
0 => 3,
1 => 3,
2 => 3,
3 => 3,
4 => 0,
];
} else {
$grid = [
0 => 3,
1 => 3,
2 => 3,
3 => 2,
4 => 1,
];
}
$display_more_options = isset( $display_more_options ) ? $display_more_options : false;
$form_classes = [
'opalestate-search-form',
'opalestate-search-form--advanced-5',
isset( $hidden_labels ) && $hidden_labels ? 'hidden-labels' : '',
];
?>
<form class="<?php echo esc_attr( implode( ' ', array_map( 'sanitize_html_class', $form_classes ) ) ); ?>" action="<?php echo esc_url( opalestate_get_search_link() ); ?>" method="GET">
<div class="opal-row">
<div class="col-lg-<?php echo esc_attr( $grid[0] ); ?> col-md-<?php echo esc_attr( $grid[0] ); ?> col-sm-<?php echo esc_attr( $grid[0] ); ?> col-xs-12">
<?php echo opalestate_load_template_path( 'search-box/fields/search-text' ); ?>
</div>
<div class="col-lg-<?php echo esc_attr( $grid[1] ); ?> col-md-<?php echo esc_attr( $grid[1] ); ?> col-sm-<?php echo esc_attr( $grid[1] ); ?> col-xs-12">
<?php echo opalestate_load_template_path( 'search-box/fields/location' ); ?>
</div>
<div class="col-lg-<?php echo esc_attr( $grid[2] ); ?> col-md-<?php echo esc_attr( $grid[2] ); ?> col-sm-<?php echo esc_attr( $grid[2] ); ?> col-xs-12">
<?php echo opalestate_load_template_path( 'search-box/fields/status-bar', [ 'hide_default_status' => 1 ] ); ?>
</div>
<div class="col-lg-<?php echo esc_attr( $grid[3] ); ?> col-md-<?php echo esc_attr( $grid[3] ); ?> col-sm-<?php echo esc_attr( $grid[3] ); ?> col-xs-12">
<?php echo opalestate_load_template_path( 'search-box/fields/types' ); ?>
</div>
<?php if ( ! isset( $nobutton ) || ! $nobutton ) : ?>
<div class="col-lg-1 col-md-1 col-sm-1 col-xs-12">
<?php echo opalestate_load_template_path( 'search-box/fields/submit-button' ); ?>
</div>
<?php endif; ?>
<?php if ( $display_more_options ) : ?>
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<?php echo opalestate_load_template_path( 'search-box/fields/more-options' ); ?>
</div>
<?php endif; ?>
</div>
<?php do_action( 'opalestate_after_search_properties_form' ); ?>
</form>

View File

@@ -0,0 +1,42 @@
<?php
/**
* The template for advanced v6 search
* // http://homevillas.chimpgroup.com/demo-v7/
*
* @version 1.0.0
*/
defined( 'ABSPATH' ) || exit;
$display_more_options = isset( $display_more_options ) ? $display_more_options : false;
$form_classes = [
'opalestate-search-form',
'opalestate-search-form--advanced-6',
isset( $nobutton ) && $nobutton ? 'no-submit-btn' : 'has-submit-btn',
isset( $hidden_labels ) && $hidden_labels ? 'hidden-labels' : '',
];
?>
<form class="<?php echo esc_attr( implode( ' ', array_map( 'sanitize_html_class', $form_classes ) ) ); ?>" action="<?php echo esc_url( opalestate_get_search_link() ); ?>" method="GET">
<div class="opalestate-search-form__item">
<?php echo opalestate_load_template_path( 'search-box/fields/status' ); ?>
</div>
<div class="opalestate-search-form__item">
<?php echo opalestate_load_template_path( 'search-box/fields/search-text' ); ?>
</div>
<?php if ( ! isset( $nobutton ) || ! $nobutton ) : ?>
<?php echo opalestate_load_template_path( 'search-box/fields/submit-button' ); ?>
<?php endif; ?>
<?php
if ( $display_more_options ) {
echo opalestate_load_template_path( 'search-box/fields/more-options' );
}
?>
<?php do_action( 'opalestate_after_search_properties_form' ); ?>
</form>

View File

@@ -0,0 +1,87 @@
<?php
/**
* The template for collapse city search
*
* @version 1.0.0
*/
defined( 'ABSPATH' ) || exit;
$unique_id = esc_attr( wp_unique_id() );
$GLOBALS['group-info-column'] = 4;
if ( isset( $nobutton ) && $nobutton ) {
$grid = [
0 => 7,
1 => 4,
2 => 1,
3 => 0,
];
} else {
$grid = [
0 => 6,
1 => 3,
2 => 1,
3 => 2,
];
}
$display_more_options = isset( $display_more_options ) ? $display_more_options : true;
$form_classes = [
'opalestate-search-form',
'opalestate-search-form--collapse-city',
isset( $hidden_labels ) && $hidden_labels ? 'hidden-labels' : '',
];
?>
<form class="<?php echo esc_attr( implode( ' ', array_map( 'sanitize_html_class', $form_classes ) ) ); ?>" action="<?php echo esc_url( opalestate_get_search_link() ); ?>" method="GET">
<div class="opal-row">
<div class="col-lg-<?php echo esc_attr( $grid[0] ) ?> col-md-<?php echo esc_attr( $grid[0] ); ?> col-sm-<?php echo esc_attr( $grid[0] ); ?> col-xs-12">
<?php echo opalestate_load_template_path( 'search-box/fields/search-city-text' ); ?>
</div>
<div class="col-lg-<?php echo esc_attr( $grid[1] ); ?> col-md-<?php echo esc_attr( $grid[1] ); ?> col-sm-<?php echo esc_attr( $grid[1] ); ?> col-xs-12">
<?php echo opalestate_load_template_path( 'search-box/fields/status' ); ?>
</div>
<div class="col-lg-<?php echo esc_attr( $grid[2] ); ?> col-md-<?php echo esc_attr( $grid[2] ); ?> col-sm-<?php echo esc_attr( $grid[2] ); ?> col-xs-12">
<button type="button" class="opal-collapse-button opalestate-collapse-btn btn btn-primary" data-collapse="#collapse-city-<?php echo esc_attr( $unique_id ); ?>">
<i class="fa fa-caret-down" aria-hidden="true"></i>
</button>
</div>
<?php if ( ! isset( $nobutton ) || ! $nobutton ) : ?>
<div class="col-lg-<?php echo esc_attr( $grid[3] ); ?> col-md-<?php echo esc_attr( $grid[3] ); ?> col-sm-<?php echo esc_attr( $grid[3] ); ?> col-xs-12">
<?php echo opalestate_load_template_path( 'search-box/fields/submit-button' ); ?>
</div>
<?php endif; ?>
</div>
<div id="collapse-city-<?php echo esc_attr( $unique_id ); ?>" class="opal-collapse-container collapse-city-inputs">
<div class="opal-row">
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">
<?php echo opalestate_load_template_path( 'search-box/fields/types' ); ?>
</div>
<?php echo opalestate_load_template_path( 'search-box/fields/group-info' ); ?>
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
<?php echo opalestate_load_template_path( 'search-box/fields/price' ); ?>
</div>
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
<?php echo opalestate_load_template_path( 'search-box/fields/areasize' ); ?>
</div>
</div>
<?php
if ( $display_more_options ) {
echo opalestate_load_template_path( 'search-box/fields/more-options' );
}
?>
</div>
<?php do_action( 'opalestate_after_search_properties_form' ); ?>
</form>

View File

@@ -0,0 +1,109 @@
<?php
/**
* The template for collapse keyword search
*
* @version 1.0.0
*/
defined( 'ABSPATH' ) || exit;
$GLOBALS['group-info-column'] = 4;
if ( isset( $nobutton ) && $nobutton ) {
$grid = [
0 => 5,
1 => 3,
2 => 3,
3 => 1,
4 => 0,
];
} else {
$grid = [
0 => 5,
1 => 2,
2 => 2,
3 => 1,
4 => 2,
];
}
$display_country = isset( $display_country ) ? $display_country : true;
$display_state = isset( $display_state ) ? $display_state : false;
$display_city = isset( $display_city ) ? $display_city : false;
$display_more_options = isset( $display_more_options ) ? $display_more_options : true;
$form_classes = [
'opalestate-search-form',
'opalestate-search-form--collapse-keyword',
isset( $hidden_labels ) && $hidden_labels ? 'hidden-labels' : '',
];
?>
<form class="<?php echo esc_attr( implode( ' ', array_map( 'sanitize_html_class', $form_classes ) ) ); ?>" action="<?php echo esc_url( opalestate_get_search_link() ); ?>" method="GET">
<div class="opal-row">
<div class="col-lg-<?php echo absint( $grid[0] ); ?> col-md-<?php echo absint( $grid[0] ); ?> col-sm-<?php echo absint( $grid[0] ); ?> col-xs-12">
<?php echo opalestate_load_template_path( 'search-box/fields/search-text' ); ?>
</div>
<div class="col-lg-<?php echo absint( $grid[1] ); ?> col-md-<?php echo absint( $grid[1] ); ?> col-sm-<?php echo absint( $grid[1] ); ?> col-xs-12">
<?php echo opalestate_load_template_path( 'search-box/fields/types' ); ?>
</div>
<div class="col-lg-<?php echo absint( $grid[2] ); ?> col-md-<?php echo absint( $grid[2] ); ?> col-sm-<?php echo absint( $grid[2] ); ?> col-xs-12">
<?php echo opalestate_load_template_path( 'search-box/fields/status' ); ?>
</div>
<div class="col-lg-<?php echo absint( $grid[3] ); ?> col-md-<?php echo absint( $grid[3] ); ?> col-sm-<?php echo absint( $grid[3] ); ?> col-xs-12">
<button type="button" class="opal-collapse-button opalestate-collapse-btn btn btn-primary" data-collapse="#collapse-keyword-<?php echo esc_attr( $unique_id ); ?>">
<i class="fa fa-caret-down" aria-hidden="true"></i>
</button>
</div>
<?php if ( ! isset( $nobutton ) || ! $nobutton ) : ?>
<div class="col-lg-<?php echo absint( $grid[4] ); ?> col-md-<?php echo absint( $grid[4] ); ?> col-sm-<?php echo absint( $grid[4] ); ?> col-xs-12">
<?php echo opalestate_load_template_path( 'search-box/fields/submit-button' ); ?>
</div>
<?php endif; ?>
</div>
<div id="collapse-keyword-<?php echo esc_attr( $unique_id ); ?>" class="opal-collapse-container collapse-keyword-inputs">
<div class="opal-row">
<?php if ( $display_country ) : ?>
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">
<?php echo opalestate_load_template_path( 'search-box/fields/country-select' ); ?>
</div>
<?php endif; ?>
<?php if ( $display_state ) : ?>
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">
<?php echo opalestate_load_template_path( 'search-box/fields/state-select' ); ?>
</div>
<?php endif; ?>
<?php if ( $display_city ) : ?>
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">
<?php echo opalestate_load_template_path( 'search-box/fields/city-select' ); ?>
</div>
<?php endif; ?>
<?php echo opalestate_load_template_path( 'search-box/fields/group-info' ); ?>
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
<?php echo opalestate_load_template_path( 'search-box/fields/price' ); ?>
</div>
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
<?php echo opalestate_load_template_path( 'search-box/fields/areasize' ); ?>
</div>
</div>
<?php
if ( $display_more_options ) {
echo opalestate_load_template_path( 'search-box/fields/more-options' );
}
?>
</div>
<?php do_action( 'opalestate_after_search_properties_form' ); ?>
</form>

View File

@@ -0,0 +1 @@
<?php opalestate_property_areasize_field_template(); ?>

View File

@@ -0,0 +1,3 @@
<?php
$scity = isset( $_GET['city'] ) ? sanitize_text_field( $_GET['city'] ) : '';
Opalestate_Taxonomy_City::dropdown_list( $scity );

View File

@@ -0,0 +1,3 @@
<?php
$slocation = isset( $_GET['location'] ) ? sanitize_text_field( $_GET['location'] ): opalestate_get_session_location_val();
Opalestate_Taxonomy_Location::dropdown_list( $slocation );

View File

@@ -0,0 +1,21 @@
<?php
$fields = OpalEstate_Search::get_setting_search_fields();
if ( ! $fields ) {
return;
}
$type = isset( $type ) ? $type : '';
$column = isset( $GLOBALS['group-info-column'] ) ? $GLOBALS['group-info-column'] : 3;
if( $type != 'input' ) {
$col_class = 'col-lg-' . ( 12 / absint( $column ) ) . ' col-md-' . ( 12 / absint( $column ) ) . ' col-sm-' . ( 12 / absint( $column ) );
} else {
$col_class = 'column-item';
}
foreach ( $fields as $key => $label ): ?>
<?php if ( 'areasize' == $key ) : continue; endif; ?>
<div class="<?php echo esc_attr( $col_class ); ?>">
<?php opalestate_property_render_field_template( $key, $label, $type ); ?>
</div>
<?php endforeach; ?>

View File

@@ -0,0 +1,2 @@
<label class="opalestate-label opalestate-label--location-text"><?php esc_html_e( 'Location', 'opalestate-pro' ) ?></label>
<input class="form-control" name="location_text" placeholder="<?php esc_attr_e( 'Location', 'opalestate-pro' ); ?>">

View File

@@ -0,0 +1,33 @@
<?php
/**
* The template for more options search
*
* @version 1.0.0
*/
defined( 'ABSPATH' ) || exit;
$unique_id = esc_attr( wp_unique_id() );
$amenities = Opalestate_Taxonomy_Amenities::get_list();
if ( ! $amenities ) {
return;
}
?>
<div class="search-more-options">
<a href="#" class="opal-collapse-button" data-collapse="#more-options-<?php echo esc_attr( $unique_id ); ?>"><?php esc_html_e( 'More Search Options', 'opalestate-pro' ); ?></a>
<div id="more-options-<?php echo esc_attr( $unique_id ); ?>" class="opal-collapse-container more-options-container">
<div class="more-options-items">
<?php foreach ( $amenities as $amenity ) : ?>
<div class="more-options-item">
<label class="more-options-label">
<input type="checkbox" name="amenities[]" value="<?php echo esc_attr( $amenity->slug ); ?>">
<?php echo esc_html( $amenity->name ); ?>
</label>
</div>
<?php endforeach; ?>
</div>
</div>
</div>

View File

@@ -0,0 +1,20 @@
<?php
$search_min_price = isset( $_GET['min_price'] ) ? sanitize_text_field( $_GET['min_price'] ): opalestate_options( 'search_min_price', 0 );
$search_max_price = isset( $_GET['max_price'] ) ? sanitize_text_field( $_GET['max_price'] ): opalestate_options( 'search_max_price', 10000000 );
$data = [
'id' => 'price',
'decimals' => opalestate_get_price_decimals(),
'unit' => opalestate_currency_symbol() . ' ',
'ranger_min' => opalestate_options( 'search_min_price', 0 ),
'ranger_max' => opalestate_options( 'search_max_price', 10000000 ),
'input_min' => $search_min_price,
'input_max' => $search_max_price,
];
if ( opalestate_options( 'currency_position', 'before' ) == 'before' ) {
$data['unit_position'] = 'prefix';
}
?>
<?php opalesate_property_slide_ranger_template( esc_html__( 'Price', 'opalestate-pro' ), $data ); ?>

View File

@@ -0,0 +1,15 @@
<?php
$search_min_radius = isset( $_GET['min_radius'] ) ? sanitize_text_field( $_GET['min_radius'] ) : opalestate_options( 'search_min_radius', 0 );
$search_max_radius = isset( $_GET['max_radius'] ) ? sanitize_text_field( $_GET['max_radius'] ): opalestate_options( 'search_max_radius', 10000000 );
$data = [
'id' => 'radius',
'unit' => 'miles',
'ranger_min' => opalestate_options( 'search_min_radius', 0 ),
'ranger_max' => opalestate_options( 'search_max_radius', 10000000 ),
'input_min' => $search_min_radius,
'input_max' => $search_max_radius,
];
opalesate_property_slide_ranger_template( esc_html__( 'Radius:', 'opalestate-pro' ), $data );
?>

View File

@@ -0,0 +1,44 @@
<?php
$max_price = 10;
$start = 1;
$unit = 'KM';
$location_text = isset( $_GET['location_text'] ) ? sanitize_text_field( $_GET['location_text'] ): "";
$geo_lat = isset( $_GET['geo_lat'] ) ? sanitize_text_field( $_GET['geo_lat'] ): "";
$geo_long = isset( $_GET['geo_long'] ) ? sanitize_text_field( $_GET['geo_long'] ): "";
$max_geo_radius = isset( $_GET['geo_radius'] ) ? sanitize_text_field( $_GET['geo_radius'] ): $start;
$data_deposit = [
'id' => 'geo_radius',
'decimals' => 0,
'unit' => $unit,
'ranger_min' => 0,
'ranger_max' => $max_price,
'input_min' => 0,
'input_max' => $max_price,
'mode' => 1,
'start' => $max_geo_radius,
];
?>
<div class="input-search-city opalestate-search-opal-map">
<label class="opalestate-label opalestate-label--geo-location"><?php esc_html_e( 'Location', 'opalestate-pro' ); ?></label>
<input class="form-control opal-map-search" name="location_text" value="<?php echo esc_attr( $location_text ); ?>" placeholder="<?php esc_attr_e( 'Type City or Area', 'opalestate-pro' ); ?>">
<input class="form-control opal-map-latitude" name="geo_lat" value="<?php echo esc_attr( $geo_lat ); ?>" type="hidden">
<input class="form-control opal-map-longitude" name="geo_long" type="hidden" value="<?php echo esc_attr( $geo_long ); ?>">
<div class="map-remove"><i class="fa fa-close"></i></div>
<div class="opalestate-popup">
<div class="popup-head">
<span><i class="fa fa-location-arrow"></i></span>
</div>
<div class="popup-body">
<div class="popup-close"><i class="fa fa-times" aria-hidden="true"></i></div>
<div class="contact-share-form-container">
<h6><?php echo esc_html__( 'Show with in.', 'opalestate-pro' ); ?></h6>
<div class="box-content ">
<?php opalesate_property_slide_ranger_template( esc_html__( 'Radius', 'opalestate-pro' ), $data_deposit ); ?>
<p><a href="#"><?php echo esc_html__( 'Of My Location', 'opalestate-pro' ); ?></a></p>
</div>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,2 @@
<label class="opalestate-label opalestate-label--keyword"><?php esc_html_e( 'Keyword', 'opalestate-pro' ); ?></label>
<input class="form-control" name="search_text" placeholder="<?php esc_attr_e( 'Type keyword', 'opalestate-pro' ); ?>">

View File

@@ -0,0 +1,3 @@
<?php
$sstate = isset( $_GET['state'] ) ? $_GET['state'] : '';
Opalestate_Taxonomy_State::dropdown_list( $sstate );

View File

@@ -0,0 +1,28 @@
<?php
$statuses = Opalestate_Taxonomy_Status::get_list();
if ( ! $statuses ) {
return;
}
$sstatus = isset( $_GET['status'] ) ? sanitize_text_field( $_GET['status'] ): -1;
$label = isset( $label ) ? esc_html( $label ) : esc_html__( 'All', 'opalestate-pro' );
$style = isset( $style ) && $style ? $style : '';
?>
<div class="search-status-bar <?php echo esc_attr( $style ) ? 'search-status-bar--' . $style : ''; ?>">
<ul class="list-inline clearfix list-property-status">
<?php if ( ! isset( $hide_default_status ) ) : ?>
<li class="status-item <?php if ( $sstatus == -1 ): ?> active<?php endif; ?>" data-id="-1">
<span><?php echo esc_html( $label ); ?></span>
</li>
<?php endif; ?>
<?php foreach ( $statuses as $status ): ?>
<li class="status-item <?php if ( $sstatus == $status->slug ) : ?> active<?php endif; ?>" data-id="<?php echo esc_attr( $status->slug ); ?>">
<span><?php echo esc_html( $status->name ); ?> </span>
</li>
<?php endforeach; ?>
</ul>
<input type="hidden" value="<?php echo esc_attr( $sstatus ); ?>" name="status"/>
</div>

View File

@@ -0,0 +1,4 @@
<?php
$status = isset( $_GET['status'] ) ? sanitize_text_field( $_GET['status'] ): -1;
Opalestate_Taxonomy_Status::dropdown_list( $status );
?>

View File

@@ -0,0 +1,3 @@
<button type="submit" class="<?php echo apply_filters( 'opalestate_search_form_submit_classes', 'btn btn-secondary btn-search' ); ?>">
<?php esc_html_e('Search', 'opalestate-pro'); ?>
</button>

View File

@@ -0,0 +1,9 @@
<?php
$stypes = isset( $_GET['types'] ) ? $_GET['types'] : -1;
if( isset($ismultiple) ) {
Opalestate_Taxonomy_Type::get_multi_check_list( $stypes );
} else {
Opalestate_Taxonomy_Type::dropdown_list();
}
?>

View File

@@ -0,0 +1,77 @@
<?php
/**
* The template for advanced v1 search
*
* @version 1.0.0
*/
defined( 'ABSPATH' ) || exit;
$display_country = isset( $display_country ) ? $display_country : true;
$display_state = isset( $display_state ) ? $display_state : false;
$display_city = isset( $display_city ) ? $display_city : false;
$display_more_options = isset( $display_more_options ) ? $display_more_options : true;
$form_classes = [
'opalestate-search-form',
'opalestate-search-form--advanced-1',
isset( $hidden_labels ) && $hidden_labels ? 'hidden-labels' : '',
];
?>
<form class="<?php echo esc_attr( implode( ' ', array_map( 'sanitize_html_class', $form_classes ) ) ); ?>" action="<?php echo esc_url( opalestate_get_search_link() ); ?>" method="GET">
<div class="searchbox-top">
<?php echo opalestate_load_template_path( 'search-box/fields/status-bar', [ 'style' => 2 ] ); ?>
</div>
<div class="opal-row">
<?php if ( $display_country ) : ?>
<div class="col-lg-4 col-md-4 col-sm-12">
<?php echo opalestate_load_template_path( 'search-box/fields/country-select' ); ?>
</div>
<?php endif; ?>
<?php if ( $display_state ) : ?>
<div class="col-lg-4 col-md-4 col-sm-12">
<?php echo opalestate_load_template_path( 'search-box/fields/state-select' ); ?>
</div>
<?php endif; ?>
<?php if ( $display_city ) : ?>
<div class="col-lg-4 col-md-4 col-sm-12">
<?php echo opalestate_load_template_path( 'search-box/fields/city-select' ); ?>
</div>
<?php endif; ?>
<div class="col-lg-8 col-md-8 col-sm-12">
<div class="opal-row">
<?php echo opalestate_load_template_path( 'search-box/fields/group-info' ); ?>
</div>
</div>
<div class="col-lg-3 col-md-3 col-sm-12">
<?php echo opalestate_load_template_path( 'search-box/fields/types' ); ?>
</div>
<div class="col-lg-3 col-md-3 col-sm-12">
<?php echo opalestate_load_template_path( 'search-box/fields/price' ); ?>
</div>
<div class="col-lg-3 col-md-3 col-sm-12">
<?php echo opalestate_load_template_path( 'search-box/fields/areasize' ); ?>
</div>
<?php if ( ! isset( $nobutton ) || ! $nobutton ) : ?>
<div class="col-lg-3 col-md-3 col-sm-12">
<?php echo opalestate_load_template_path( 'search-box/fields/submit-button' ); ?>
</div>
<?php endif; ?>
</div>
<?php
if ( $display_more_options ) {
echo opalestate_load_template_path( 'search-box/fields/more-options' );
}
?>
<?php do_action( 'opalestate_after_search_properties_form' ); ?>
</form>

View File

@@ -0,0 +1,58 @@
<?php
/**
* The template for vertival search
*
* @version 1.0.0
*/
defined( 'ABSPATH' ) || exit;
$GLOBALS['group-info-column'] = 1;
$display_country = isset( $display_country ) ? $display_country : true;
$display_state = isset( $display_state ) ? $display_state : true;
$display_city = isset( $display_city ) ? $display_city : true;
$display_more_options = isset( $display_more_options ) ? $display_more_options : true;
$form_classes = [
'opalestate-search-form',
'opalestate-search-form--vertical',
isset( $hidden_labels ) && $hidden_labels ? 'hidden-labels' : '',
];
?>
<form class="<?php echo esc_attr( implode( ' ', array_map( 'sanitize_html_class', $form_classes ) ) ); ?>" action="<?php echo esc_url( opalestate_get_search_link() ); ?>" method="GET">
<?php
if ( $display_country ) {
echo opalestate_load_template_path( 'search-box/fields/country-select' );
}
if ( $display_state ) {
echo opalestate_load_template_path( 'search-box/fields/state-select' );
}
if ( $display_city ) {
echo opalestate_load_template_path( 'search-box/fields/city-select' );
}
?>
<?php echo opalestate_load_template_path( 'search-box/fields/types' ); ?>
<?php echo opalestate_load_template_path( 'search-box/fields/group-info', [ 'type' => 'input' ] ); ?>
<?php echo opalestate_load_template_path( 'search-box/fields/price' ); ?>
<?php
if ( $display_more_options ) {
echo opalestate_load_template_path( 'search-box/fields/more-options' );
}
?>
<?php if ( ! isset( $nobutton ) || ! $nobutton ) : ?>
<?php echo opalestate_load_template_path( 'search-box/fields/submit-button' ); ?>
<?php endif; ?>
<?php do_action( 'opalestate_after_search_properties_form' ); ?>
</form>

Some files were not shown because too many files have changed in this diff Show More