Changeset 1771098
- Timestamp:
- 11/20/2017 04:44:10 AM (8 years ago)
- Location:
- ank-google-map/trunk
- Files:
-
- 4 edited
-
ank-google-map.php (modified) (2 diffs)
-
inc/class-frontend.php (modified) (4 diffs)
-
inc/class-util.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ank-google-map/trunk/ank-google-map.php
r1768082 r1771098 7 7 * Plugin URI: https://github.com/ankurk91/wp-google-map 8 8 * Description: Simple, light weight and non-bloated Google Map Plugin. Short code : <code>[ank_google_map]</code> 9 * Version: 2.6. 19 * Version: 2.6.2 10 10 * Author: Ankur Kumar 11 11 * Author URI: https://ankurk91.github.io/ … … 20 20 if (!defined('ABSPATH')) die; 21 21 22 define('AGM_PLUGIN_VERSION', '2.6. 1');22 define('AGM_PLUGIN_VERSION', '2.6.2'); 23 23 define('AGM_BASE_FILE', __FILE__); 24 24 -
ank-google-map/trunk/inc/class-frontend.php
r1768082 r1771098 45 45 'lng' => $db['map_Lng'], 46 46 'zoom' => $db['map_zoom'], 47 'type' => $this->get_map_types( )[$db['map_type']],47 'type' => $this->get_map_types($db['map_type']), 48 48 'styles' => $this->util->get_style_by_id($db['map_style']) 49 49 ), 50 50 'marker' => array( 51 51 'enabled' => absint($db['marker_on']), 52 'animation' => $this->get_marker_animations( )[$db['marker_anim']],52 'animation' => $this->get_marker_animations($db['marker_anim']), 53 53 'title' => esc_js($db['marker_title']), 54 54 'color' => $this->util->get_marker_url($db['marker_color']), … … 90 90 $db = $this->db; 91 91 92 // Write canvas html always92 // Print canvas html 93 93 $width_unit = ($db["div_width_unit"] === 1) ? 'px' : '%'; 94 94 $border_color = ($db["div_border_color"] === '') ? '' : 'border:1px solid ' . esc_attr($db["div_border_color"]); … … 116 116 117 117 118 protected function get_map_types( )118 protected function get_map_types($id) 119 119 { 120 returnarray(120 $styles = array( 121 121 1 => 'ROADMAP', 122 122 2 => 'SATELLITE', … … 124 124 4 => 'TERRAIN', 125 125 ); 126 127 if (array_key_exists($id, $styles)) { 128 return $styles[$id]; 129 } else { 130 return false; 131 } 126 132 } 127 133 128 protected function get_marker_animations( )134 protected function get_marker_animations($id) 129 135 { 130 returnarray(136 $anims = array( 131 137 1 => 'NONE', 132 138 2 => 'BOUNCE', 133 139 3 => 'DROP', 134 140 ); 141 142 if (array_key_exists($id, $anims)) { 143 return $anims[$id]; 144 } else { 145 return false; 146 } 135 147 } 136 148 -
ank-google-map/trunk/inc/class-util.php
r1768082 r1771098 61 61 62 62 $base_url = 'https://maps.gstatic.com/intl/en_us/mapfiles/'; 63 $ path= array(63 $urls = array( 64 64 // Key 1 is reserved for default 65 65 '2' => $base_url . 'marker.png', … … 72 72 '9' => $base_url . 'marker_green.png', 73 73 ); 74 if (array_key_exists($id, $path)) { 75 return $path[$id]; 74 75 if (array_key_exists($id, $urls)) { 76 return $urls[$id]; 76 77 } else { 77 78 return false; -
ank-google-map/trunk/readme.txt
r1768082 r1771098 3 3 Requires at least: 4.0.0 4 4 Tested up to: 4.9.0 5 Stable tag: 2.6. 15 Stable tag: 2.6.2 6 6 License: MIT 7 7 License URI: https://opensource.org/licenses/MIT … … 165 165 == Changelog == 166 166 167 = 2.6.2 = 168 * Fix: php v5.3 related [issue](https://stackoverflow.com/questions/16358973/parse-error-syntax-error-unexpected-with-php-5-3) 169 167 170 = 2.6.1 = 168 171 * Compatible with WP v4.9.0
Note: See TracChangeset
for help on using the changeset viewer.