commit
351970ff99
File diff suppressed because it is too large
Load Diff
@ -22,25 +22,24 @@ class Opalestate_Settings_3rd_party_Tab extends Opalestate_Settings_Base_Tab {
|
|||||||
|
|
||||||
public function get_subtabs() {
|
public function get_subtabs() {
|
||||||
|
|
||||||
$tabs = (array)apply_filters (
|
$tabs = [
|
||||||
'opalestate_settings_3rd_party_subtabs_nav', array()
|
'google_map' => esc_html__( 'Google Map', 'opalestate-pro' ),
|
||||||
);
|
'yelp' => esc_html__( 'Yelp', 'opalestate-pro' ),
|
||||||
|
'walkcore' => esc_html__( 'Walkcore', 'opalestate-pro' ),
|
||||||
|
];
|
||||||
|
|
||||||
$tabs = array_merge_recursive( $tabs, array(
|
$tabs = (array) apply_filters( 'opalestate_settings_3rd_party_subtabs_nav', $tabs );
|
||||||
'yelp' => "Yelp",
|
|
||||||
'walkcore' => "Walkcore"
|
|
||||||
) );
|
|
||||||
|
|
||||||
return $tabs;
|
return $tabs;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function get_subtabs_content( $key ="" ) {
|
public function get_subtabs_content( $key = '' ) {
|
||||||
// echo $key;die;
|
$fields = apply_filters( 'opalestate_settings_3rd_party_subtabs_' . $key . '_fields', [] );
|
||||||
$fields = apply_filters ( 'opalestate_settings_3rd_party_subtabs_'.$key.'_fields', array() );
|
if ( 'google_map' == $key ) {
|
||||||
|
$fields = $this->get_google_map_fields();
|
||||||
if( $key == 'yelp' ){
|
} elseif ( 'yelp' == $key ) {
|
||||||
$fields = $this->get_yelp_fields();
|
$fields = $this->get_yelp_fields();
|
||||||
}else if( $key == 'walkcore' ){
|
} elseif ( 'walkcore' == $key ) {
|
||||||
$fields = $this->get_walkscore_fields();
|
$fields = $this->get_walkscore_fields();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,12 +47,48 @@ class Opalestate_Settings_3rd_party_Tab extends Opalestate_Settings_Base_Tab {
|
|||||||
'id' => 'options_page',
|
'id' => 'options_page',
|
||||||
'opalestate_title' => esc_html__( '3rd Party Settings', 'opalestate-pro' ),
|
'opalestate_title' => esc_html__( '3rd Party Settings', 'opalestate-pro' ),
|
||||||
'show_on' => [ 'key' => 'options-page', 'value' => [ $key ], ],
|
'show_on' => [ 'key' => 'options-page', 'value' => [ $key ], ],
|
||||||
'fields' => (array)$fields
|
'fields' => (array) $fields,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_google_map_fields() {
|
||||||
|
return [
|
||||||
|
[
|
||||||
|
'name' => esc_html__( 'API key', 'opalestate-pro' ),
|
||||||
|
'desc' => __( 'You need to register <a href="https://developers.google.com/maps/documentation/javascript/get-api-key" target="_blank">Google API Key</a>, then put the key in this setting.',
|
||||||
|
'opalestate-pro' ),
|
||||||
|
'id' => 'google_map_api_keys',
|
||||||
|
'type' => 'text',
|
||||||
|
'default' => 'AIzaSyCfMVNIa7khIqYHCw6VBn8ShUWWm4tjbG8',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => esc_html__( 'Style', 'opalestate-pro' ),
|
||||||
|
'desc' => __( 'Select a style', 'opalestate-pro' ),
|
||||||
|
'id' => 'google_map_style',
|
||||||
|
'type' => 'select',
|
||||||
|
'options' => [
|
||||||
|
'standard' => esc_html__( 'Standard', 'opalestate-pro' ),
|
||||||
|
'silver' => esc_html__( 'Silver', 'opalestate-pro' ),
|
||||||
|
'retro' => esc_html__( 'Retro', 'opalestate-pro' ),
|
||||||
|
'dark' => esc_html__( 'Dark', 'opalestate-pro' ),
|
||||||
|
'night' => esc_html__( 'Night', 'opalestate-pro' ),
|
||||||
|
'aubergine' => esc_html__( 'Aubergine', 'opalestate-pro' ),
|
||||||
|
'custom' => esc_html__( 'Custom', 'opalestate-pro' ),
|
||||||
|
],
|
||||||
|
'default' => 'standard',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => esc_html__( 'Custom Style', 'opalestate-pro' ),
|
||||||
|
'desc' => __( 'You can visit <a href="https://mapstyle.withgoogle.com/" target="_blank">Google Maps Platform Styling Wizard</a>, then paste JSON into this setting.',
|
||||||
|
'opalestate-pro' ),
|
||||||
|
'id' => 'google_map_custom_style',
|
||||||
|
'type' => 'textarea_code',
|
||||||
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function get_walkscore_fields() {
|
public function get_walkscore_fields() {
|
||||||
return array(
|
return [
|
||||||
[
|
[
|
||||||
'name' => esc_html__( 'Walk Score', 'opalestate-pro' ),
|
'name' => esc_html__( 'Walk Score', 'opalestate-pro' ),
|
||||||
'desc' => '',
|
'desc' => '',
|
||||||
@ -67,12 +102,12 @@ class Opalestate_Settings_3rd_party_Tab extends Opalestate_Settings_Base_Tab {
|
|||||||
'desc' => esc_html__( 'Add Walk Score API key. To get your Walk Score API key, go to your Walk Score Account.', 'opalestate-pro' ),
|
'desc' => esc_html__( 'Add Walk Score API key. To get your Walk Score API key, go to your Walk Score Account.', 'opalestate-pro' ),
|
||||||
'id' => 'walkscore_api_key',
|
'id' => 'walkscore_api_key',
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
]
|
],
|
||||||
);
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function get_yelp_fields() {
|
public function get_yelp_fields() {
|
||||||
return array(
|
return [
|
||||||
[
|
[
|
||||||
'name' => esc_html__( 'Yelp', 'opalestate-pro' ),
|
'name' => esc_html__( 'Yelp', 'opalestate-pro' ),
|
||||||
'desc' => '',
|
'desc' => '',
|
||||||
@ -130,8 +165,7 @@ class Opalestate_Settings_3rd_party_Tab extends Opalestate_Settings_Base_Tab {
|
|||||||
'kilometers' => esc_html__( 'kilometers', 'opalestate-pro' ),
|
'kilometers' => esc_html__( 'kilometers', 'opalestate-pro' ),
|
||||||
],
|
],
|
||||||
'default' => 'miles',
|
'default' => 'miles',
|
||||||
]
|
],
|
||||||
);
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -262,14 +262,6 @@ class Opalestate_Settings_General_Tab extends Opalestate_Settings_Base_Tab {
|
|||||||
'options' => opalestate_get_measurement_units(),
|
'options' => opalestate_get_measurement_units(),
|
||||||
'default' => 'sqft',
|
'default' => 'sqft',
|
||||||
],
|
],
|
||||||
[
|
|
||||||
'name' => esc_html__( 'Google Map API', 'opalestate-pro' ),
|
|
||||||
'desc' => __( 'You need to register <a href="https://developers.google.com/maps/documentation/javascript/get-api-key" target="_blank">Google API Key</a>, then put the key in this setting.',
|
|
||||||
'opalestate-pro' ),
|
|
||||||
'id' => 'google_map_api_keys',
|
|
||||||
'type' => 'text',
|
|
||||||
'default' => 'AIzaSyCfMVNIa7khIqYHCw6VBn8ShUWWm4tjbG8',
|
|
||||||
],
|
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,6 @@ class OpalEstate_Enqueue {
|
|||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
|
|
||||||
add_action( 'wp_enqueue_scripts', [ $this, 'load_scripts' ] );
|
add_action( 'wp_enqueue_scripts', [ $this, 'load_scripts' ] );
|
||||||
add_action( 'wp_head', [ $this, 'add_custom_styles' ] );
|
add_action( 'wp_head', [ $this, 'add_custom_styles' ] );
|
||||||
}
|
}
|
||||||
@ -52,6 +51,15 @@ class OpalEstate_Enqueue {
|
|||||||
* Google map.
|
* Google map.
|
||||||
*/
|
*/
|
||||||
wp_enqueue_script( 'opalestate-gmap', OPALESTATE_PLUGIN_URL . 'assets/js/frontend/googlemaps.js', [ 'jquery' ], OPALESTATE_VERSION, false );
|
wp_enqueue_script( 'opalestate-gmap', OPALESTATE_PLUGIN_URL . 'assets/js/frontend/googlemaps.js', [ 'jquery' ], OPALESTATE_VERSION, false );
|
||||||
|
$custom_map_styles = json_decode( ( opalestate_options( 'google_map_custom_style', '' ) ) );
|
||||||
|
wp_localize_script( 'opalestate-gmap', 'opalestateGmap', [
|
||||||
|
'style' => opalestate_options( 'google_map_style', 'standard' ),
|
||||||
|
'custom_style' => json_encode( $custom_map_styles ),
|
||||||
|
] );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Frontend property.
|
||||||
|
*/
|
||||||
wp_enqueue_script( 'opalestate-messages', OPALESTATE_PLUGIN_URL . 'assets/js/frontend/property.js', [ 'jquery' ], OPALESTATE_VERSION, false );
|
wp_enqueue_script( 'opalestate-messages', OPALESTATE_PLUGIN_URL . 'assets/js/frontend/property.js', [ 'jquery' ], OPALESTATE_VERSION, false );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -80,9 +88,8 @@ class OpalEstate_Enqueue {
|
|||||||
wp_enqueue_script( 'tooltipster' );
|
wp_enqueue_script( 'tooltipster' );
|
||||||
}
|
}
|
||||||
|
|
||||||
// load global variables
|
// Load global variables
|
||||||
wp_localize_script( 'opalestate-scripts', 'opalesateJS',
|
wp_localize_script( 'opalestate-scripts', 'opalesateJS', [
|
||||||
[
|
|
||||||
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
||||||
'siteurl' => get_template_directory_uri(),
|
'siteurl' => get_template_directory_uri(),
|
||||||
'mapiconurl' => OPALESTATE_PLUGIN_URL . 'assets/map/',
|
'mapiconurl' => OPALESTATE_PLUGIN_URL . 'assets/map/',
|
||||||
@ -95,7 +102,6 @@ class OpalEstate_Enqueue {
|
|||||||
'mfile_other' => opalestate_options( 'upload_other_max_files', 10 ),
|
'mfile_other' => opalestate_options( 'upload_other_max_files', 10 ),
|
||||||
] );
|
] );
|
||||||
|
|
||||||
///
|
|
||||||
$this->register_enqueue();
|
$this->register_enqueue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Plugin Name: Opal Estate Pro
|
* Plugin Name: Opal Estate Pro
|
||||||
* Plugin URI: http://www.wpopal.com/product/opal-estate-wordpress-plugin/
|
* 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.
|
* Description: Opal Real Estate Plugin is an ideal solution and brilliant choice for you to set up a professional estate website.
|
||||||
* Version: 1.1.6
|
* Version: 1.1.7
|
||||||
* 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
|
||||||
@ -151,7 +151,7 @@ if ( ! class_exists( 'OpalEstate' ) ) {
|
|||||||
*/
|
*/
|
||||||
public function __clone() {
|
public function __clone() {
|
||||||
// Cloning instances of the class is forbidden
|
// Cloning instances of the class is forbidden
|
||||||
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'opalestate-pro' ), '1.1.6' );
|
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'opalestate-pro' ), '1.1.7' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -160,7 +160,7 @@ if ( ! class_exists( 'OpalEstate' ) ) {
|
|||||||
public function setup_constants() {
|
public function setup_constants() {
|
||||||
// Plugin version
|
// Plugin version
|
||||||
if ( ! defined( 'OPALESTATE_VERSION' ) ) {
|
if ( ! defined( 'OPALESTATE_VERSION' ) ) {
|
||||||
define( 'OPALESTATE_VERSION', '1.1.6' );
|
define( 'OPALESTATE_VERSION', '1.1.7' );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Plugin Folder Path
|
// Plugin Folder Path
|
||||||
@ -303,7 +303,6 @@ if ( ! class_exists( 'OpalEstate' ) ) {
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
/// user ///
|
/// user ///
|
||||||
$this->includes(
|
$this->includes(
|
||||||
[
|
[
|
||||||
@ -383,7 +382,7 @@ if ( ! class_exists( 'OpalEstate' ) ) {
|
|||||||
* @var array $files
|
* @var array $files
|
||||||
*/
|
*/
|
||||||
public function load_vendors() {
|
public function load_vendors() {
|
||||||
if ( defined( "ELEMENTOR_VERSION" ) ) {
|
if ( defined( 'ELEMENTOR_VERSION' ) ) {
|
||||||
require_once OPALESTATE_PLUGIN_DIR . 'inc/vendors/elementor/class-opalestate-elementor-extended.php';
|
require_once OPALESTATE_PLUGIN_DIR . 'inc/vendors/elementor/class-opalestate-elementor-extended.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
=== Opal Estate Pro - Property Management and Submission ===
|
=== Opal Estate Pro - Property Management and Submission ===
|
||||||
Contributors: wpopal
|
Contributors: wpopal
|
||||||
Donate link: http://www.wpopal.com/product/opal-estate-wordpress-plugin/
|
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
|
Tags: estate, property, opalestate, house for rent, agency for lease, estate submission, agents estate property, property marketplace
|
||||||
Requires at least: 4.6
|
Requires at least: 4.6
|
||||||
Tested up to: 5.2.3
|
Tested up to: 5.2.3
|
||||||
Stable tag: 1.1.6
|
Stable tag: 1.1.7
|
||||||
License: GPLv3
|
License: GPLv3
|
||||||
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
@ -155,6 +155,9 @@ 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")
|
* System tickets support 24/7 available : [free support](https://wpopal.ticksy.com/ "Visit the Plugin support Page")
|
||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
= 1.1.7 - 2019-10-30 =
|
||||||
|
* Added - Google Map styles.
|
||||||
|
|
||||||
= 1.1.6 - 2019-10-26 =
|
= 1.1.6 - 2019-10-26 =
|
||||||
* Added - Setting information fields.
|
* Added - Setting information fields.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user