Merge branch 'release/5.3.10' into develop
This commit is contained in:
commit
aec5bf6a8d
8
acf.php
8
acf.php
|
|
@ -3,7 +3,7 @@
|
|||
Plugin Name: Advanced Custom Fields PRO
|
||||
Plugin URI: https://www.advancedcustomfields.com/
|
||||
Description: Customise WordPress with powerful, professional and intuitive fields
|
||||
Version: 5.3.9.2
|
||||
Version: 5.3.10
|
||||
Author: Elliot Condon
|
||||
Author URI: http://www.elliotcondon.com/
|
||||
Copyright: Elliot Condon
|
||||
|
|
@ -58,7 +58,7 @@ class acf {
|
|||
|
||||
// basic
|
||||
'name' => __('Advanced Custom Fields', 'acf'),
|
||||
'version' => '5.3.9.2',
|
||||
'version' => '5.3.10',
|
||||
|
||||
// urls
|
||||
'basename' => plugin_basename( __FILE__ ),
|
||||
|
|
@ -79,7 +79,9 @@ class acf {
|
|||
'uploader' => 'wp',
|
||||
'autoload' => false,
|
||||
'l10n' => true,
|
||||
'l10n_textdomain' => ''
|
||||
'l10n_textdomain' => '',
|
||||
'google_api_key' => '',
|
||||
'google_api_client' => ''
|
||||
);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4793,6 +4793,10 @@ var acf;
|
|||
acf.fields.google_map = acf.field.extend({
|
||||
|
||||
type: 'google_map',
|
||||
api: {
|
||||
sensor: false,
|
||||
libraries: 'places'
|
||||
},
|
||||
$el: null,
|
||||
$search: null,
|
||||
|
||||
|
|
@ -4888,7 +4892,7 @@ var acf;
|
|||
$.getScript('https://www.google.com/jsapi', function(){
|
||||
|
||||
// load maps
|
||||
google.load('maps', '3', { other_params: 'sensor=false&libraries=places', callback: function(){
|
||||
google.load('maps', '3', { other_params: $.param(self.api), callback: function(){
|
||||
|
||||
// set status
|
||||
self.status = 'ready';
|
||||
|
|
@ -4914,7 +4918,7 @@ var acf;
|
|||
|
||||
|
||||
// load maps
|
||||
google.load('maps', '3', { other_params: 'sensor=false&libraries=places', callback: function(){
|
||||
google.load('maps', '3', { other_params: $.param(self.api), callback: function(){
|
||||
|
||||
// set status
|
||||
self.status = 'ready';
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -275,6 +275,47 @@ class acf_field_google_map extends acf_field {
|
|||
// return
|
||||
return $value;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* input_admin_footer
|
||||
*
|
||||
* description
|
||||
*
|
||||
* @type function
|
||||
* @date 6/03/2014
|
||||
* @since 5.0.0
|
||||
*
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function input_admin_footer() {
|
||||
|
||||
// vars
|
||||
$api = array(
|
||||
'libraries' => 'places',
|
||||
'key' => acf_get_setting('google_api_key'),
|
||||
'client' => acf_get_setting('google_api_client')
|
||||
);
|
||||
|
||||
|
||||
// filter
|
||||
$api = apply_filters('acf/fields/google_map/api', $api);
|
||||
|
||||
|
||||
// remove empty
|
||||
if( empty($api['key']) ) unset($api['key']);
|
||||
if( empty($api['client']) ) unset($api['client']);
|
||||
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
acf.fields.google_map.api = <?php echo json_encode($api); ?>;
|
||||
</script>
|
||||
<?php
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
new acf_field_google_map();
|
||||
|
|
|
|||
|
|
@ -106,6 +106,10 @@ http://support.advancedcustomfields.com/
|
|||
|
||||
== Changelog ==
|
||||
|
||||
= 5.3.10 =
|
||||
* Core: Added new 'google_api_key' and 'google_api_client' global settings
|
||||
* Google Map: Added new 'acf/fields/google_map/api' filter
|
||||
|
||||
= 5.3.9.2 =
|
||||
* Time Picker field: Added compatibility with previous 3rd party field settings
|
||||
* Core: Fixed JS error setting l10n for Select2 with 3rd party libraries
|
||||
|
|
|
|||
Loading…
Reference in New Issue