templates
2 months ago
ga-accounts-selector.php
2 months ago
ga-auth-button.php
2 months ago
ga-code.php
2 months ago
ga-dashboard-widget.php
2 months ago
ga-debug-modal.php
2 months ago
ga-ga4-settings.php
2 months ago
ga-googleanalytics-loader.php
2 months ago
ga-notice.php
2 months ago
ga-oauth-notice.php
2 months ago
ga-wp-notice.php
2 months ago
old-page.php
2 months ago
page.php
2 months ago
statistics.php
2 months ago
stats.php
2 months ago
trending.php
2 months ago
ga-auth-button.php
36 lines
| 1 | <?php |
| 2 | /** |
| 3 | * GA Auth Button view. |
| 4 | * |
| 5 | * @package GoogleAnalytics |
| 6 | */ |
| 7 | |
| 8 | if (!defined('ABSPATH')) exit; |
| 9 | |
| 10 | // Template partial fallback values. |
| 11 | $label = isset( $label ) ? $label : ''; |
| 12 | $manually_id = isset( $manually_id ) ? $manually_id : ''; |
| 13 | $button_type = isset( $button_type ) ? $button_type : ''; |
| 14 | $url = isset( $url ) ? $url : ''; |
| 15 | $classes = array(); |
| 16 | |
| 17 | // Determine button classes. |
| 18 | if ( 'auth' === $button_type ) { |
| 19 | $classes[] = 'button-primary'; |
| 20 | } else { |
| 21 | $classes[] = 'button-secondary'; |
| 22 | } |
| 23 | ?> |
| 24 | <a id="ga_authorize_with_google_button" |
| 25 | class="<?php echo esc_attr( implode( ' ', $classes ) ); ?>" |
| 26 | href="https://accounts.google.com/o/oauth2/auth?response_type=code&access_type=offline&client_id=1068475218768-0id2em2grsa7fcb1la1t3ephea6l7lvf.apps.googleusercontent.com&redirect_uri=https%3A%2F%2Fsharethis.com%2Fgoogle-analytics-setup%2F&state&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fanalytics.readonly&prompt=consent" |
| 27 | <?php |
| 28 | echo disabled( |
| 29 | false === empty( $manually_id ) |
| 30 | || false === Ga_Helper::are_features_enabled() |
| 31 | || true === Ga_Helper::is_curl_disabled() |
| 32 | ); |
| 33 | ?> |
| 34 | ><?php echo esc_html( $label ); ?> |
| 35 | </a> |
| 36 |