Changeset 1389108
- Timestamp:
- 04/07/2016 08:48:08 AM (10 years ago)
- Location:
- ank-google-map/trunk
- Files:
-
- 4 edited
-
ank-google-map.php (modified) (2 diffs)
-
inc/class-admin.php (modified) (1 diff)
-
inc/class-frontend.php (modified) (3 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ank-google-map/trunk/ank-google-map.php
r1367321 r1389108 4 4 Plugin URI: https://github.com/ank91/ank-google-map 5 5 Description: Simple, light weight, and non-bloated WordPress Google Map Plugin. Written in pure javascript, no jQuery at all, responsive, configurable, no ads and 100% Free of cost. 6 Version: 1.7. 56 Version: 1.7.6 7 7 Author: Ankur Kumar 8 8 Author URI: http://ank91.github.io/ … … 15 15 if (!defined('ABSPATH')) die; 16 16 17 define('AGM_PLUGIN_VERSION', '1.7. 5');17 define('AGM_PLUGIN_VERSION', '1.7.6'); 18 18 define('AGM_BASE_FILE', __FILE__); 19 19 -
ank-google-map/trunk/inc/class-admin.php
r1367321 r1389108 255 255 $is_min = (WP_DEBUG == 1) ? '' : '.min'; 256 256 wp_enqueue_style('agm-admin-css', plugins_url('css/option-page' . $is_min . '.css', AGM_BASE_FILE), array(), AGM_PLUGIN_VERSION, 'all'); 257 wp_enqueue_script('agm-google-map', 'https://maps.googleapis.com/maps/api/js?v=3.2 2&libraries=places', array(), null, true);257 wp_enqueue_script('agm-google-map', 'https://maps.googleapis.com/maps/api/js?v=3.24&libraries=places', array(), null, true); 258 258 wp_enqueue_script('agm-admin-js', plugins_url("/js/option-page" . $is_min . ".js", AGM_BASE_FILE), array('jquery'), AGM_PLUGIN_VERSION, true); 259 259 //wp inbuilt hack to print js options object just before this script -
ank-google-map/trunk/inc/class-frontend.php
r1367321 r1389108 56 56 'info_window' => array( 57 57 'enabled' => absint($options['info_on']), 58 'text' => wp_ slash($options['info_text']),58 'text' => wp_unslash($options['info_text']), 59 59 'state' => absint($options['info_state']), 60 60 ), … … 91 91 echo '<div id="agm_map_canvas" style="margin: 0 auto;width:' . esc_attr($options["div_width"]) . $w_unit . ';height:' . esc_attr($options["div_height"]) . 'px;' . $b_color . '"></div>'; 92 92 93 94 //Decide language code 95 $lang_code = (esc_attr($options['map_lang_code']) === '') ? '' : '&language=' . esc_attr($options['map_lang_code']); 96 //Decide API key 97 $api_key = $this->getAPIKey() ? '&key=' . $this->getAPIKey() : ''; 93 98 // Enqueue google map api 94 $lang_code = (esc_attr($options['map_lang_code']) === '') ? '' : '&language=' . esc_attr($options['map_lang_code']); 95 wp_enqueue_script('agm-google-map-api', "https://maps.googleapis.com/maps/api/js?v=3.22" . $lang_code, array(), null, true); 99 wp_enqueue_script('agm-google-map-api', "https://maps.googleapis.com/maps/api/js?v=3.24" . $lang_code . $api_key, array(), null, true); 96 100 97 101 // Enqueue frontend js file … … 132 136 } 133 137 138 /** 139 * Check if user has defined the constant or not and return the constant value 140 * @return bool|string 141 */ 142 private function getAPIKey() 143 { 144 if (defined('AGM_API_KEY')) { 145 return trim(AGM_API_KEY); 146 } 147 return false; 148 } 149 134 150 135 151 } -
ank-google-map/trunk/readme.txt
r1367321 r1389108 3 3 Requires at least: 3.8.0 4 4 Tested up to: 4.4.2 5 Stable tag: 1.7. 55 Stable tag: 1.7.6 6 6 License: GPLv2 or later 7 7 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 130 130 * This plugin has a problem/bug. (Report it now). 131 131 132 = How do i insert the API key ? = 133 * Obtain a browser key , see steps [here](https://developers.google.com/maps/documentation/javascript/get-api-key#get-an-api-key) 134 * Add this line of code to your `functions.php` 135 136 ` 137 define('AGM_API_KEY', 'PASTE_YOUR_API_KEY_HERE'); 138 ` 132 139 133 140 = Future Plans ? = … … 147 154 148 155 == Changelog == 156 157 = 1.7.6 = 158 * Allow developers to add API key to google map (see FAQ) 159 * Bump Google Map API version to 3.24 160 * Fixed a bug in InfoWindow text 149 161 150 162 = 1.7.4 =
Note: See TracChangeset
for help on using the changeset viewer.