Plugin Directory

Changeset 473725


Ignore:
Timestamp:
12/12/2011 03:08:19 AM (14 years ago)
Author:
mattrude
Message:

correct wp_cache

File:
1 edited

Legend:

Unmodified
Added
Removed
  • top-posts-pages-widget/trunk/top_posts_n_pages.php

    r473700 r473725  
    5050    <ul> <?php
    5151
    52     if ( function_exists('stats_get_csv') ) {
     52    if ( function_exists('top_post_ids',$blog_id) ) {
    5353      $top_posts = wp_cache_get('top_posts');
    5454      if ( false == $top_posts ) {
    5555        $top_posts = stats_get_csv('postviews', "days=7&limit=50" );
    56         wp_cache_set( 'stats_get_csv', $top_posts,$blog_id,'1800' );
     56        wp_cache_set( 'top_posts_ids',$top_posts,$blog_id,'1800' );
    5757      }
    5858      $pn = 1;
    59       foreach( $top_posts as $posts ) :
     59      foreach( $top_posts as $top_post ) :
    6060    if ( $pn <= $tpp_number_of_posts ) {
    61         $postid = get_post($posts['post_id']);
     61        $postid = get_post($top_post['post_id']);
    6262        if ( $tpp_show_pages == "off" ) {
    6363          if( $postid->post_type == "page" ) continue;
Note: See TracChangeset for help on using the changeset viewer.