Skip to content

Commit

Permalink
removed rogue echo
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeltorbert committed Sep 6, 2016
1 parent 336d601 commit 537ed0b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions public/google-analytics.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@ function google_analytics() {
global $aioseop_options;
$analytics = '';
if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && ! empty( $aioseop_options['aiosp_ga_exclude_users'] ) && is_user_logged_in() ) {
global $current_user;
if ( empty( $current_user ) ) {
wp_get_current_user();
}
if ( ! empty( $current_user ) ) {
$intersect = array_intersect( $aioseop_options['aiosp_ga_exclude_users'], $current_user->roles );
if ( ! empty( $intersect ) ) {
return;
}
global $current_user;
if ( empty( $current_user ) ) {
wp_get_current_user();
}
if ( ! empty( $current_user ) ) {
$intersect = array_intersect( $aioseop_options['aiosp_ga_exclude_users'], $current_user->roles );
if ( ! empty( $intersect ) ) {
return;
}
}
}
if ( ! empty( $aioseop_options['aiosp_google_analytics_id'] ) ) {
ob_start();
$analytics = $this->universal_analytics();
echo $analytics;

if ( empty( $analytics ) ) {
?>
<script type="text/javascript">
Expand Down

0 comments on commit 537ed0b

Please sign in to comment.