diff --git a/.DS_Store b/.DS_Store index 8449ada3..6614a507 100755 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/inc/admin/property/class-property.php b/inc/admin/property/class-property.php index 17e904eb..77b90964 100755 --- a/inc/admin/property/class-property.php +++ b/inc/admin/property/class-property.php @@ -38,6 +38,7 @@ class Opalestate_Admin_Property { // add_action( 'transition_post_status', array( __CLASS__, 'save_post' ), 10, 3 ); } + /** * */ diff --git a/inc/agency/class-opalestate-agency-front.php b/inc/agency/class-opalestate-agency-front.php index 2b027d7f..f0301859 100755 --- a/inc/agency/class-opalestate-agency-front.php +++ b/inc/agency/class-opalestate-agency-front.php @@ -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 ); } /** diff --git a/inc/agency/class-opalestate-agency-query.php b/inc/agency/class-opalestate-agency-query.php index 068ce992..4dadfe4b 100755 --- a/inc/agency/class-opalestate-agency-query.php +++ b/inc/agency/class-opalestate-agency-query.php @@ -5,7 +5,7 @@ * @version $Id$ * @package $package$ * @author Opal Team - * @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 diff --git a/inc/agent/class-opalestate-agent-front.php b/inc/agent/class-opalestate-agent-front.php index d26f5b75..b366b1f6 100755 --- a/inc/agent/class-opalestate-agent-front.php +++ b/inc/agent/class-opalestate-agent-front.php @@ -3,7 +3,7 @@ * Opalestate_Agent_Front * * @author Opal Team - * @copyright Copyright (C) 2014 wpopal.com. All Rights Reserved. + * @copyright Copyright (C) 2019 wpopal.com. All Rights Reserved. */ // Exit if accessed directly @@ -307,14 +307,34 @@ 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 ) { + foreach ( $this->shortcodes as $shortcode ) { add_shortcode( 'opalestate_' . $shortcode['code'], [ $this, $shortcode['code'] ] ); } } + 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' ) ) { diff --git a/inc/agent/class-opalestate-agent-query.php b/inc/agent/class-opalestate-agent-query.php index 0258be50..4935b51d 100755 --- a/inc/agent/class-opalestate-agent-query.php +++ b/inc/agent/class-opalestate-agent-query.php @@ -5,7 +5,7 @@ * @version $Id$ * @package $package$ * @author Opal Team - * @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 diff --git a/inc/class-opalestate-email.php b/inc/class-opalestate-email.php index 83da6c80..7628d466 100755 --- a/inc/class-opalestate-email.php +++ b/inc/class-opalestate-email.php @@ -5,7 +5,7 @@ * @version $Id$ * @package $package$ * @author Opal Team - * @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' => '
', @@ -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 . '

', + '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},
- You have got message from {name} with email {email}. Here is detail: -
-
- {message} -
-  
-
- This message was sent by {site_link} on {current_time}." ) ), + '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 . '

