Changeset 1596693
- Timestamp:
- 02/15/2017 04:47:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
scale-lite-tools/trunk/inc/sl-google-maps/render-cpt.php
r1596686 r1596693 22 22 ); 23 23 } 24 add_action('wp_enqueue_scripts', 'scale_lite_load_sl_maps_js', 10 );25 24 26 25 add_action( 'admin_menu', 'scale_lite_add_admin_menu' ); … … 72 71 73 72 } 74 add_action('wp_enqueue_scripts', 'scale_lite_build_markers_array', 10 ); 73 75 74 76 75 function register_markers_array() { … … 81 80 82 81 } 83 add_action('wp_enqueue_scripts', 'register_markers_array', 10 );84 82 85 83 … … 173 171 174 172 } 175 add_action('wp_enqueue_scripts', 'scale_lite_load_gmaps_v3', 50 );176 173 add_action('admin_enqueue_scripts', 'scale_lite_load_gmaps_v3', 50 ); 177 174 … … 188 185 return $good_protocol_url; 189 186 } 187 188 189 190 function scale_lite_load_maps_if_shortcode() { 191 global $post; 192 if(has_shortcode($post->post_content,'sl_gmaps')) { 193 // execute code only if there is a sl_gmaps shortcode on the page 194 add_action('wp_enqueue_scripts', 'scale_lite_build_markers_array', 9 ); 195 add_action('wp_enqueue_scripts', 'register_markers_array', 10 ); 196 add_action('wp_enqueue_scripts', 'scale_lite_load_gmaps_v3', 50 ); 197 add_action('wp_enqueue_scripts', 'scale_lite_load_sl_maps_js', 9 ); 198 } 199 } 200 add_action('wp_enqueue_scripts','scale_lite_load_maps_if_shortcode',0); 201 202 203 204
Note: See TracChangeset
for help on using the changeset viewer.