|
@@ -61,8 +61,8 @@ discard block |
|
|
block discarded – undo |
|
61
|
61
|
*/ |
|
62
|
62
|
static function geocoder() { |
|
63
|
63
|
|
|
64
|
|
- if ( ! isset( static::$_geocoder ) ) { |
|
65
|
|
- static::$_geocoder = new Geocoder( ['api_key' => self::api_key() ] ); |
|
|
64
|
+ if ( !isset(static::$_geocoder) ) { |
|
|
65
|
+ static::$_geocoder = new Geocoder( ['api_key' => self::api_key()] ); |
|
66
|
66
|
} |
|
67
|
67
|
|
|
68
|
68
|
return static::$_geocoder; |
|
@@ -107,8 +107,8 @@ discard block |
|
|
block discarded – undo |
|
107
|
107
|
$source = sprintf( '%1$s/assets/maps.js', self::source_url() ); |
|
108
|
108
|
} |
|
109
|
109
|
|
|
110
|
|
- wp_register_script('google-maps', "https://maps.google.com/maps/api/js?v=3&key={$key}", false, '3.0', true ); |
|
111
|
|
- wp_register_script('map-control', $source, array( 'jquery', 'google-maps' ), '0.1.2', true ); |
|
|
110
|
+ wp_register_script( 'google-maps', "https://maps.google.com/maps/api/js?v=3&key={$key}", false, '3.0', true ); |
|
|
111
|
+ wp_register_script( 'map-control', $source, array( 'jquery', 'google-maps' ), '0.1.2', true ); |
|
112
|
112
|
|
|
113
|
113
|
$conditions = array_map( array( __CLASS__, '_evaluate_condition' ), static::$_script_conditions ); |
|
114
|
114
|
|
|
@@ -144,7 +144,7 @@ discard block |
|
|
block discarded – undo |
|
144
|
144
|
* @param array $args |
|
145
|
145
|
* @return string |
|
146
|
146
|
*/ |
|
147
|
|
- static function driving_directions_href($destination, $args = array() ) { |
|
|
147
|
+ static function driving_directions_href( $destination, $args = array() ) { |
|
148
|
148
|
|
|
149
|
149
|
$args = wp_parse_args( $args, array( |
|
150
|
150
|
'start' => 'My Location', |