Plugin Directory

Changeset 228570


Ignore:
Timestamp:
04/13/2010 09:48:58 PM (16 years ago)
Author:
cavemonkey50
Message:

Prepares Google Analyticator for WordPress 3.0 compatibility.

Location:
google-analyticator/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • google-analyticator/trunk/google-analytics-stats-widget.php

    r141084 r228570  
    197197    {
    198198        # Get the value from the database
    199         $visits = unserialize(get_option('google_stats_visits_' . $account));
     199        $visits = maybe_unserialize(get_option('google_stats_visits_' . $account));
    200200
    201201        # Check to make sure the timeframe is an int and greater than one
     
    238238        $uniques = number_format($stats->getMetric('ga:visitors', $before, $yesterday));
    239239
    240         # Make the array for database storage
    241         $visit = serialize(array('unique'=>$uniques, 'lastcalled'=>time()));
    242 
    243240        # Store the array
    244         update_option('google_stats_visits_' . $account, $visit);
     241        update_option('google_stats_visits_' . $account, array('unique'=>$uniques, 'lastcalled'=>time()));
    245242
    246243        # Return the visits
  • google-analyticator/trunk/google-analytics-summary-widget.php

    r180509 r228570  
    212212    {
    213213        # Get the value from the database
    214         $cached = unserialize(get_option('google_stats_visitsGraph_' . $this->id));
     214        $cached = maybe_unserialize(get_option('google_stats_visitsGraph_' . $this->id));
    215215        $updated = false;
    216216
     
    235235           
    236236            # Store the serialized stats in the database
    237             $newStats = serialize(array('stats'=>$stats, 'lastcalled'=>time()));
    238             update_option('google_stats_visitsGraph_' . $this->id, $newStats);
     237            update_option('google_stats_visitsGraph_' . $this->id, array('stats'=>$stats, 'lastcalled'=>time()));
    239238       
    240239        }
     
    279278    {
    280279        # Get the value from the database
    281         $cached = unserialize(get_option('google_stats_siteUsage_' . $this->id));
     280        $cached = maybe_unserialize(get_option('google_stats_siteUsage_' . $this->id));
    282281        $updated = false;
    283282
     
    302301           
    303302            # Store the serialized stats in the database
    304             $newStats = serialize(array('stats'=>$stats, 'lastcalled'=>time()));
    305             update_option('google_stats_siteUsage_' . $this->id, $newStats);
     303            update_option('google_stats_siteUsage_' . $this->id, array('stats'=>$stats, 'lastcalled'=>time()));
    306304       
    307305        }
     
    354352    {
    355353        # Get the value from the database
    356         $cached = unserialize(get_option('google_stats_topPages_' . $this->id));
     354        $cached = maybe_unserialize(get_option('google_stats_topPages_' . $this->id));
    357355        $updated = false;
    358356
     
    377375           
    378376            # Store the serialized stats in the database
    379             $newStats = serialize(array('stats'=>$stats, 'lastcalled'=>time()));
    380             update_option('google_stats_topPages_' . $this->id, $newStats);
     377            update_option('google_stats_topPages_' . $this->id, array('stats'=>$stats, 'lastcalled'=>time()));
    381378       
    382379        }
     
    448445    {
    449446        # Get the value from the database
    450         $cached = unserialize(get_option('google_stats_topReferrers_' . $this->id));
     447        $cached = maybe_unserialize(get_option('google_stats_topReferrers_' . $this->id));
    451448        $updated = false;
    452449
     
    471468           
    472469            # Store the serialized stats in the database
    473             $newStats = serialize(array('stats'=>$stats, 'lastcalled'=>time()));
    474             update_option('google_stats_topReferrers_' . $this->id, $newStats);
     470            update_option('google_stats_topReferrers_' . $this->id, array('stats'=>$stats, 'lastcalled'=>time()));
    475471       
    476472        }
     
    499495    {
    500496        # Get the value from the database
    501         $cached = unserialize(get_option('google_stats_topSearches_' . $this->id));
     497        $cached = maybe_unserialize(get_option('google_stats_topSearches_' . $this->id));
    502498        $updated = false;
    503499
     
    522518           
    523519            # Store the serialized stats in the database
    524             $newStats = serialize(array('stats'=>$stats, 'lastcalled'=>time()));
    525             update_option('google_stats_topSearches_' . $this->id, $newStats);
     520            update_option('google_stats_topSearches_' . $this->id, array('stats'=>$stats, 'lastcalled'=>time()));
    526521       
    527522        }
  • google-analyticator/trunk/readme.txt

    r182133 r228570  
    44Tags: stats, statistics, google, analytics, google analytics, tracking, widget
    55Requires at least: 2.7
    6 Tested up to: 2.9
     6Tested up to: 3.0
    77Stable tag: 6.0.2
    88
     
    5050== Changelog ==
    5151
     52= 6.0.3 =
     53* Prepares Google Analyticator for WordPress 3.0 compatibility.
     54
    5255= 6.0.2 =
    5356* Updates the async tracking snippet to the latest version provided by Google.
Note: See TracChangeset for help on using the changeset viewer.