uapte
This commit is contained in:
parent
d8a0462533
commit
1d8c6dd6f8
@ -38,6 +38,7 @@ class Opalestate_Admin_Property {
|
|||||||
|
|
||||||
// add_action( 'transition_post_status', array( __CLASS__, 'save_post' ), 10, 3 );
|
// add_action( 'transition_post_status', array( __CLASS__, 'save_post' ), 10, 3 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -310,11 +310,29 @@ class Opalestate_Agency_Front {
|
|||||||
public function register_shortcodes() {
|
public function register_shortcodes() {
|
||||||
$this->shortcodes = [
|
$this->shortcodes = [
|
||||||
'search_agencies' => [ 'code' => 'search_agencies', 'label' => esc_html__( 'Search Agencies', 'opalestate-pro' ) ],
|
'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 ) {
|
foreach ( $this->shortcodes as $shortcode ) {
|
||||||
add_shortcode( 'opalestate_' . $shortcode['code'], [ $this, $shortcode['code'] ] );
|
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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* @version $Id$
|
* @version $Id$
|
||||||
* @package $package$
|
* @package $package$
|
||||||
* @author Opal Team <info@wpopal.com >
|
* @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
|
* @license GNU/GPL v2 or later http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
*
|
*
|
||||||
* @website http://www.wpopal.com
|
* @website http://www.wpopal.com
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Opalestate_Agent_Front
|
* Opalestate_Agent_Front
|
||||||
*
|
*
|
||||||
* @author Opal Team <info@wpopal.com >
|
* @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
|
// 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' ) ],
|
'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' ) ],
|
'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'] ] );
|
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 ) {
|
public function archives_query( $query ) {
|
||||||
|
|
||||||
if ( $query->is_main_query() && is_post_type_archive( 'opalestate_agent' ) ) {
|
if ( $query->is_main_query() && is_post_type_archive( 'opalestate_agent' ) ) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* @version $Id$
|
* @version $Id$
|
||||||
* @package $package$
|
* @package $package$
|
||||||
* @author Opal Team <info@wpopal.com >
|
* @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
|
* @license GNU/GPL v2 or later http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
*
|
*
|
||||||
* @website http://www.wpopal.com
|
* @website http://www.wpopal.com
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* @version $Id$
|
* @version $Id$
|
||||||
* @package $package$
|
* @package $package$
|
||||||
* @author Opal Team <info@wpopal.com >
|
* @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
|
* @license GNU/GPL v2 or later http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
*
|
*
|
||||||
* @website http://www.wpopal.com
|
* @website http://www.wpopal.com
|
||||||
@ -287,6 +287,9 @@ class Opalestate_Emails {
|
|||||||
],
|
],
|
||||||
|
|
||||||
|
|
||||||
|
//------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
[
|
[
|
||||||
'name' => esc_html__( 'Notification For New Property Submission', 'opalestate-pro' ),
|
'name' => esc_html__( 'Notification For New Property Submission', 'opalestate-pro' ),
|
||||||
'desc' => '<hr>',
|
'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' ),
|
'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(),
|
'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 ////
|
/// email contact template ////
|
||||||
[
|
[
|
||||||
'name' => esc_html__( 'Email Contact Templates (Template Tags)', 'opalestate-pro' ),
|
'name' => esc_html__( 'Email Contact Templates (Template Tags)', 'opalestate-pro' ),
|
||||||
@ -362,7 +390,6 @@ class Opalestate_Emails {
|
|||||||
'id' => 'opalestate_title_email_settings_6',
|
'id' => 'opalestate_title_email_settings_6',
|
||||||
'type' => 'title',
|
'type' => 'title',
|
||||||
],
|
],
|
||||||
|
|
||||||
[
|
[
|
||||||
'id' => 'contact_email_subject',
|
'id' => 'contact_email_subject',
|
||||||
'name' => esc_html__( 'Email Subject', 'opalestate-pro' ),
|
'name' => esc_html__( 'Email Subject', 'opalestate-pro' ),
|
||||||
@ -380,15 +407,33 @@ class Opalestate_Emails {
|
|||||||
'id' => 'contact_email_body',
|
'id' => 'contact_email_body',
|
||||||
'name' => esc_html__( 'Email Body', 'opalestate-pro' ),
|
'name' => esc_html__( 'Email Body', 'opalestate-pro' ),
|
||||||
'type' => 'wysiwyg',
|
'type' => 'wysiwyg',
|
||||||
'desc' => trim( preg_replace( '/\t+/', '', "Hi {receive_name},<br>
|
'default' => OpalEstate_Send_Email_Notification::get_default_template()
|
||||||
You have got message from {name} with email {email}. Here is detail:
|
],
|
||||||
<br>
|
/// Email Request Review ///
|
||||||
<br>
|
[
|
||||||
{message}
|
'name' => esc_html__( 'Email Request Review Templates (Template Tags)', 'opalestate-pro' ),
|
||||||
<br>
|
'desc' => $contact_list_tags . '<br><hr>',
|
||||||
<br>
|
'id' => 'opalestate_title_email_settings_7',
|
||||||
<br>
|
'type' => 'title',
|
||||||
<em>This message was sent by {site_link} on {current_time}.</em>" ) ),
|
],
|
||||||
|
[
|
||||||
|
'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
|
* Register and enqueue javascript, css library
|
||||||
*/
|
*/
|
||||||
public function register_enqueue() {
|
public function register_enqueue() {
|
||||||
|
|
||||||
wp_register_script(
|
wp_register_script(
|
||||||
'jquery-modernizr',
|
'jquery-modernizr',
|
||||||
OPALESTATE_PLUGIN_URL . '/assets/3rd/magnific-popup/jquery.magnific-popup.min.js',
|
OPALESTATE_PLUGIN_URL . '/assets/3rd/magnific-popup/jquery.magnific-popup.min.js',
|
||||||
@ -112,6 +113,7 @@ class OpalEstate_Enqueue {
|
|||||||
'4.4.3',
|
'4.4.3',
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
wp_enqueue_script( 'jquery-magnific-popup' );
|
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_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' );
|
wp_enqueue_script( 'jquery-sticky-kit' );
|
||||||
@ -124,6 +126,7 @@ class OpalEstate_Enqueue {
|
|||||||
|
|
||||||
wp_enqueue_script( 'jquery-toast' );
|
wp_enqueue_script( 'jquery-toast' );
|
||||||
|
|
||||||
|
|
||||||
wp_register_script(
|
wp_register_script(
|
||||||
'jquery-swiper',
|
'jquery-swiper',
|
||||||
OPALESTATE_PLUGIN_URL . '/assets/3rd/swiper/js/swiper.min.js',
|
OPALESTATE_PLUGIN_URL . '/assets/3rd/swiper/js/swiper.min.js',
|
||||||
@ -132,8 +135,12 @@ class OpalEstate_Enqueue {
|
|||||||
],
|
],
|
||||||
'4.4.3',
|
'4.4.3',
|
||||||
true
|
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' );
|
wp_enqueue_script( 'jquery-swiper' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,11 @@ class OpalEstate_Send_Email_Approve extends OpalEstate_Abstract_Email_Template {
|
|||||||
*/
|
*/
|
||||||
public function get_subject () {
|
public function get_subject () {
|
||||||
$propety_title = '' ;
|
$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() {
|
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 () {
|
public function get_subject () {
|
||||||
switch ( $this->type ) {
|
switch ( $this->type ) {
|
||||||
case 'enquiry':
|
case 'enquiry':
|
||||||
|
|
||||||
$subject = html_entity_decode( esc_html__('You got a message enquiry', 'opalestate-pro') );
|
$subject = html_entity_decode( esc_html__('You got a message enquiry', 'opalestate-pro') );
|
||||||
|
$subject = opalestate_options( 'enquiry_email_subject', $subject );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
$subject = html_entity_decode( esc_html__('You got a message contact', 'opalestate-pro') );
|
$subject = html_entity_decode( esc_html__('You got a message contact', 'opalestate-pro') );
|
||||||
|
$subject = opalestate_options( 'contact_email_subject', $subject );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,14 +52,12 @@ class OpalEstate_Send_Email_Notification extends OpalEstate_Abstract_Email_Templ
|
|||||||
* Send Email
|
* Send Email
|
||||||
*/
|
*/
|
||||||
public function get_content_template() {
|
public function get_content_template() {
|
||||||
|
|
||||||
switch ( $this->type ) {
|
switch ( $this->type ) {
|
||||||
case 'enquiry':
|
case 'enquiry':
|
||||||
return opalestate_load_template_path( 'emails/enquiry' );
|
return opalestate_options( 'enquiry_email_body', self::get_default_template( 'enquiry' ) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return opalestate_load_template_path( 'emails/contact' );
|
return opalestate_options( 'contact_email_body', self::get_default_template( ) );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -70,5 +74,15 @@ class OpalEstate_Send_Email_Notification extends OpalEstate_Abstract_Email_Templ
|
|||||||
$this->args['email'] = $this->args['receiver_email'];
|
$this->args['email'] = $this->args['receiver_email'];
|
||||||
return parent::get_body();
|
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() {
|
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;
|
return $body;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,7 +102,6 @@ class OpalEstate_Send_Email_New_Submitted extends OpalEstate_Abstract_Email_Temp
|
|||||||
* Send Email
|
* Send Email
|
||||||
*/
|
*/
|
||||||
public function get_body() {
|
public function get_body() {
|
||||||
|
|
||||||
return parent::get_body();
|
return parent::get_body();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,14 +29,18 @@ class OpalEstate_Send_Email_Request_Reviewing extends OpalEstate_Abstract_Email_
|
|||||||
public function get_subject() {
|
public function get_subject() {
|
||||||
$propety_title = '';
|
$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
|
* Send Email
|
||||||
*/
|
*/
|
||||||
public function get_content_template() {
|
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();
|
return parent::get_body();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function get_default_template() {
|
||||||
|
return opalestate_load_template_path( 'emails/request-reviewing' );
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Plugin Name: Opal Estate Pro
|
* Plugin Name: Opal Estate Pro
|
||||||
* Plugin URI: http://www.wpopal.com/product/opal-estate-wordpress-plugin/
|
* 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.
|
* 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: WPOPAL
|
||||||
* Author URI: http://www.wpopal.com
|
* Author URI: http://www.wpopal.com
|
||||||
* Requires at least: 4.6
|
* Requires at least: 4.6
|
||||||
|
@ -99,6 +99,9 @@ The plugin will not make you disappointed with ease of use, friendly & flexible
|
|||||||
|
|
||||||
- [opalestate_search_agents] => Dislay Search box and agents collection
|
- [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 =
|
= Elementor Widgets =
|
||||||
|
|
||||||
* Search: Property Form
|
* Search: Property Form
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<div class="agents-collection-wrap">
|
<div class="agents-collection-wrap">
|
||||||
<?php if( $query->have_posts() ): ?>
|
<?php if( $query->have_posts() ): ?>
|
||||||
<div class="agents-container">
|
<div class="agents-container">
|
||||||
<div <?php echo $attrs; ?>>
|
<div <?php echo $attrs; ?>>
|
||||||
<?php $cnt=0; while( $query->have_posts() ): $query->the_post(); ?>
|
<?php $cnt=0; while( $query->have_posts() ): $query->the_post(); ?>
|
||||||
<div class="column-item ">
|
<div class="column-item ">
|
||||||
|
@ -36,6 +36,9 @@ switch ( $supports[ $post_type ]['post_type'] ) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( !is_object($object) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
$cpt_feature = $supports[ $post_type ]['features_cpt'];
|
$cpt_feature = $supports[ $post_type ]['features_cpt'];
|
||||||
$features = Opalestate_Rating_Helper::get_features( $cpt_feature );
|
$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>
|
Loading…
Reference in New Issue
Block a user