Changeset 1721356
- Timestamp:
- 08/29/2017 04:11:08 PM (8 years ago)
- Location:
- witty-map/trunk
- Files:
-
- 3 edited
-
public/class-wittymap-public.php (modified) (3 diffs)
-
readme.txt (modified) (3 diffs)
-
witty-map.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
witty-map/trunk/public/class-wittymap-public.php
r1666057 r1721356 20 20 21 21 public function __construct(){ 22 23 add_action( 'wp_enqueue_scripts', [ $this, 'enqueue' ] );24 22 $this->shortcodes(); 25 23 $this->load_supports(); 24 add_action( 'wp_enqueue_scripts', [ $this, 'enqueue' ] ); 26 25 $this->gmap_api = esc_attr( get_option('googlemapapi_key') ); 27 26 if( empty( $this->gmap_api ) ) … … 29 28 } 30 29 31 /** markerwithlabel.js30 /** 32 31 * Enqueue files 33 32 */ 34 33 public function enqueue(){ 35 36 wp_enqueue_style( 'witty-map', WITTY_DIR_URL . '/public/css/witty-map-base.css' ); 37 wp_enqueue_script( 'googlemap-api', 'https://maps.googleapis.com/maps/api/js?key=' . $this->gmap_api, [], '', true ); 38 wp_enqueue_script( 'markerwithlabel', WITTY_DIR_URL . '/public/js/markerwithlabel.js', [], '', true ); 39 wp_enqueue_script( 'witty-map', WITTY_DIR_URL . '/public/js/googlemap.js', [], '', true ); 34 wp_register_style( 'witty-map', WITTY_DIR_URL . '/public/css/witty-map-base.css', array(), true ); 35 wp_register_script( 'googlemap-api', 'https://maps.googleapis.com/maps/api/js?key=' . $this->gmap_api, array(), true, true ); 36 wp_register_script( 'markerwithlabel', WITTY_DIR_URL . '/public/js/markerwithlabel.js', array(), true, true ); 37 wp_register_script( 'witty-map', WITTY_DIR_URL . '/public/js/googlemap.js', array(), true, true ); 40 38 wp_localize_script( 'witty-map', 'wm', [ 41 39 'wittyMapLocation' => get_option('wittymap_loc'), … … 82 80 */ 83 81 public function witty_map_render(){ 84 82 wp_enqueue_style( 'witty-map' ); 83 wp_enqueue_script( 'googlemap-api' ); 84 wp_enqueue_script( 'markerwithlabel' ); 85 wp_enqueue_script( 'witty-map' ); 85 86 $support = $this->support; 86 87 do_action( 'witty_map_before' ); -
witty-map/trunk/readme.txt
r1699294 r1721356 5 5 Requires at least: 4 6 6 Tested up to: 4.8 7 Stable tag: 1.0. 27 Stable tag: 1.0.3 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 43 43 = How to echo map in code = 44 44 45 echo do_shortcode('[ googleMap]');45 echo do_shortcode('[witty-map]'); 46 46 47 47 = List of witty map action = … … 53 53 54 54 == Changelog == 55 56 = 1.0.3 = 57 * Fix script error in console 55 58 56 59 = 1.0.2 = -
witty-map/trunk/witty-map.php
r1699295 r1721356 4 4 Plugin URI: 5 5 Description: Witty Map, add google map in content area or in template file (using shortcode). Most important you can customize its view. 6 Version: 1.0. 26 Version: 1.0.3 7 7 Author: Robert John Concepcion 8 8 Author URI: https://github.com/robert-john-concepcion
Note: See TracChangeset
for help on using the changeset viewer.