Advertisement
Guest User

Untitled

a guest
Oct 25th, 2014
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. // display widget
  2. function widget($args, $instance) {
  3.  
  4. extract( $args );
  5.  
  6. // get widget title
  7. $title = apply_filters('widget_title', $instance['title']);
  8.  
  9. // get options
  10. $token = $instance['token'];
  11. $tags = $instance['tags'];
  12. $unread = $instance['unread'];
  13. $range = $instance['range'];
  14.  
  15. // update linklist based on cache validity
  16. $isvalid = $this->_check_valid_cache( $instance['expires'], $range );
  17. if ( $isvalid === TRUE ) {
  18. $cache = $instance['cache'];
  19. $expires = $instance['expires'];
  20. } else {
  21. $cache = $this->_get_recent( $token );
  22. $expires = $isvalid;
  23. --> does not work!!
  24. $this->update($instance, $instance);
  25. }
  26. ...display widget...
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement