Changeset 1595187
- Timestamp:
- 02/13/2017 07:27:19 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
scale-lite-tools/trunk/inc/sl-google-maps/render-cpt.php
r1591181 r1595187 5 5 * @since 0.1 6 6 */ 7 7 8 8 9 function scale_lite_admin_google_maps() { … … 22 23 ); 23 24 } 24 add_action('wp_enqueue_scripts', 'scale_lite_load_sl_maps_js', 10 );25 25 26 26 add_action( 'admin_menu', 'scale_lite_add_admin_menu' ); … … 36 36 ); 37 37 } 38 39 38 40 39 // store all the maps data … … 72 71 73 72 } 74 add_action('wp_enqueue_scripts', 'scale_lite_build_markers_array', 10 );75 73 76 74 function register_markers_array() { … … 81 79 82 80 } 83 add_action('wp_enqueue_scripts', 'register_markers_array', 10 );84 85 81 86 82 // store all the maps data … … 170 166 true 171 167 ); 172 wp_enqueue_style( 'scale_lite_google_maps_css', $scale_lite_url_path . 'assets/css/fronted.google-maps.css', array(),'1.0.5', 'all' ); 173 168 wp_enqueue_style( 'scale_lite_google_maps_css', 169 $scale_lite_url_path . 'assets/css/fronted.google-maps.css', 170 array(), 171 '1.0.5', 172 'all' ); 174 173 } 175 add_action('wp_enqueue_scripts', 'scale_lite_load_gmaps_v3', 50 );176 174 add_action('admin_enqueue_scripts', 'scale_lite_load_gmaps_v3', 50 ); 177 175 … … 188 186 return $good_protocol_url; 189 187 } 188 189 function a() { 190 global $post; 191 if(has_shortcode($post->post_content,'sl_gmaps')) { 192 // execute code only if there is a sl_gmaps shortcode on the page 193 add_action('wp_enqueue_scripts', 'scale_lite_build_markers_array', 10 ); 194 add_action('wp_enqueue_scripts', 'register_markers_array', 10 ); 195 add_action('wp_enqueue_scripts', 'scale_lite_load_gmaps_v3', 50 ); 196 add_action('wp_enqueue_scripts', 'scale_lite_load_sl_maps_js', 10 ); 197 } 198 } 199 add_action('wp_enqueue_scripts','a');
Note: See TracChangeset
for help on using the changeset viewer.