Changeset 228570
- Timestamp:
- 04/13/2010 09:48:58 PM (16 years ago)
- Location:
- google-analyticator/trunk
- Files:
-
- 3 edited
-
google-analytics-stats-widget.php (modified) (2 diffs)
-
google-analytics-summary-widget.php (modified) (10 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
google-analyticator/trunk/google-analytics-stats-widget.php
r141084 r228570 197 197 { 198 198 # 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)); 200 200 201 201 # Check to make sure the timeframe is an int and greater than one … … 238 238 $uniques = number_format($stats->getMetric('ga:visitors', $before, $yesterday)); 239 239 240 # Make the array for database storage241 $visit = serialize(array('unique'=>$uniques, 'lastcalled'=>time()));242 243 240 # Store the array 244 update_option('google_stats_visits_' . $account, $visit);241 update_option('google_stats_visits_' . $account, array('unique'=>$uniques, 'lastcalled'=>time())); 245 242 246 243 # Return the visits -
google-analyticator/trunk/google-analytics-summary-widget.php
r180509 r228570 212 212 { 213 213 # 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)); 215 215 $updated = false; 216 216 … … 235 235 236 236 # 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())); 239 238 240 239 } … … 279 278 { 280 279 # 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)); 282 281 $updated = false; 283 282 … … 302 301 303 302 # 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())); 306 304 307 305 } … … 354 352 { 355 353 # 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)); 357 355 $updated = false; 358 356 … … 377 375 378 376 # 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())); 381 378 382 379 } … … 448 445 { 449 446 # 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)); 451 448 $updated = false; 452 449 … … 471 468 472 469 # 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())); 475 471 476 472 } … … 499 495 { 500 496 # 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)); 502 498 $updated = false; 503 499 … … 522 518 523 519 # 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())); 526 521 527 522 } -
google-analyticator/trunk/readme.txt
r182133 r228570 4 4 Tags: stats, statistics, google, analytics, google analytics, tracking, widget 5 5 Requires at least: 2.7 6 Tested up to: 2.96 Tested up to: 3.0 7 7 Stable tag: 6.0.2 8 8 … … 50 50 == Changelog == 51 51 52 = 6.0.3 = 53 * Prepares Google Analyticator for WordPress 3.0 compatibility. 54 52 55 = 6.0.2 = 53 56 * Updates the async tracking snippet to the latest version provided by Google.
Note: See TracChangeset
for help on using the changeset viewer.