@@ -42,11 +42,11 @@ function ul_get_info( $args ) {
4242 */
4343
4444 $ defaults = array (
45- 'id ' => '' ,
46- 'show_name ' => true ,
47- 'show_social ' => true ,
48- 'comment ' => '' ,
49- 'show_opening_hours ' => true ,
45+ 'id ' => '' ,
46+ 'show_name ' => true ,
47+ 'show_social ' => true ,
48+ 'comment ' => '' ,
49+ 'show_opening_hours ' => true ,
5050 );
5151 $ args = wp_parse_args ( $ args , $ defaults );
5252
@@ -60,7 +60,7 @@ function ul_get_info( $args ) {
6060 $ output = '' ;
6161
6262 // Get the location data if its already been entered.
63- $ type = ul_get_field ( $ args ['id ' ], 'location_type ' );
63+ $ type = ul_get_field ( $ args ['id ' ], 'location_type ' );
6464 if ( ! $ type ) {
6565 $ type = 'LocalBusiness ' ;
6666 }
@@ -112,13 +112,13 @@ function ul_get_info( $args ) {
112112function ul_get_address ( $ args ) {
113113
114114 $ defaults = array (
115- 'id ' => '' ,
116- 'show_street ' => true ,
117- 'show_street_2 ' => true ,
118- 'show_city ' => true ,
119- 'show_state ' => true ,
120- 'show_postcode ' => true ,
121- 'show_country ' => true ,
115+ 'id ' => '' ,
116+ 'show_street ' => true ,
117+ 'show_street_2 ' => true ,
118+ 'show_city ' => true ,
119+ 'show_state ' => true ,
120+ 'show_postcode ' => true ,
121+ 'show_country ' => true ,
122122 );
123123 $ args = wp_parse_args ( $ args , $ defaults );
124124
@@ -197,12 +197,12 @@ function ul_get_address( $args ) {
197197function ul_get_contact_info ( $ args ) {
198198
199199 $ defaults = array (
200- 'id ' => '' ,
201- 'show_phone ' => true ,
202- 'show_phone_2 ' => true ,
203- 'show_fax ' => true ,
204- 'show_email ' => true ,
205- 'show_url ' => true ,
200+ 'id ' => '' ,
201+ 'show_phone ' => true ,
202+ 'show_phone_2 ' => true ,
203+ 'show_fax ' => true ,
204+ 'show_email ' => true ,
205+ 'show_url ' => true ,
206206 );
207207 $ args = wp_parse_args ( $ args , $ defaults );
208208
@@ -216,11 +216,11 @@ function ul_get_contact_info( $args ) {
216216 return ;
217217 }
218218
219- $ phone = ul_get_field ( $ args ['id ' ], 'phone ' );
220- $ phone_2nd = ul_get_field ( $ args ['id ' ], 'phone_2 ' );
221- $ fax = ul_get_field ( $ args ['id ' ], 'fax ' );
222- $ email = ul_get_field ( $ args ['id ' ], 'email ' );
223- $ url = ul_get_field ( $ args ['id ' ], 'location_url ' );
219+ $ phone = ul_get_field ( $ args ['id ' ], 'phone ' );
220+ $ phone_2nd = ul_get_field ( $ args ['id ' ], 'phone_2 ' );
221+ $ fax = ul_get_field ( $ args ['id ' ], 'fax ' );
222+ $ email = ul_get_field ( $ args ['id ' ], 'email ' );
223+ $ url = ul_get_field ( $ args ['id ' ], 'location_url ' );
224224
225225 // This array can be used in a filter to change the order and the labels of contact details
226226 $ contact_details = array (
@@ -318,32 +318,32 @@ function ul_get_social_links( $args ) {
318318
319319 $ social_links = array (
320320 'facebook ' => array (
321- 'url ' => ul_get_field ( $ args ['id ' ], 'facebook ' ),
322- 'icon ' => '<span class="fa fa-facebook"></span> ' ,
321+ 'url ' => ul_get_field ( $ args ['id ' ], 'facebook ' ),
322+ 'icon ' => '<span class="fa fa-facebook"></span> ' ,
323323 ),
324324 'twitter ' => array (
325- 'url ' => ul_get_field ( $ args ['id ' ], 'twitter ' ),
326- 'icon ' => '<span class="fa fa-twitter"></span> ' ,
325+ 'url ' => ul_get_field ( $ args ['id ' ], 'twitter ' ),
326+ 'icon ' => '<span class="fa fa-twitter"></span> ' ,
327327 ),
328328 'googleplus ' => array (
329- 'url ' => ul_get_field ( $ args ['id ' ], 'googleplus ' ),
330- 'icon ' => '<span class="fa fa-google-plus"></span> ' ,
329+ 'url ' => ul_get_field ( $ args ['id ' ], 'googleplus ' ),
330+ 'icon ' => '<span class="fa fa-google-plus"></span> ' ,
331331 ),
332332 'youtube ' => array (
333- 'url ' => ul_get_field ( $ args ['id ' ], 'youtube ' ),
334- 'icon ' => '<span class="fa fa-youtube"></span> ' ,
333+ 'url ' => ul_get_field ( $ args ['id ' ], 'youtube ' ),
334+ 'icon ' => '<span class="fa fa-youtube"></span> ' ,
335335 ),
336336 'linkedin ' => array (
337- 'url ' => ul_get_field ( $ args ['id ' ], 'linkedin ' ),
338- 'icon ' => '<span class="fa fa-linkedin"></span> ' ,
337+ 'url ' => ul_get_field ( $ args ['id ' ], 'linkedin ' ),
338+ 'icon ' => '<span class="fa fa-linkedin"></span> ' ,
339339 ),
340- 'instagram ' => array (
341- 'url ' => ul_get_field ( $ args ['id ' ], 'instagram ' ),
342- 'icon ' => '<span class="fa fa-instagram"></span> ' ,
340+ 'instagram ' => array (
341+ 'url ' => ul_get_field ( $ args ['id ' ], 'instagram ' ),
342+ 'icon ' => '<span class="fa fa-instagram"></span> ' ,
343343 ),
344- 'pinterest ' => array (
345- 'url ' => ul_get_field ( $ args ['id ' ], 'pinterest ' ),
346- 'icon ' => '<span class="fa fa-pinterest"></span> ' ,
344+ 'pinterest ' => array (
345+ 'url ' => ul_get_field ( $ args ['id ' ], 'pinterest ' ),
346+ 'icon ' => '<span class="fa fa-pinterest"></span> ' ,
347347 ),
348348 );
349349 // Allow social links to be filtered to add new ones, or change the order
@@ -589,16 +589,14 @@ function ul_get_ga_code( $location_parent_id ) {
589589 if ( ! $ tracking_id ) {
590590 return ;
591591 }
592-
593592 return "<script>
594593 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
595594 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
596595 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
597- })(window,document,'script','https: //www.google-analytics.com/analytics.js','ga');
598- ga('create', ' {$ tracking_id }', ' auto');
596+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
597+ ga( 'create', ' {$ tracking_id }', {'cookieDomain':' auto'} );
599598 ga('send', 'pageview');
600599 </script> " ;
601-
602600}
603601
604602/**
0 commit comments