Skip to content

Commit 81a9ac7

Browse files
author
Mike Hemberger
committed
Merge branch 'release/1.3.3'
2 parents 80ebb49 + e119e19 commit 81a9ac7

File tree

3 files changed

+47
-46
lines changed

3 files changed

+47
-46
lines changed

CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#### 1.3.2 (10/20/17)
2+
* Fixed: GA code syntax for Locations.
3+
14
#### 1.3.2 (10/9/17)
25
* Changed: Display location menu on single location blog posts.
36

includes/functions-display.php

Lines changed: 42 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -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 ) {
112112
function 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 ) {
197197
function 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
/**

user-locations.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* License: GPL-2.0+
1717
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
1818
*
19-
* Version: 1.3.2
19+
* Version: 1.3.3
2020
*
2121
* GitHub Plugin URI: https://github.com/bizbudding/user-locations
2222
* GitHub Branch: master
@@ -175,7 +175,7 @@ private function setup_constants() {
175175

176176
// Plugin version.
177177
if ( ! defined( 'USER_LOCATIONS_VERSION' ) ) {
178-
define( 'USER_LOCATIONS_VERSION', '1.3.2' );
178+
define( 'USER_LOCATIONS_VERSION', '1.3.3' );
179179
}
180180

181181
// Plugin Folder Path.

0 commit comments

Comments
 (0)