Merge branch 'master' of https://github.com/wpopal/opal-estate-pro
This commit is contained in:
commit
6be05eed76
@ -38,6 +38,7 @@ class Opalestate_Admin_Property {
|
||||
|
||||
// add_action( 'transition_post_status', array( __CLASS__, 'save_post' ), 10, 3 );
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@ -308,7 +308,49 @@ class Opalestate_Agency_Front {
|
||||
*
|
||||
*/
|
||||
public function register_shortcodes() {
|
||||
$this->shortcodes = [
|
||||
'search_agencies' => [ 'code' => 'search_agencies', 'label' => esc_html__( 'Search Agencies', 'opalestate-pro' ) ],
|
||||
'agency_carousel' => [ 'code' => 'agency_carousel', 'label' => esc_html__( 'Agency Carousel', 'opalestate-pro' ) ],
|
||||
];
|
||||
|
||||
foreach ( $this->shortcodes as $shortcode ) {
|
||||
add_shortcode( 'opalestate_' . $shortcode['code'], [ $this, $shortcode['code'] ] );
|
||||
}
|
||||
}
|
||||
|
||||
public function agency_carousel ( $atts ) {
|
||||
|
||||
$atts = is_array( $atts ) ? $atts : [];
|
||||
|
||||
$default = array(
|
||||
'current_uri' => null,
|
||||
'column' => 3,
|
||||
'limit' => 12,
|
||||
'paged' => 1,
|
||||
'onlyfeatured' => 0,
|
||||
);
|
||||
|
||||
$atts = array_merge( $default, $atts );
|
||||
|
||||
return opalestate_load_template_path( 'shortcodes/agency-carousel' , $atts );
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function search_agencies ( $atts=[] ) {
|
||||
|
||||
$atts = is_array( $atts ) ? $atts : [];
|
||||
$layout = 'search-agency-form';
|
||||
|
||||
$default = array(
|
||||
'current_uri' => null,
|
||||
'form' => $layout
|
||||
);
|
||||
|
||||
$atts = array_merge( $default, $atts );
|
||||
|
||||
return opalestate_load_template_path( 'shortcodes/search-agencies' , $atts );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5,7 +5,7 @@
|
||||
* @version $Id$
|
||||
* @package $package$
|
||||
* @author Opal Team <info@wpopal.com >
|
||||
* @copyright Copyright (C) 2014 wpopal.com. All Rights Reserved.
|
||||
* @copyright Copyright (C) 2019 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
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Opalestate_Agent_Front
|
||||
*
|
||||
* @author Opal Team <info@wpopal.com >
|
||||
* @copyright Copyright (C) 2014 wpopal.com. All Rights Reserved.
|
||||
* @copyright Copyright (C) 2019 wpopal.com. All Rights Reserved.
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
@ -307,6 +307,7 @@ class Opalestate_Agent_Front {
|
||||
|
||||
'change_agent_profile' => [ 'code' => 'change_agent_profile', 'label' => esc_html__( 'Agent Profile', 'opalestate-pro' ) ],
|
||||
'search_agents' => [ 'code' => 'search_agents', 'label' => esc_html__( 'Search Agents', 'opalestate-pro' ) ],
|
||||
'agent_carousel' => [ 'code' => 'agent_carousel', 'label' => esc_html__( 'Agent Carousel', 'opalestate-pro' ) ],
|
||||
];
|
||||
|
||||
foreach ( $this->shortcodes as $shortcode ) {
|
||||
@ -315,6 +316,25 @@ class Opalestate_Agent_Front {
|
||||
|
||||
}
|
||||
|
||||
public function agent_carousel ( $atts ) {
|
||||
|
||||
$atts = is_array( $atts ) ? $atts : [];
|
||||
$layout = 'search-agency-form';
|
||||
|
||||
$default = array(
|
||||
'current_uri' => null,
|
||||
'column' => 4,
|
||||
'limit' => 12,
|
||||
'paged' => 1,
|
||||
'onlyfeatured' => 0,
|
||||
'form' => $layout
|
||||
);
|
||||
|
||||
$atts = array_merge( $default, $atts );
|
||||
|
||||
return opalestate_load_template_path( 'shortcodes/agent-carousel' , $atts );
|
||||
}
|
||||
|
||||
public function archives_query( $query ) {
|
||||
|
||||
if ( $query->is_main_query() && is_post_type_archive( 'opalestate_agent' ) ) {
|
||||
|
@ -5,7 +5,7 @@
|
||||
* @version $Id$
|
||||
* @package $package$
|
||||
* @author Opal Team <info@wpopal.com >
|
||||
* @copyright Copyright (C) 2014 wpopal.com. All Rights Reserved.
|
||||
* @copyright Copyright (C) 2019 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
|
||||
|
@ -5,7 +5,7 @@
|
||||
* @version $Id$
|
||||
* @package $package$
|
||||
* @author Opal Team <info@wpopal.com >
|
||||
* @copyright Copyright (C) 2014 wpopal.com. All Rights Reserved.
|
||||
* @copyright Copyright (C) 2019 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
|
||||
@ -287,6 +287,9 @@ class Opalestate_Emails {
|
||||
],
|
||||
|
||||
|
||||
//------------------------------------------
|
||||
|
||||
|
||||
[
|
||||
'name' => esc_html__( 'Notification For New Property Submission', 'opalestate-pro' ),
|
||||
'desc' => '<hr>',
|
||||
@ -354,7 +357,32 @@ class Opalestate_Emails {
|
||||
'desc' => esc_html__( 'Enter the email a user should receive when they make an initial payment request.', 'opalestate-pro' ),
|
||||
'default' => OpalEstate_Send_Email_Approve::get_default_template(),
|
||||
],
|
||||
/// enquire contact template ////
|
||||
[
|
||||
'name' => esc_html__( 'Email Enquiry Contact Templates (Template Tags)', 'opalestate-pro' ),
|
||||
'desc' => $contact_list_tags . '<br><hr>',
|
||||
'id' => 'opalestate_title_email_settings_6_1',
|
||||
'type' => 'title',
|
||||
],
|
||||
[
|
||||
'id' => 'enquiry_email_subject',
|
||||
'name' => esc_html__( 'Email Subject', 'opalestate-pro' ),
|
||||
'type' => 'text',
|
||||
'desc' => esc_html__( 'The email subject a user should receive when they make an initial property request.', 'opalestate-pro' ),
|
||||
'attributes' => [
|
||||
'placeholder' => 'Your property at I Love WordPress is pending',
|
||||
get_bloginfo( 'name' ),
|
||||
'rows' => 3,
|
||||
],
|
||||
'default' => esc_html__( 'You got a message', 'opalestate-pro' ),
|
||||
],
|
||||
|
||||
[
|
||||
'id' => 'enquiry_email_body',
|
||||
'name' => esc_html__( 'Email Body', 'opalestate-pro' ),
|
||||
'type' => 'wysiwyg',
|
||||
'default' => OpalEstate_Send_Email_Notification::get_default_template( 'enquiry' )
|
||||
],
|
||||
/// email contact template ////
|
||||
[
|
||||
'name' => esc_html__( 'Email Contact Templates (Template Tags)', 'opalestate-pro' ),
|
||||
@ -362,7 +390,6 @@ class Opalestate_Emails {
|
||||
'id' => 'opalestate_title_email_settings_6',
|
||||
'type' => 'title',
|
||||
],
|
||||
|
||||
[
|
||||
'id' => 'contact_email_subject',
|
||||
'name' => esc_html__( 'Email Subject', 'opalestate-pro' ),
|
||||
@ -380,15 +407,33 @@ class Opalestate_Emails {
|
||||
'id' => 'contact_email_body',
|
||||
'name' => esc_html__( 'Email Body', 'opalestate-pro' ),
|
||||
'type' => 'wysiwyg',
|
||||
'desc' => trim( preg_replace( '/\t+/', '', "Hi {receive_name},<br>
|
||||
You have got message from {name} with email {email}. Here is detail:
|
||||
<br>
|
||||
<br>
|
||||
{message}
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<em>This message was sent by {site_link} on {current_time}.</em>" ) ),
|
||||
'default' => OpalEstate_Send_Email_Notification::get_default_template()
|
||||
],
|
||||
/// Email Request Review ///
|
||||
[
|
||||
'name' => esc_html__( 'Email Request Review Templates (Template Tags)', 'opalestate-pro' ),
|
||||
'desc' => $contact_list_tags . '<br><hr>',
|
||||
'id' => 'opalestate_title_email_settings_7',
|
||||
'type' => 'title',
|
||||
],
|
||||
[
|
||||
'id' => 'request_review_email_subject',
|
||||
'name' => esc_html__( 'Email Subject', 'opalestate-pro' ),
|
||||
'type' => 'text',
|
||||
'desc' => esc_html__( 'The email subject a user should receive when they make an initial property request.', 'opalestate-pro' ),
|
||||
'attributes' => [
|
||||
'placeholder' => 'Your property at I Love WordPress is pending',
|
||||
get_bloginfo( 'name' ),
|
||||
'rows' => 3,
|
||||
],
|
||||
'default' =>esc_html__( 'You have a message request reviewing at: %s', 'opalestate-pro' ),
|
||||
],
|
||||
|
||||
[
|
||||
'id' => 'request_review_email_body',
|
||||
'name' => esc_html__( 'Email Body', 'opalestate-pro' ),
|
||||
'type' => 'wysiwyg',
|
||||
'default' => OpalEstate_Send_Email_Request_Reviewing::get_default_template()
|
||||
],
|
||||
]
|
||||
),
|
||||
|
@ -103,6 +103,7 @@ class OpalEstate_Enqueue {
|
||||
* Register and enqueue javascript, css library
|
||||
*/
|
||||
public function register_enqueue() {
|
||||
|
||||
wp_register_script(
|
||||
'jquery-modernizr',
|
||||
OPALESTATE_PLUGIN_URL . '/assets/3rd/magnific-popup/jquery.magnific-popup.min.js',
|
||||
@ -112,6 +113,7 @@ class OpalEstate_Enqueue {
|
||||
'4.4.3',
|
||||
true
|
||||
);
|
||||
|
||||
wp_enqueue_script( 'jquery-magnific-popup' );
|
||||
wp_register_script( 'jquery-sticky-kit', trailingslashit( OPALESTATE_PLUGIN_URL ) . 'assets/3rd/sticky/jquery.sticky-kit.min.js', [], null, true );
|
||||
wp_enqueue_script( 'jquery-sticky-kit' );
|
||||
@ -124,6 +126,7 @@ class OpalEstate_Enqueue {
|
||||
|
||||
wp_enqueue_script( 'jquery-toast' );
|
||||
|
||||
|
||||
wp_register_script(
|
||||
'jquery-swiper',
|
||||
OPALESTATE_PLUGIN_URL . '/assets/3rd/swiper/js/swiper.min.js',
|
||||
@ -134,6 +137,10 @@ class OpalEstate_Enqueue {
|
||||
true
|
||||
);
|
||||
|
||||
if( !defined("ELEMENTOR_VERSION") ) {
|
||||
wp_enqueue_style( 'jquery-swiper', OPALESTATE_PLUGIN_URL . '/assets/3rd/swiper/css/swiper.min.css' );
|
||||
}
|
||||
|
||||
wp_enqueue_script( 'jquery-swiper' );
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,11 @@ class OpalEstate_Send_Email_Approve extends OpalEstate_Abstract_Email_Template {
|
||||
*/
|
||||
public function get_subject () {
|
||||
$propety_title = '' ;
|
||||
return sprintf( esc_html__( 'New Property Listing Submitted: {property_name}', 'opalestate-pro' ), $propety_title );
|
||||
|
||||
$subject = sprintf( esc_html__( 'The Property Listing Approved: {property_name}', 'opalestate-pro' ), $propety_title );
|
||||
$subject = opalestate_options( 'approve_email_body' , $subject );
|
||||
|
||||
return $subject;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -58,7 +62,9 @@ class OpalEstate_Send_Email_Approve extends OpalEstate_Abstract_Email_Template {
|
||||
*
|
||||
*/
|
||||
public function get_content_template() {
|
||||
return opalestate_load_template_path( 'emails/request-reviewing' );
|
||||
|
||||
$content = opalestate_options( 'approve_email_body' , self::get_default_template() );
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -31,11 +31,17 @@ class OpalEstate_Send_Email_Notification extends OpalEstate_Abstract_Email_Templ
|
||||
public function get_subject () {
|
||||
switch ( $this->type ) {
|
||||
case 'enquiry':
|
||||
|
||||
$subject = html_entity_decode( esc_html__('You got a message enquiry', 'opalestate-pro') );
|
||||
$subject = opalestate_options( 'enquiry_email_subject', $subject );
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
$subject = html_entity_decode( esc_html__('You got a message contact', 'opalestate-pro') );
|
||||
$subject = opalestate_options( 'contact_email_subject', $subject );
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@ -46,14 +52,12 @@ class OpalEstate_Send_Email_Notification extends OpalEstate_Abstract_Email_Templ
|
||||
* Send Email
|
||||
*/
|
||||
public function get_content_template() {
|
||||
|
||||
switch ( $this->type ) {
|
||||
case 'enquiry':
|
||||
return opalestate_load_template_path( 'emails/enquiry' );
|
||||
return opalestate_options( 'enquiry_email_body', self::get_default_template( 'enquiry' ) );
|
||||
break;
|
||||
|
||||
default:
|
||||
return opalestate_load_template_path( 'emails/contact' );
|
||||
return opalestate_options( 'contact_email_body', self::get_default_template( ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -70,5 +74,15 @@ class OpalEstate_Send_Email_Notification extends OpalEstate_Abstract_Email_Templ
|
||||
$this->args['email'] = $this->args['receiver_email'];
|
||||
return parent::get_body();
|
||||
}
|
||||
|
||||
/***/
|
||||
public static function get_default_template ( $type='contact' ) {
|
||||
|
||||
if( $type == 'enquiry' ) {
|
||||
return opalestate_load_template_path( 'emails/enquiry' );
|
||||
}
|
||||
|
||||
return opalestate_load_template_path( 'emails/contact' );
|
||||
}
|
||||
}
|
||||
?>
|
@ -62,8 +62,7 @@ class OpalEstate_Send_Email_New_Submitted extends OpalEstate_Abstract_Email_Temp
|
||||
*/
|
||||
public function get_content_template() {
|
||||
|
||||
$body = opalestate_get_option( 'newproperty_email_body', self::newproperty_email_body() );
|
||||
|
||||
$body = opalestate_get_option( 'newproperty_email_body', self::get_default_template() );
|
||||
return $body;
|
||||
}
|
||||
|
||||
@ -103,7 +102,6 @@ class OpalEstate_Send_Email_New_Submitted extends OpalEstate_Abstract_Email_Temp
|
||||
* Send Email
|
||||
*/
|
||||
public function get_body() {
|
||||
|
||||
return parent::get_body();
|
||||
}
|
||||
}
|
||||
|
@ -29,14 +29,18 @@ class OpalEstate_Send_Email_Request_Reviewing extends OpalEstate_Abstract_Email_
|
||||
public function get_subject() {
|
||||
$propety_title = '';
|
||||
|
||||
return sprintf( esc_html__( 'You have a message request reviewing: %s at', 'opalestate-pro' ), $propety_title );
|
||||
$content = sprintf( esc_html__( 'You have a message request reviewing: %s at', 'opalestate-pro' ), $propety_title );
|
||||
$content = opalestate_options( 'request_review_email_subject', $content );
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send Email
|
||||
*/
|
||||
public function get_content_template() {
|
||||
return opalestate_load_template_path( 'emails/request-reviewing' );
|
||||
$content = opalestate_options( 'request_review_email_body', self::get_default_template() );
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -65,4 +69,9 @@ class OpalEstate_Send_Email_Request_Reviewing extends OpalEstate_Abstract_Email_
|
||||
|
||||
return parent::get_body();
|
||||
}
|
||||
|
||||
public static function get_default_template() {
|
||||
return opalestate_load_template_path( 'emails/request-reviewing' );
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -23,6 +23,17 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
*/
|
||||
class OpalEstate_Shortcodes {
|
||||
|
||||
/**
|
||||
* Get instance of this object
|
||||
*/
|
||||
public static function get_instance(){
|
||||
static $_instance;
|
||||
if( !$_instance ){
|
||||
$_instance = new OpalEstate_Shortcodes();
|
||||
}
|
||||
return $_instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Static $shortcodes
|
||||
*/
|
||||
@ -39,11 +50,11 @@ class OpalEstate_Shortcodes {
|
||||
'properties' => [ 'code' => 'properties', 'label' => esc_html__( 'Properties', 'opalestate-pro' ) ],
|
||||
'search_properties_result' => [ 'code' => 'search_properties_result', 'label' => esc_html__( 'Search Properties Result', 'opalestate-pro' ) ],
|
||||
'search_properties' => [ 'code' => 'search_properties', 'label' => esc_html__( 'Search Properties', 'opalestate-pro' ) ],
|
||||
'search_properties_v' => [ 'code' => 'search_properties_v', 'label' => esc_html__( 'Search Properties Vertical', 'opalestate-pro' ) ],
|
||||
'search_split_maps' => [ 'code' => 'search_split_maps', 'label' => esc_html__( 'Search Split Maps', 'opalestate-pro' ) ],
|
||||
|
||||
'search_map_properties' => [ 'code' => 'search_map_properties', 'label' => esc_html__( 'Show Map + Search Box and Properties', 'opalestate-pro' ) ],
|
||||
'ajax_map_search' => [ 'code' => 'ajax_map_search', 'label' => esc_html__( 'Ajax Search Map Properties And Horizontal Search', 'opalestate-pro' ) ],
|
||||
|
||||
'search_map_properties' => [ 'code' => 'search_map_properties', 'label' => esc_html__( 'Search Map Properties', 'opalestate-pro' ) ],
|
||||
'ajax_map_search' => [ 'code' => 'ajax_map_search', 'label' => esc_html__( 'Ajax Search Map Properties', 'opalestate-pro' ) ],
|
||||
'ajax_map_quick_search' => [ 'code' => 'ajax_map_quick_search', 'label' => esc_html__( 'Ajax Search Map Properties', 'opalestate-pro' ) ],
|
||||
'register_form' => [ 'code' => 'register_form', 'label' => esc_html__( 'Register User Form', 'opalestate-pro' ) ],
|
||||
'login_form' => [ 'code' => 'login_form', 'label' => esc_html__( 'Login Form', 'opalestate-pro' ) ],
|
||||
];
|
||||
@ -58,6 +69,9 @@ class OpalEstate_Shortcodes {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Display all properties follow user when logined
|
||||
*/
|
||||
public function shortcode_button() {
|
||||
|
||||
}
|
||||
@ -68,18 +82,66 @@ class OpalEstate_Shortcodes {
|
||||
public function search_properties_form ( $atts=[] ) {
|
||||
|
||||
$atts = is_array( $atts ) ? $atts : [];
|
||||
$layout = 'collapse-advanced';
|
||||
|
||||
$atts['hidden_labels'] = true;
|
||||
$default = array(
|
||||
'hidden_labels' => true,
|
||||
'display_more_options' => true,
|
||||
'nobutton' => false,
|
||||
'layout' => $layout
|
||||
);
|
||||
|
||||
return opalestate_load_template_path( 'search-box/collapse-advanced', $atts );
|
||||
$atts = array_merge( $default, $atts );
|
||||
|
||||
return opalestate_load_template_path( 'search-box/'.$layout, $atts );
|
||||
}
|
||||
|
||||
public function properties() {
|
||||
return opalestate_load_template_path( 'shortcodes/properties' );
|
||||
/**
|
||||
* Display all properties follow user when logined
|
||||
*/
|
||||
public function properties( $atts=[] ) {
|
||||
|
||||
$atts = is_array( $atts ) ? $atts : [];
|
||||
|
||||
$default = array (
|
||||
'posts_per_page' => 9,
|
||||
'show_pagination' => true,
|
||||
'column' => apply_filters( 'opalestate_properties_column_row', 3 ),
|
||||
'layout' => 'content-property-grid-v2',
|
||||
'showmode' => '',
|
||||
'categories' => null,
|
||||
'types' => null,
|
||||
'labels' => null,
|
||||
'cities' => null,
|
||||
'statuses' => null,
|
||||
|
||||
);
|
||||
|
||||
$atts = array_merge( $default, $atts );
|
||||
|
||||
return opalestate_load_template_path( 'shortcodes/properties', $atts );
|
||||
}
|
||||
|
||||
public function search_properties_result() {
|
||||
return opalestate_load_template_path( 'shortcodes/search-properties-result' );
|
||||
/**
|
||||
* [opalestate_search_properties_result] Display all properties follow user when logined
|
||||
*/
|
||||
public function search_properties_result( $atts=[] ) {
|
||||
|
||||
$atts = is_array( $atts ) ? $atts : [];
|
||||
|
||||
$default = array(
|
||||
'style' => null,
|
||||
'style_list' => null,
|
||||
'column' => null,
|
||||
);
|
||||
|
||||
$atts = array_merge( $default, $atts );
|
||||
|
||||
$html = '<div class="opalesate-properties-ajax opalesate-properties-results" data-mode="html">';
|
||||
$html .= opalestate_load_template_path( 'shortcodes/ajax-map-search-result', $atts );
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -99,25 +161,40 @@ class OpalEstate_Shortcodes {
|
||||
/**
|
||||
* Render search property page with vertical form and map
|
||||
*/
|
||||
public function search_properties_v() {
|
||||
return opalestate_load_template_path( 'shortcodes/search-properties-v', [ 'loop' => '' ] );
|
||||
public function search_split_maps( $atts=[] ) {
|
||||
|
||||
$atts = is_array( $atts ) ? $atts : [];
|
||||
|
||||
$default = array(
|
||||
'search_form' => 'simple-city',
|
||||
'paged' => 1
|
||||
);
|
||||
|
||||
$atts = array_merge( $default, $atts );
|
||||
|
||||
return opalestate_load_template_path( 'shortcodes/search-split-maps', $atts );
|
||||
}
|
||||
|
||||
/**
|
||||
* Render search property page with vertical form and map
|
||||
*/
|
||||
public function search_map_properties() {
|
||||
return opalestate_load_template_path( 'shortcodes/search-map-properties', [ 'loop' => '' ] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Render search property page with vertical form and map
|
||||
*/
|
||||
public function ajax_map_search() {
|
||||
wp_enqueue_script( 'sticky-kit', OPALESTATE_PLUGIN_URL . 'assets/js/jquery.sticky-kit.min.js' );
|
||||
|
||||
return opalestate_load_template_path( 'shortcodes/ajax-map-search', [ 'loop' => '' ] );
|
||||
}
|
||||
|
||||
public function ajax_map_quick_search() {
|
||||
return opalestate_load_template_path( 'shortcodes/ajax-map-quick-search', [ 'loop' => '' ] );
|
||||
}
|
||||
|
||||
/* register form show up */
|
||||
/*
|
||||
* Register form show up
|
||||
*/
|
||||
public function register_form( $atts = [] ) {
|
||||
$atts = shortcode_atts( [
|
||||
'message' => '',
|
||||
@ -128,7 +205,9 @@ class OpalEstate_Shortcodes {
|
||||
return opalestate_load_template_path( 'user/register-form', $atts );
|
||||
}
|
||||
|
||||
/* sign in show up */
|
||||
/*
|
||||
* sign in show up
|
||||
*/
|
||||
public function login_form( $atts = [] ) {
|
||||
$atts = shortcode_atts( [
|
||||
'message' => '',
|
||||
@ -141,4 +220,4 @@ class OpalEstate_Shortcodes {
|
||||
|
||||
}
|
||||
|
||||
new OpalEstate_Shortcodes();
|
||||
OpalEstate_Shortcodes::get_instance();
|
@ -219,7 +219,13 @@ add_action( 'opalestate_single_property_preview', 'opalestate_property_preview',
|
||||
|
||||
function opalestate_property_request_viewing_button( $islink = false ) {
|
||||
$class = $islink ? 'btn-link' : 'btn btn-primary';
|
||||
echo '<a href="#opalestate-user-form-popup" class="' . $class . ' btn-request-viewing opalestate-popup-button" data-target="#property-request-view-popup" >
|
||||
if ( ! is_user_logged_in() ) {
|
||||
$class .= ' opalestate-need-login';
|
||||
} else {
|
||||
$class .= ' opalestate-popup-button';
|
||||
}
|
||||
|
||||
echo '<a href="#opalestate-user-form-popup" class="' . $class . ' btn-request-viewing" data-target="#property-request-view-popup" >
|
||||
<i class="fa fa-calendar-check-o"></i>
|
||||
<span class="btn-request-viewing__text">' . esc_html__( 'Request Viewing', 'opalestate-pro' ) . '</span>
|
||||
</a>';
|
||||
@ -254,6 +260,10 @@ add_action( 'opalestate_single_property_layout', 'opalestate_single_property_lay
|
||||
* Forms
|
||||
*/
|
||||
function opalestate_property_request_view_form() {
|
||||
if ( ! is_user_logged_in() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! is_single_property() ) {
|
||||
return;
|
||||
}
|
||||
|
2
inc/vendors/opalmembership/membership.php
vendored
2
inc/vendors/opalmembership/membership.php
vendored
@ -89,7 +89,7 @@ class OpalEstate_Membership {
|
||||
add_action( 'opalmembership_dashboard_container_before', [ __CLASS__, 'check_membership_validation_message' ] );
|
||||
// included logic functions
|
||||
|
||||
require_once( 'free-package.php' );
|
||||
// require_once( 'free-package.php' );
|
||||
require_once( 'functions.php' );
|
||||
|
||||
add_action( 'opalmembership_current_package_summary_after', [ __CLASS__, 'render_membership_summary' ], 10, 2 );
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Plugin Name: Opal Estate Pro
|
||||
* Plugin URI: http://www.wpopal.com/product/opal-estate-wordpress-plugin/
|
||||
* Description: Opal Real Estate Plugin is an ideal solution and brilliant choice for you to set up a professional estate website.
|
||||
* Version: 1.0.7
|
||||
* Version: 1.0.8
|
||||
* Author: WPOPAL
|
||||
* Author URI: http://www.wpopal.com
|
||||
* Requires at least: 4.6
|
||||
|
15
readme.txt
15
readme.txt
@ -89,13 +89,18 @@ The plugin will not make you disappointed with ease of use, friendly & flexible
|
||||
-=-=-=-=-=-=-=-=-=- Shortcodes -=-=-=-=-=-=-=-=-=-
|
||||
|
||||
- [opalestate_search_properties] => Show Search Properties horizontal form
|
||||
- [opalestate_search_properties_v] => Show Search Properties vertical form
|
||||
- [opalestate_search_properties_result] => Show Search Results
|
||||
- [opalestate_search_map_properties] => Show Search Map Properties
|
||||
- [opalestate_ajax_map_search] => Ajax Search Map Properties
|
||||
- [opalestate_ajax_map_quick_search] => Ajax Search Map Properties
|
||||
- [opalestate_search_properties_result] => Show Collection Results Working with
|
||||
- [opalestate_search_map_properties] => Show Map + Search Box and Properties
|
||||
- [opalestate_search_split_maps] => Ajax Search Split Map With Collection
|
||||
- [opalestate_ajax_map_search] => Ajax Search Map Properties And Horizontal Search
|
||||
- [opalestate_register_form] => Register User Form
|
||||
- [opalestate_login_form] => Login Form
|
||||
- [opalestate_properties] => Display list of property estate in grid with pagination
|
||||
|
||||
- [opalestate_search_agents] => Dislay Search box and agents collection
|
||||
|
||||
- [opalestate_agent_carousel] => Display List of Agent in carousel style
|
||||
- [opalestate_agency_carousel] => Display List of Agency in carousel style
|
||||
|
||||
= Elementor Widgets =
|
||||
|
||||
|
@ -1,37 +1,10 @@
|
||||
<?php
|
||||
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
|
||||
$rowcls = apply_filters( 'opalestate_row_container_class', 'opal-row' );
|
||||
|
||||
$atts = array(
|
||||
'paged' => 1,
|
||||
'search_form' => $settings['search_form']
|
||||
);
|
||||
?>
|
||||
<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>
|
||||
<?php echo opalestate_load_template_path( 'shortcodes/search-split-maps', $atts ); ?>
|
@ -36,6 +36,9 @@ switch ( $supports[ $post_type ]['post_type'] ) {
|
||||
break;
|
||||
}
|
||||
|
||||
if( !is_object($object) ) {
|
||||
return;
|
||||
}
|
||||
$cpt_feature = $supports[ $post_type ]['features_cpt'];
|
||||
$features = Opalestate_Rating_Helper::get_features( $cpt_feature );
|
||||
|
||||
|
37
templates/shortcodes/agency-carousel.php
Normal file
37
templates/shortcodes/agency-carousel.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
$_id = time();
|
||||
$query = Opalestate_Query::get_agencies( array("posts_per_page"=>$limit, 'paged' => $paged), $onlyfeatured );
|
||||
$item = $column;
|
||||
$data = [
|
||||
'slidesPerView' => $item,
|
||||
'spaceBetween' => 30,
|
||||
'slidesPerGroup' => $item,
|
||||
'loop' => false,
|
||||
];
|
||||
|
||||
?>
|
||||
|
||||
<div class="opalesate-agency-carousel 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 = 5;
|
||||
$clscol = floor( 12 / $column );
|
||||
while ( $query->have_posts() ) : $query->the_post(); ?>
|
||||
<div class="swiper-slide">
|
||||
<?php echo opalestate_load_template_path( 'content-agency-grid' ); ?>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
|
||||
<?php if ( absint( $query->post_count ) > absint( $item ) ) : ?>
|
||||
<div class="swiper-pagination"></div>
|
||||
<div class="swiper-button-prev"> <i class="fas fa-angle-left"></i></div>
|
||||
<div class="swiper-button-next"> <i class="fas fa-angle-right"></i></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php echo opalestate_load_template_path( 'content-no-results' ); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
37
templates/shortcodes/agent-carousel.php
Normal file
37
templates/shortcodes/agent-carousel.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
$_id = time();
|
||||
$query = Opalestate_Query::get_agents( array("posts_per_page"=>$limit, 'paged' => $paged), $onlyfeatured );
|
||||
$item = $column;
|
||||
$data = [
|
||||
'slidesPerView' => $item,
|
||||
'spaceBetween' => 30,
|
||||
'slidesPerGroup' => $item,
|
||||
'loop' => false,
|
||||
];
|
||||
|
||||
?>
|
||||
|
||||
<div class="opalesate-agent-carousel 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 = 5;
|
||||
$clscol = floor( 12 / $column );
|
||||
while ( $query->have_posts() ) : $query->the_post(); ?>
|
||||
<div class="swiper-slide">
|
||||
<?php echo opalestate_load_template_path( 'content-agent-grid' ); ?>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
|
||||
<?php if ( absint( $query->post_count ) > absint( $item ) ) : ?>
|
||||
<div class="swiper-pagination"></div>
|
||||
<div class="swiper-button-prev"> <i class="fas fa-angle-left"></i></div>
|
||||
<div class="swiper-button-next"> <i class="fas fa-angle-right"></i></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php echo opalestate_load_template_path( 'content-no-results' ); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
@ -1,22 +1,45 @@
|
||||
<?php
|
||||
|
||||
$args = [
|
||||
'posts_per_page' => -1,
|
||||
'posts_per_page' => $posts_per_page,
|
||||
'showmode' => $showmode,
|
||||
'categories' => $categories,
|
||||
'types' => $types,
|
||||
'labels' => $labels,
|
||||
'cities' => $cities,
|
||||
'statuses' => $statuses,
|
||||
];
|
||||
|
||||
$query = Opalestate_Query::get_property_query( $args );
|
||||
|
||||
$class = 'column-item';
|
||||
$clscol = floor( 12 / $column );
|
||||
|
||||
?>
|
||||
|
||||
<div class="opalesate-property-collection">
|
||||
|
||||
<?php if ( $query->have_posts() ): ?>
|
||||
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
|
||||
<div class="column-item">
|
||||
<?php echo opalestate_load_template_path( 'content-property-grid-v2' ); ?>
|
||||
<div class="opal-row">
|
||||
<?php $cnt=0; while ( $query->have_posts() ) : $query->the_post(); ?>
|
||||
<?php
|
||||
$cls = '';
|
||||
if ( $cnt++ % $column == 0 ) {
|
||||
$cls .= ' first-child';
|
||||
}
|
||||
?>
|
||||
<div class="<?php echo $cls; ?> col-lg-<?php echo esc_attr( $clscol ); ?> col-md-<?php echo esc_attr( $clscol ); ?> col-sm-6" data-related="map" data-id="<?php echo
|
||||
esc_attr( $cnt - 1 );
|
||||
?>">
|
||||
<?php echo opalestate_load_template_path( $layout ); ?>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
|
||||
<?php if ( $query->max_num_pages > 1 && $show_pagination ): ?>
|
||||
<div class="w-pagination"><?php opalestate_pagination( $query->max_num_pages ); ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php else: ?>
|
||||
<?php echo opalestate_load_template_path( 'content-no-results' ); ?>
|
||||
<?php endif; ?>
|
||||
|
4
templates/shortcodes/search-agencies.php
Normal file
4
templates/shortcodes/search-agencies.php
Normal file
@ -0,0 +1,4 @@
|
||||
<div class="search-agency-form-wrap">
|
||||
<?php echo opalestate_load_template_path( 'parts/'.$form, array('current_uri' => $current_uri ) ); ?>
|
||||
</div>
|
||||
|
@ -1,5 +0,0 @@
|
||||
<div class="opalestate-search-properties-v">
|
||||
<div class="search-properies-form">
|
||||
<?php echo opalestate_load_template_path( 'parts/search-form-v' ); ?>
|
||||
</div>
|
||||
</div>
|
31
templates/shortcodes/search-split-maps.php
Executable file
31
templates/shortcodes/search-split-maps.php
Executable file
@ -0,0 +1,31 @@
|
||||
<div class="ajax-map-search-split full-width">
|
||||
<div class="inner">
|
||||
<div class="opal-row">
|
||||
<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/'.$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>
|
Loading…
Reference in New Issue
Block a user