tabs = array( 'auth' => __('Authentication', 'ga-for-wp-text'), ); $auth_settings = get_option('ga4wp_auth_settings'); $ga4wp_refresh_token_fail = get_option('ga4wp_refresh_token_fail'); if (($auth_settings) && ($ga4wp_refresh_token_fail != 'yes')) { if (gfw_fs()->is_not_paying() && !(gfw_fs()->is_trial()) || (!gfw_fs()->is_premium())) { $this->tabs = array( 'settings' => __('Settings', 'ga-for-wp-text'), ); if (isset($auth_settings['property_id']) && (strpos($auth_settings['property_id'], 'UA') !== false)) { $this->tabs = array_merge(array('dash' => __('Dashboard', 'ga-for-wp-text')), $this->tabs); } elseif (isset($auth_settings['property_id']) && (strpos($auth_settings['property_id'], 'G') !== false)) { $this->tabs = array_merge(array('dash' => __('Dashboard', 'ga-for-wp-text')), $this->tabs); } $this->tabs = array_merge($this->tabs, array('upgrade' => __('Upgrade to Pro', 'ga-for-wp-text'))); $this->tabs = array_merge($this->tabs, array('unlink' => __('Un-Link Google Analytics', 'ga-for-wp-text'))); } else { $this->tabs = array( 'settings' => __('Settings', 'ga-for-wp-text'), 'support' => __('Support', 'ga-for-wp-text'), ); if (isset($auth_settings['property_id']) && (strpos($auth_settings['property_id'], 'UA') !== false)) { $this->tabs = array_merge(array('dash__premium_only' => __('Dashboard', 'ga-for-wp-text')), $this->tabs); } elseif (isset($auth_settings['property_id']) && (strpos($auth_settings['property_id'], 'G') !== false)) { $this->tabs = array_merge(array('dash__premium_only' => __('Dashboard', 'ga-for-wp-text')), $this->tabs); } $this->tabs = array_merge($this->tabs, array('unlink' => __('Un-Link Google Analytics', 'ga-for-wp-text'))); } } } /* rendering tabs for plugin settings */ public function render() { ?>
get_tracking_id()) { ?>