', + '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() ], ] ), diff --git a/inc/class-opalestate-enqueue.php b/inc/class-opalestate-enqueue.php index bd4633f7..9c66857d 100755 --- a/inc/class-opalestate-enqueue.php +++ b/inc/class-opalestate-enqueue.php @@ -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', @@ -132,8 +135,12 @@ class OpalEstate_Enqueue { ], '4.4.3', 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' ); } diff --git a/inc/email/class-opalesate-approve.php b/inc/email/class-opalesate-approve.php index 00d73846..0f5f8441 100755 --- a/inc/email/class-opalesate-approve.php +++ b/inc/email/class-opalesate-approve.php @@ -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; } /** diff --git a/inc/email/class-opalestate-email-notifycation.php b/inc/email/class-opalestate-email-notifycation.php index 220a7d7d..b28eb837 100755 --- a/inc/email/class-opalestate-email-notifycation.php +++ b/inc/email/class-opalestate-email-notifycation.php @@ -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' ); + } } ?> \ No newline at end of file diff --git a/inc/email/class-opalestate-new-submitted.php b/inc/email/class-opalestate-new-submitted.php index 76cf91b6..efa4bfc4 100755 --- a/inc/email/class-opalestate-new-submitted.php +++ b/inc/email/class-opalestate-new-submitted.php @@ -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(); } } diff --git a/inc/email/class-opalestate-request-viewing.php b/inc/email/class-opalestate-request-viewing.php index 99ee9356..8eda4242 100755 --- a/inc/email/class-opalestate-request-viewing.php +++ b/inc/email/class-opalestate-request-viewing.php @@ -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' ); + } + } diff --git a/inc/property/class-opalestate-shortcodes.php b/inc/property/class-opalestate-shortcodes.php index 1357bb78..0c1d1fdf 100755 --- a/inc/property/class-opalestate-shortcodes.php +++ b/inc/property/class-opalestate-shortcodes.php @@ -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__( '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' ) ], + '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' ) ], + '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() { } @@ -67,19 +81,67 @@ class OpalEstate_Shortcodes { */ public function search_properties_form ( $atts=[] ) { - $atts = is_array( $atts ) ? $atts : []; + $atts = is_array( $atts ) ? $atts : []; + $layout = 'collapse-advanced'; + + $default = array( + 'hidden_labels' => true, + 'display_more_options' => true, + 'nobutton' => false, + 'layout' => $layout + ); - $atts['hidden_labels'] = true; + $atts = array_merge( $default, $atts ); - return opalestate_load_template_path( 'search-box/collapse-advanced', $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 = '
'; + $html .= opalestate_load_template_path( 'shortcodes/ajax-map-search-result', $atts ); + $html .= '
'; + + 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(); \ No newline at end of file diff --git a/inc/template-hook-functions.php b/inc/template-hook-functions.php index 8425c4f4..56bf6d48 100755 --- a/inc/template-hook-functions.php +++ b/inc/template-hook-functions.php @@ -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 ' + if ( ! is_user_logged_in() ) { + $class .= ' opalestate-need-login'; + } else { + $class .= ' opalestate-popup-button'; + } + + echo ' ' . esc_html__( 'Request Viewing', 'opalestate-pro' ) . ' '; @@ -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; } diff --git a/inc/vendors/opalmembership/membership.php b/inc/vendors/opalmembership/membership.php index 5796386b..e64fa2d4 100755 --- a/inc/vendors/opalmembership/membership.php +++ b/inc/vendors/opalmembership/membership.php @@ -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 ); diff --git a/opal-estate-pro.php b/opal-estate-pro.php index f373bd10..5c5935e2 100755 --- a/opal-estate-pro.php +++ b/opal-estate-pro.php @@ -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 diff --git a/readme.txt b/readme.txt index fa4a2604..cfe1b184 100755 --- a/readme.txt +++ b/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 = diff --git a/templates/elementor-templates/opalestate-agent-collection.php b/templates/elementor-templates/opalestate-agent-collection.php index 4453299e..4ff77659 100755 --- a/templates/elementor-templates/opalestate-agent-collection.php +++ b/templates/elementor-templates/opalestate-agent-collection.php @@ -39,7 +39,7 @@
have_posts() ): ?> -
+
> have_posts() ): $query->the_post(); ?>
diff --git a/templates/elementor-templates/opalestate-split-maps-search.php b/templates/elementor-templates/opalestate-split-maps-search.php index 3e34fee7..ef74be28 100755 --- a/templates/elementor-templates/opalestate-split-maps-search.php +++ b/templates/elementor-templates/opalestate-split-maps-search.php @@ -1,37 +1,10 @@ 1, + 'search_form' => $settings['search_form'] +); ?> -
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
- true ] ); ?> -
- -
- 2 ] ); ?> -
-
-
-
-
-
+ \ No newline at end of file diff --git a/templates/rating/opalestate-ratings.php b/templates/rating/opalestate-ratings.php index a0468f6c..44c2b5f7 100755 --- a/templates/rating/opalestate-ratings.php +++ b/templates/rating/opalestate-ratings.php @@ -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 ); diff --git a/templates/shortcodes/agency-carousel.php b/templates/shortcodes/agency-carousel.php new file mode 100644 index 00000000..86ae6ab5 --- /dev/null +++ b/templates/shortcodes/agency-carousel.php @@ -0,0 +1,37 @@ +$limit, 'paged' => $paged), $onlyfeatured ); +$item = $column; +$data = [ + 'slidesPerView' => $item, + 'spaceBetween' => 30, + 'slidesPerGroup' => $item, + 'loop' => false, +]; + +?> + + \ No newline at end of file diff --git a/templates/shortcodes/agent-carousel.php b/templates/shortcodes/agent-carousel.php new file mode 100644 index 00000000..d6b8a50e --- /dev/null +++ b/templates/shortcodes/agent-carousel.php @@ -0,0 +1,37 @@ +$limit, 'paged' => $paged), $onlyfeatured ); +$item = $column; +$data = [ + 'slidesPerView' => $item, + 'spaceBetween' => 30, + 'slidesPerGroup' => $item, + 'loop' => false, +]; + +?> + + \ No newline at end of file diff --git a/templates/shortcodes/properties.php b/templates/shortcodes/properties.php index 635a16a5..e7da2fac 100755 --- a/templates/shortcodes/properties.php +++ b/templates/shortcodes/properties.php @@ -1,22 +1,45 @@ -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 ); + ?>
have_posts() ): ?> - have_posts() ) : $query->the_post(); ?> -
- -
- +
+ have_posts() ) : $query->the_post(); ?> + +
+ +
+ +
+ + max_num_pages > 1 && $show_pagination ): ?> +
max_num_pages ); ?>
+ + diff --git a/templates/shortcodes/search-agencies.php b/templates/shortcodes/search-agencies.php new file mode 100644 index 00000000..75e3805b --- /dev/null +++ b/templates/shortcodes/search-agencies.php @@ -0,0 +1,4 @@ +
+ $current_uri ) ); ?> +
+ \ No newline at end of file diff --git a/templates/shortcodes/search-properties-v.php b/templates/shortcodes/search-properties-v.php deleted file mode 100755 index eeca23af..00000000 --- a/templates/shortcodes/search-properties-v.php +++ /dev/null @@ -1,5 +0,0 @@ -
-
- -
-
diff --git a/templates/shortcodes/search-split-maps.php b/templates/shortcodes/search-split-maps.php new file mode 100755 index 00000000..d2ea7c8c --- /dev/null +++ b/templates/shortcodes/search-split-maps.php @@ -0,0 +1,31 @@ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true ] ); ?> +
+ +
+ 2 ] ); ?> +
+
+
+
+
+