commit
448e838cbc
@ -1,8 +1,4 @@
|
||||
jQuery( document ).ready( function ( $ ) {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
$( '#show-user-sidebar-btn' ).click( function () {
|
||||
$( 'body' ).toggleClass( 'active' );
|
||||
} );
|
||||
@ -313,8 +309,7 @@ jQuery( document ).ready( function ( $ ) {
|
||||
/**
|
||||
* Login form
|
||||
**/
|
||||
$( 'body' ).delegate( '.opalestate-mfp-popup form.opalestate-login-form', 'submit', function () {
|
||||
|
||||
$( 'form.opalestate-login-form' ).on( 'submit', function () {
|
||||
var $form = $( this );
|
||||
$.ajax( {
|
||||
type: 'POST',
|
||||
@ -331,17 +326,15 @@ jQuery( document ).ready( function ( $ ) {
|
||||
$form.find( '.opalestate-notice' ).remove();
|
||||
$form.prepend( data.message );
|
||||
}
|
||||
|
||||
}
|
||||
} );
|
||||
return false;
|
||||
} );
|
||||
|
||||
/**
|
||||
* Login form
|
||||
* Register form
|
||||
**/
|
||||
$( 'body' ).delegate( '.opalestate-mfp-popup form.opalestate-register-form', 'submit', function () {
|
||||
|
||||
$( 'form.opalestate-register-form' ).on( 'submit', function () {
|
||||
var $form = $( this );
|
||||
$.ajax( {
|
||||
type: 'POST',
|
||||
@ -358,11 +351,11 @@ jQuery( document ).ready( function ( $ ) {
|
||||
$form.find( '.opalestate-notice' ).remove();
|
||||
$form.prepend( data.message );
|
||||
}
|
||||
|
||||
}
|
||||
} );
|
||||
return false;
|
||||
} );
|
||||
|
||||
/**
|
||||
* AJAX ACTION
|
||||
*/
|
||||
|
@ -3997,3 +3997,7 @@ header#masthead {
|
||||
background: #2f73e9;
|
||||
position: absolute;
|
||||
top: 0; }
|
||||
|
||||
.opalestate-notice {
|
||||
padding: 10px;
|
||||
}
|
||||
|
@ -29,17 +29,20 @@ class Opalestate_Emails {
|
||||
public static function init() {
|
||||
self::load();
|
||||
|
||||
add_action( 'opalestate_processed_new_submission', [ __CLASS__, 'new_submission_email' ], 10, 2 );
|
||||
add_action( 'opalestate_processed_new_submission', [ __CLASS__, 'admin_new_submission_email' ], 15, 2 );
|
||||
//add_action( 'opalestate_processed_edit_submission' , array( __CLASS__ , 'new_submission_email'), 10, 2 );
|
||||
if ( is_admin() ) {
|
||||
add_filter( 'opalestate_settings_tabs', [ __CLASS__, 'setting_email_tab' ], 1 );
|
||||
add_filter( 'opalestate_registered_emails_settings', [ __CLASS__, 'setting_email_fields' ], 10, 1 );
|
||||
}
|
||||
|
||||
$enable_approve_property_email = opalestate_get_option( 'enable_approve_property_email' );
|
||||
if ( 'on' === opalestate_get_option( 'enable_customer_new_submission', 'on' ) ) {
|
||||
add_action( 'opalestate_processed_new_submission', [ __CLASS__, 'new_submission_email' ], 10, 2 );
|
||||
}
|
||||
|
||||
if ( $enable_approve_property_email == 'on' ) {
|
||||
if ( 'on' === opalestate_get_option( 'enable_admin_new_submission', 'on' ) ) {
|
||||
add_action( 'opalestate_processed_new_submission', [ __CLASS__, 'admin_new_submission_email' ], 15, 2 );
|
||||
}
|
||||
|
||||
if ( 'on' === opalestate_get_option( 'enable_approve_property_email', 'on' ) ) {
|
||||
add_action( 'transition_post_status', [ __CLASS__, 'send_email_when_publish_property' ], 10, 3 );
|
||||
add_action( 'opalestate_processed_approve_publish_property', [ __CLASS__, 'approve_publish_property_email' ], 10, 1 );
|
||||
}
|
||||
@ -342,11 +345,22 @@ class Opalestate_Emails {
|
||||
|
||||
//------------------------------------------
|
||||
[
|
||||
'name' => esc_html__( 'Notification For New Property Submission (Customer)', 'opalestate-pro' ),
|
||||
'name' => esc_html__( 'New Property Submission (Customer)', 'opalestate-pro' ),
|
||||
'desc' => '<hr>',
|
||||
'id' => 'opalestate_title_email_settings_3',
|
||||
'type' => 'title',
|
||||
],
|
||||
[
|
||||
'name' => esc_html__( 'Enable', 'opalestate-pro' ),
|
||||
'desc' => esc_html__( 'Enable email for customers when they have a submission.', 'opalestate-pro' ),
|
||||
'id' => 'enable_customer_new_submission',
|
||||
'type' => 'switch',
|
||||
'options' => [
|
||||
'on' => esc_html__( 'Enable', 'opalestate-pro' ),
|
||||
'off' => esc_html__( 'Disable', 'opalestate-pro' ),
|
||||
],
|
||||
'default' => 'on',
|
||||
],
|
||||
[
|
||||
'id' => 'newproperty_email_subject',
|
||||
'name' => esc_html__( 'Email Subject', 'opalestate-pro' ),
|
||||
@ -368,10 +382,22 @@ class Opalestate_Emails {
|
||||
//------------------------------------------
|
||||
|
||||
[
|
||||
'name' => esc_html__( 'Notification For New Property Submission (Admin)', 'opalestate-pro' ),
|
||||
'name' => esc_html__( 'New Property Submission (Admin)', 'opalestate-pro' ),
|
||||
'desc' => '<hr>',
|
||||
'id' => 'opalestate_title_email_settings_admin',
|
||||
'type' => 'title',
|
||||
'before_row' => '<hr>',
|
||||
],
|
||||
[
|
||||
'name' => esc_html__( 'Enable', 'opalestate-pro' ),
|
||||
'desc' => esc_html__( 'Enable email for admin when a property is submitted.', 'opalestate-pro' ),
|
||||
'id' => 'enable_admin_new_submission',
|
||||
'type' => 'switch',
|
||||
'options' => [
|
||||
'on' => esc_html__( 'Enable', 'opalestate-pro' ),
|
||||
'off' => esc_html__( 'Disable', 'opalestate-pro' ),
|
||||
],
|
||||
'default' => 'on',
|
||||
],
|
||||
[
|
||||
'id' => 'admin_newproperty_email_subject',
|
||||
@ -394,12 +420,12 @@ class Opalestate_Emails {
|
||||
//------------------------------------------
|
||||
|
||||
[
|
||||
'name' => esc_html__( 'Approve property for publish', 'opalestate-pro' ),
|
||||
'name' => esc_html__( 'Approved property for publish (Customer)', 'opalestate-pro' ),
|
||||
'desc' => '<hr>',
|
||||
'id' => 'opalestate_title_email_settings_4',
|
||||
'type' => 'title',
|
||||
'before_row' => '<hr>',
|
||||
],
|
||||
|
||||
[
|
||||
'name' => esc_html__( 'Enable approve property email', 'opalestate-pro' ),
|
||||
'desc' => esc_html__( 'Enable approve property email.', 'opalestate-pro' ),
|
||||
@ -409,9 +435,8 @@ class Opalestate_Emails {
|
||||
'on' => esc_html__( 'Enable', 'opalestate-pro' ),
|
||||
'off' => esc_html__( 'Disable', 'opalestate-pro' ),
|
||||
],
|
||||
'default' => 'off',
|
||||
'default' => 'on',
|
||||
],
|
||||
|
||||
[
|
||||
'id' => 'approve_email_subject',
|
||||
'name' => esc_html__( 'Email Subject', 'opalestate-pro' ),
|
||||
@ -438,6 +463,7 @@ class Opalestate_Emails {
|
||||
'desc' => $contact_list_tags . '<br><hr>',
|
||||
'id' => 'opalestate_title_email_settings_6_1',
|
||||
'type' => 'title',
|
||||
'before_row' => '<hr>',
|
||||
],
|
||||
[
|
||||
'id' => 'enquiry_email_subject',
|
||||
@ -464,6 +490,7 @@ class Opalestate_Emails {
|
||||
'desc' => $contact_list_tags . '<br><hr>',
|
||||
'id' => 'opalestate_title_email_settings_6',
|
||||
'type' => 'title',
|
||||
'before_row' => '<hr>',
|
||||
],
|
||||
[
|
||||
'id' => 'contact_email_subject',
|
||||
@ -490,6 +517,7 @@ class Opalestate_Emails {
|
||||
'desc' => $review_list_tags . '<br><hr>',
|
||||
'id' => 'opalestate_title_email_settings_7',
|
||||
'type' => 'title',
|
||||
'before_row' => '<hr>',
|
||||
],
|
||||
[
|
||||
'id' => 'request_review_email_subject',
|
||||
|
@ -128,6 +128,10 @@ class Opalestate_Install {
|
||||
$options['enable_agency_reviews'] = 'on';
|
||||
$options['enable_agent_reviews'] = 'on';
|
||||
|
||||
$options['enable_customer_new_submission'] = 'on';
|
||||
$options['enable_admin_new_submission'] = 'on';
|
||||
$options['enable_approve_property_email'] = 'on';
|
||||
|
||||
$options['admin_approve'] = 'on';
|
||||
$options['enable_submission_tab_media'] = 'on';
|
||||
$options['enable_submission_tab_location'] = 'on';
|
||||
|
@ -741,6 +741,10 @@ function opalestate_get_property_walkscore_results( $property ) {
|
||||
|
||||
$map = $property->get_map();
|
||||
|
||||
if ( ! $map || ! is_array( $map ) || ! isset( $map['latitude'] ) || ! isset( $map['longitude'] ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$latitude = $map['latitude'];
|
||||
$longitude = $map['longitude'];
|
||||
|
||||
|
@ -3,11 +3,11 @@
|
||||
* Plugin Name: Opal Estate Pro
|
||||
* Plugin URI: https://wpdocs.gitbook.io/opal-estate/
|
||||
* Description: Opal Real Estate Plugin is an ideal solution and brilliant choice for you to set up a professional estate website.
|
||||
* Version: 1.1.9.3
|
||||
* Version: 1.2
|
||||
* Author: WPOPAL
|
||||
* Author URI: http://www.wpopal.com
|
||||
* Requires at least: 4.6
|
||||
* Tested up to: 5.2.3
|
||||
* Tested up to: 5.3
|
||||
* Text Domain: opalestate-pro
|
||||
* Domain Path: languages/
|
||||
*
|
||||
@ -151,7 +151,7 @@ if ( ! class_exists( 'OpalEstate' ) ) {
|
||||
*/
|
||||
public function __clone() {
|
||||
// Cloning instances of the class is forbidden
|
||||
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'opalestate-pro' ), '1.1.9.3' );
|
||||
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'opalestate-pro' ), '1.2' );
|
||||
}
|
||||
|
||||
/**
|
||||
@ -160,7 +160,7 @@ if ( ! class_exists( 'OpalEstate' ) ) {
|
||||
public function setup_constants() {
|
||||
// Plugin version
|
||||
if ( ! defined( 'OPALESTATE_VERSION' ) ) {
|
||||
define( 'OPALESTATE_VERSION', '1.1.9.3' );
|
||||
define( 'OPALESTATE_VERSION', '1.2' );
|
||||
}
|
||||
|
||||
// Plugin Folder Path
|
||||
|
@ -3,8 +3,8 @@ Contributors: wpopal
|
||||
Donate link: https://wpdocs.gitbook.io/opal-estate/
|
||||
Tags: estate, property, opalestate, house for rent, agency for lease, estate submission, agents estate property, property marketplace
|
||||
Requires at least: 4.6
|
||||
Tested up to: 5.2.3
|
||||
Stable tag: 1.1.9.3
|
||||
Tested up to: 5.3
|
||||
Stable tag: 1.2
|
||||
License: GPLv3
|
||||
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
@ -156,6 +156,10 @@ This section describes how to install the plugin and get it working.
|
||||
* System tickets support 24/7 available : [free support](https://wpopal.ticksy.com/ "Visit the Plugin support Page")
|
||||
|
||||
== Changelog ==
|
||||
= 1.2 - 2019-12-04 =
|
||||
* Fixes - Login ajax.
|
||||
* Added - Enable email settings.
|
||||
|
||||
= 1.1.9.3 - 2019-11-27 =
|
||||
* Fixes - Measurement Unit translation.
|
||||
|
||||
|
@ -16,6 +16,10 @@ if ( ! $categories ) {
|
||||
|
||||
$map = $property->get_map();
|
||||
|
||||
if ( ! $map || ! is_array( $map ) || ! isset( $map['latitude'] ) || ! isset( $map['longitude'] ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$latitude = $map['latitude'];
|
||||
$longitude = $map['longitude'];
|
||||
if ( ! $latitude || ! $longitude ) {
|
||||
|
Loading…
Reference in New Issue
Block a user