Skip to content

Commit

Permalink
remove nested if
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeltorbert committed Sep 6, 2016
1 parent acbe255 commit 336d601
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions public/google-analytics.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ function filter_universal() {
function google_analytics() {
global $aioseop_options;
$analytics = '';
if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && ! empty( $aioseop_options['aiosp_ga_exclude_users'] ) ) {
if ( ) {
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();
Expand All @@ -37,7 +36,6 @@ function google_analytics() {
return;
}
}
}
}
if ( ! empty( $aioseop_options['aiosp_google_analytics_id'] ) ) {
ob_start();
Expand Down

0 comments on commit 336d601

Please sign in to comment.