Changeset 615847
- Timestamp:
- 10/22/2012 11:41:02 PM (13 years ago)
- Location:
- activitysparks/trunk
- Files:
-
- 2 edited
-
activitysparks.php (modified) (4 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
activitysparks/trunk/activitysparks.php
r608727 r615847 5 5 Plugin URI: http://www.pantsonhead.com/wordpress/activitysparks/ 6 6 Description: A widget to display a customizable sparkline graph of post and/or comment activity. 7 Version: 0. 4.27 Version: 0.5 8 8 Author: Greg Jackson 9 9 Author URI: http://www.pantsonhead.com … … 51 51 52 52 $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title']); 53 $cachetime = intval($instance['cachetime'] [$category_id]);53 $cachetime = intval($instance['cachetime']); 54 54 55 55 if($cachetime){ 56 $url = $instance['url'][$category_id]; 57 if($url=='' OR (time()-intval($instance['url_time'][$category_id]))>$cachetime) { 58 $settings = get_option($this->option_name); 59 $url = $settings[$this->number]['url'][$category_id] = $this->build_url($instance); 60 $settings[$this->number]['url_time'][$category_id]=time(); 61 update_option( $this->option_name, $settings ); 56 $cachekey = md5($args['widget_id'].$category_id); 57 $url = get_transient($cachekey); 58 if($url===FALSE){ 59 $url = $this->build_url($instance,$category_id); 60 set_transient($cachekey,$url,$cachetime); 62 61 } 63 62 } else { … … 71 70 echo '<img src="'.$url.'">'; 72 71 echo $after_widget; 73 74 72 } 75 73 … … 135 133 $now_tick = $wpdb->get_row("SELECT ROUND((TO_DAYS(now()))/$period) tick")->tick; 136 134 137 $category_posts_join = $category_comments_join = $category_where = '';138 135 if($category_id) { 139 136 $category_posts_join = " INNER JOIN {$wpdb->prefix}term_relationships ON {$wpdb->prefix}posts.ID = {$wpdb->prefix}term_relationships.object_id -
activitysparks/trunk/readme.txt
r608727 r615847 56 56 == Changelog == 57 57 58 = v0.5 2012-10-23 = 59 60 * Fixed caching issues. 61 58 62 = v0.4.2 2012-10-05 = 59 63
Note: See TracChangeset
for help on using the changeset viewer.