Version Description
- 2021-01-28 =
- Fix value not available when loaded in
map
andosm
fields.
Download this release
Release Info
Developer | rilwis |
Plugin | Meta Box |
Version | 5.3.8 |
Comparing to | |
See all releases |
Code changes from version 5.3.7 to 5.3.8
- inc/fields/map.php +3 -2
- inc/fields/osm.php +3 -2
- inc/loader.php +1 -1
- js/osm.js +5 -8
- meta-box.php +1 -1
- readme.txt +4 -1
inc/fields/map.php
CHANGED
@@ -72,8 +72,9 @@ class RWMB_Map_Field extends RWMB_Field {
|
|
72 |
esc_attr( $address )
|
73 |
);
|
74 |
|
75 |
-
$attributes
|
76 |
-
$attributes['type']
|
|
|
77 |
|
78 |
$html .= sprintf(
|
79 |
'<div class="rwmb-map-canvas" data-default-loc="%s" data-region="%s"></div>
|
72 |
esc_attr( $address )
|
73 |
);
|
74 |
|
75 |
+
$attributes = self::get_attributes( $field, $meta );
|
76 |
+
$attributes['type'] = 'hidden';
|
77 |
+
$attributes['value'] = $meta;
|
78 |
|
79 |
$html .= sprintf(
|
80 |
'<div class="rwmb-map-canvas" data-default-loc="%s" data-region="%s"></div>
|
inc/fields/osm.php
CHANGED
@@ -45,8 +45,9 @@ class RWMB_OSM_Field extends RWMB_Field {
|
|
45 |
esc_attr( $address )
|
46 |
);
|
47 |
|
48 |
-
$attributes
|
49 |
-
$attributes['type']
|
|
|
50 |
|
51 |
$html .= sprintf(
|
52 |
'<div class="rwmb-osm-canvas" data-default-loc="%s" data-region="%s" data-language="%s"></div>
|
45 |
esc_attr( $address )
|
46 |
);
|
47 |
|
48 |
+
$attributes = self::get_attributes( $field, $meta );
|
49 |
+
$attributes['type'] = 'hidden';
|
50 |
+
$attributes['value'] = $meta;
|
51 |
|
52 |
$html .= sprintf(
|
53 |
'<div class="rwmb-osm-canvas" data-default-loc="%s" data-region="%s" data-language="%s"></div>
|
inc/loader.php
CHANGED
@@ -18,7 +18,7 @@ class RWMB_Loader {
|
|
18 |
*/
|
19 |
protected function constants() {
|
20 |
// Script version, used to add version for scripts and styles.
|
21 |
-
define( 'RWMB_VER', '5.3.
|
22 |
|
23 |
list( $path, $url ) = self::get_path( dirname( dirname( __FILE__ ) ) );
|
24 |
|
18 |
*/
|
19 |
protected function constants() {
|
20 |
// Script version, used to add version for scripts and styles.
|
21 |
+
define( 'RWMB_VER', '5.3.8' );
|
22 |
|
23 |
list( $path, $url ) = self::get_path( dirname( dirname( __FILE__ ) ) );
|
24 |
|
js/osm.js
CHANGED
@@ -131,20 +131,14 @@
|
|
131 |
return;
|
132 |
}
|
133 |
|
134 |
-
// If Meta Box Geo Location installed. Do not run autocomplete.
|
135 |
-
if ( $( '.rwmb-geo-binding' ).length ) {
|
136 |
-
var geocodeAddress = that.geocodeAddress.bind( that );
|
137 |
-
$address.on( 'selected_address', geocodeAddress );
|
138 |
-
return false;
|
139 |
-
}
|
140 |
-
|
141 |
$address.autocomplete( {
|
142 |
source: function ( request, response ) {
|
143 |
$.get( 'https://nominatim.openstreetmap.org/search', {
|
144 |
format: 'json',
|
145 |
q: request.term,
|
146 |
countrycodes: that.$canvas.data( 'region' ),
|
147 |
-
"accept-language": that.$canvas.data( 'language' )
|
|
|
148 |
}, function( results ) {
|
149 |
if ( ! results.length ) {
|
150 |
response( [ {
|
@@ -155,6 +149,7 @@
|
|
155 |
}
|
156 |
response( results.map( function ( item ) {
|
157 |
return {
|
|
|
158 |
label: item.display_name,
|
159 |
value: item.display_name,
|
160 |
latitude: item.lat,
|
@@ -169,6 +164,8 @@
|
|
169 |
that.map.panTo( latLng );
|
170 |
that.marker.setLatLng( latLng );
|
171 |
that.updateCoordinate( latLng );
|
|
|
|
|
172 |
}
|
173 |
} );
|
174 |
},
|
131 |
return;
|
132 |
}
|
133 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
$address.autocomplete( {
|
135 |
source: function ( request, response ) {
|
136 |
$.get( 'https://nominatim.openstreetmap.org/search', {
|
137 |
format: 'json',
|
138 |
q: request.term,
|
139 |
countrycodes: that.$canvas.data( 'region' ),
|
140 |
+
"accept-language": that.$canvas.data( 'language' ),
|
141 |
+
addressdetails: 1
|
142 |
}, function( results ) {
|
143 |
if ( ! results.length ) {
|
144 |
response( [ {
|
149 |
}
|
150 |
response( results.map( function ( item ) {
|
151 |
return {
|
152 |
+
address: item.address,
|
153 |
label: item.display_name,
|
154 |
value: item.display_name,
|
155 |
latitude: item.lat,
|
164 |
that.map.panTo( latLng );
|
165 |
that.marker.setLatLng( latLng );
|
166 |
that.updateCoordinate( latLng );
|
167 |
+
|
168 |
+
$address.trigger( 'selected_address', [ui.item] );
|
169 |
}
|
170 |
} );
|
171 |
},
|
meta-box.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Meta Box
|
4 |
* Plugin URI: https://metabox.io
|
5 |
* Description: Create custom meta boxes and custom fields in WordPress.
|
6 |
-
* Version: 5.3.
|
7 |
* Author: MetaBox.io
|
8 |
* Author URI: https://metabox.io
|
9 |
* License: GPL2+
|
3 |
* Plugin Name: Meta Box
|
4 |
* Plugin URI: https://metabox.io
|
5 |
* Description: Create custom meta boxes and custom fields in WordPress.
|
6 |
+
* Version: 5.3.8
|
7 |
* Author: MetaBox.io
|
8 |
* Author URI: https://metabox.io
|
9 |
* License: GPL2+
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: meta-box, custom fields, custom field, meta, meta-boxes, admin, advanced,
|
|
5 |
Requires at least: 4.3
|
6 |
Requires PHP: 5.3
|
7 |
Tested up to: 5.6
|
8 |
-
Stable tag: 5.3.
|
9 |
License: GPLv2 or later
|
10 |
|
11 |
Meta Box plugin is a powerful, professional developer toolkit to create custom meta boxes and custom fields for your custom post types in WordPress.
|
@@ -168,6 +168,9 @@ To getting started with the plugin, please read the [Quick Start Guide](https://
|
|
168 |
|
169 |
== Changelog ==
|
170 |
|
|
|
|
|
|
|
171 |
= 5.3.7 - 2021-01-11 =
|
172 |
- Fix editor not editable in Gutenberg
|
173 |
- Fix content in the visual tab of editors not saving
|
5 |
Requires at least: 4.3
|
6 |
Requires PHP: 5.3
|
7 |
Tested up to: 5.6
|
8 |
+
Stable tag: 5.3.8
|
9 |
License: GPLv2 or later
|
10 |
|
11 |
Meta Box plugin is a powerful, professional developer toolkit to create custom meta boxes and custom fields for your custom post types in WordPress.
|
168 |
|
169 |
== Changelog ==
|
170 |
|
171 |
+
= 5.3.8 - 2021-01-28 =
|
172 |
+
- Fix value not available when loaded in `map` and `osm` fields.
|
173 |
+
|
174 |
= 5.3.7 - 2021-01-11 =
|
175 |
- Fix editor not editable in Gutenberg
|
176 |
- Fix content in the visual tab of editors not saving
|