Fix measurement_unit
This commit is contained in:
parent
017a2eaa33
commit
2285106cad
@ -119,10 +119,15 @@ function opalestate_property_render_field_template( $field, $label, $type = 'sel
|
||||
function opalestate_property_areasize_field_template( $template = '' ) {
|
||||
$search_min = isset( $_GET['min_area'] ) ? sanitize_text_field( $_GET['min_area'] ) : opalestate_options( 'search_min_area', 0 );
|
||||
$search_max = isset( $_GET['max_area'] ) ? sanitize_text_field( $_GET['max_area'] ) : opalestate_options( 'search_max_area', 1000 );
|
||||
$measurement_units = opalestate_get_measurement_units();
|
||||
$unit = opalestate_options( 'measurement_unit', 'sqft' );
|
||||
if ( isset( $measurement_units[ $unit ] ) ) {
|
||||
$unit = $measurement_units[ $unit ];
|
||||
}
|
||||
|
||||
$data = [
|
||||
'id' => 'area',
|
||||
'unit' => opalestate_options( 'measurement_unit', 'sq ft' ) . ' ',
|
||||
'unit' => $unit . ' ',
|
||||
'ranger_min' => opalestate_options( 'search_min_area', 0 ),
|
||||
'ranger_max' => opalestate_options( 'search_max_area', 1000 ),
|
||||
'input_min' => $search_min,
|
||||
|
@ -40,7 +40,7 @@ function opalestate_output_msg_json( $result = false, $message = '', $args = [],
|
||||
* Process upload images for properties
|
||||
*/
|
||||
function opalesate_upload_image( $submitted_file, $parent_id = 0 ) {
|
||||
require_once ABSPATH . 'wp-admin/includes/image.php';
|
||||
require_once ABSPATH . 'wp-admin/includes/image.php';
|
||||
require_once ABSPATH . 'wp-admin/includes/file.php';
|
||||
require_once ABSPATH . 'wp-admin/includes/media.php';
|
||||
|
||||
@ -1062,7 +1062,13 @@ function opalestate_price( $price, $args = [] ) {
|
||||
*/
|
||||
|
||||
function opalestate_areasize_unit_format( $value = '' ) {
|
||||
return $value . ' ' . '<span>' . opalestate_options( 'measurement_unit', 'sq ft' ) . '</span>';
|
||||
$measurement_units = opalestate_get_measurement_units();
|
||||
$unit = opalestate_options( 'measurement_unit', 'sqft' );
|
||||
if ( isset( $measurement_units[ $unit ] ) ) {
|
||||
$unit = $measurement_units[ $unit ];
|
||||
}
|
||||
|
||||
return sprintf( _x( '%1$s <span>%2$s</span>', 'areasize info','opalestate-pro' ), $value, $unit );
|
||||
}
|
||||
|
||||
add_filter( 'opalestate_areasize_unit_format', 'opalestate_areasize_unit_format' );
|
||||
|
@ -3,7 +3,7 @@
|
||||
* 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.2
|
||||
* Version: 1.1.9.3
|
||||
* Author: WPOPAL
|
||||
* Author URI: http://www.wpopal.com
|
||||
* Requires at least: 4.6
|
||||
@ -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.2' );
|
||||
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'opalestate-pro' ), '1.1.9.3' );
|
||||
}
|
||||
|
||||
/**
|
||||
@ -160,7 +160,7 @@ if ( ! class_exists( 'OpalEstate' ) ) {
|
||||
public function setup_constants() {
|
||||
// Plugin version
|
||||
if ( ! defined( 'OPALESTATE_VERSION' ) ) {
|
||||
define( 'OPALESTATE_VERSION', '1.1.9.2' );
|
||||
define( 'OPALESTATE_VERSION', '1.1.9.3' );
|
||||
}
|
||||
|
||||
// Plugin Folder Path
|
||||
|
@ -4,7 +4,7 @@ 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.2
|
||||
Stable tag: 1.1.9.3
|
||||
License: GPLv3
|
||||
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
@ -156,6 +156,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")
|
||||
|
||||
== Changelog ==
|
||||
= 1.1.9.3 - 2019-11-27 =
|
||||
* Fixes - Measurement Unit translation.
|
||||
|
||||
= 1.1.9.2 - 2019-11-18 =
|
||||
* Added - Fix API.
|
||||
* Fixes - Search query.
|
||||
|
Loading…
Reference in New Issue
Block a user