Plugin Directory

Changeset 1517791


Ignore:
Timestamp:
10/19/2016 10:23:38 AM (9 years ago)
Author:
lewisself
Message:

1.2.1 update

Location:
easy-google-analytics-tracking/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • easy-google-analytics-tracking/trunk/easy-google-analytics-tracking.php

    r1517588 r1517791  
    33  /*
    44    Plugin Name: Easy Google Analytics Tracking
    5     Plugin URI:  http://www.selfdesigns.co.uk
     5    Plugin URI:  www.selfdesigns.co.uk
    66    Description: Add google analytics script without theme modification
    77    License:     GPL
    8     Version:     1.2.0
     8    Version:     1.2.1
    99    Author:      Lewis Self
    10     Author URI:  http://www.selfdesigns.co.uk
     10    Author URI:  www.selfdesigns.co.uk
    1111  */
    1212
     
    1616  }
    1717
    18   $google_analytics_enabled         = get_option('google_analytics_enabled');
    19   $google_analytics_tracking_id     = get_option('google_analytics_tracking_id');
    20   $google_analytics_placement       = get_option('google_analytics_placement');
    21   $google_site_verification_enabled = get_option('google_site_verification_enabled');
    22   $google_site_verification_id      = get_option('google_site_verification_id');
    23 
    24   if($google_analytics_enabled)
     18  if(get_option('google_analytics_enabled'))
    2519  {
    26     if($google_analytics_tracking_id)
     20    if(get_option('google_analytics_tracking_id'))
    2721    {
    2822      function egat_add_google_analytics_script() // Add Google Analytics code to theme file
     
    3630          })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
    3731
    38           ga('create', '<?php echo esc_attr($google_analytics_tracking_id); ?>', 'auto');
     32          ga('create', '<?php echo esc_attr(get_option('google_analytics_tracking_id')); ?>', 'auto');
    3933          ga('send', 'pageview');
    4034        </script>
    4135
    42       <?php
     36        <?php
    4337      }
    4438
    45       if($google_analytics_placement == '2')
     39      if(get_option('google_analytics_placement') == '2')
    4640      {
    4741        add_action('wp_footer', 'egat_add_google_analytics_script');
    4842      }
    4943
    50       if($google_analytics_placement == '1')
     44      if(get_option('google_analytics_placement') == '1')
    5145      {
    5246        add_action('wp_head', 'egat_add_google_analytics_script');
     
    5751  function egat_add_google_site_verification()
    5852  {
    59     if($google_site_verification_enabled)
     53    if(get_option('google_site_verification_enabled'))
    6054    {
    61       if($google_site_verification_id)
     55      if(get_option('google_site_verification_id'))
    6256      {
    6357        ?>
    6458
    65           <meta name="google-site-verification" content="<?php echo esc_attr($google_site_verification_id); ?>" />
     59          <meta name="google-site-verification" content="<?php echo esc_attr(get_option('google_site_verification_id')); ?>" />
    6660
    6761        <?php
     
    119113          <label class="google-ids">
    120114            <span class="title text-field-titles">Google Analytics Tracking ID:</span>
    121             <input name="google_analytics_tracking_id" value="<?php echo esc_attr($google_analytics_tracking_id); ?>" />
     115            <input name="google_analytics_tracking_id" value="<?php echo esc_attr(get_option('google_analytics_tracking_id')); ?>" />
    122116          </label>
    123117          <label class="google-ids">
    124118            <span class="title text-field-titles">Google Site Verification Code:</span>
    125             <input name="google_site_verification_id" value="<?php echo esc_attr($google_site_verification_id); ?>" />
     119            <input name="google_site_verification_id" value="<?php echo esc_attr(get_option('google_site_verification_id')); ?>" />
    126120          </label>
    127121          <label class="checkbox-options">
    128122            <span class="title">Enable Google Analytics:</span>
    129             <input type="checkbox" name="google_analytics_enabled" value="1" <?php checked(1, $google_analytics_enabled, true); ?> />
     123            <input type="checkbox" name="google_analytics_enabled" value="1" <?php checked(1, get_option('google_analytics_enabled'), true); ?> />
    130124          </label>
    131125          <label class="checkbox-options">
    132126            <span class="title">Enable Google Site Verification:</span>
    133             <input type="checkbox" name="google_site_verification_enabled" value="1" <?php checked(1, $google_analytics_enabled, true); ?> />
     127            <input type="checkbox" name="google_site_verification_enabled" value="1" <?php checked(1, get_option('google_analytics_enabled'), true); ?> />
    134128          </label>
    135129          <div class="script-placement">
  • easy-google-analytics-tracking/trunk/readme.txt

    r1517588 r1517791  
    88Stable tag: Trunk
    99License: GPLv2
    10 Version: 1.2.0
     10Version: 1.2.1
    1111
    1212== Description ==
     
    4646* Responsive admin settings: 16/06/2016
    4747
    48 = 1.2.0
     48= 1.2.0 =
    4949* Functionality to add tracking code to top or bottom of website source code: 18/10/2016
    5050* Google site verification added: 18/10/2016
    5151* Option to choose where google analytics code is outputted on website
     52
     53= 1.2.1 =
     54* textfield & Checkbox bug fix
Note: See TracChangeset for help on using the changeset viewer.