Plugin Directory

Changeset 742347


Ignore:
Timestamp:
07/17/2013 03:49:34 PM (12 years ago)
Author:
andy
Message:

Jetpack Stats: remove encrypted_search_terms placeholder and fix blank under Top Posts when only post_id 0 has hits

File:
1 edited

Legend:

Unmodified
Added
Removed
  • jetpack/trunk/modules/stats.php

    r706924 r742347  
    921921    $printf = __( '%1$s %2$s Views' , 'jetpack' );
    922922
    923     foreach ( $top_posts = stats_get_csv( 'postviews', "days=$options[top]$csv_args[top]" ) as $post )
     923    foreach ( $top_posts = stats_get_csv( 'postviews', "days=$options[top]$csv_args[top]" ) as $i => $post ) {
     924        if ( $post['post_id'] == 0 ) {
     925            unset( $top_posts[$i] );
     926            continue;
     927        }
    924928        $post_ids[] = $post['post_id'];
     929    }
    925930
    926931    // cache
     
    928933
    929934    $searches = array();
    930     foreach ( $search_terms = stats_get_csv( 'searchterms', "days=$options[search]$csv_args[search]" ) as $search_term )
     935    foreach ( $search_terms = stats_get_csv( 'searchterms', "days=$options[search]$csv_args[search]" ) as $search_term ) {
     936        if ( $search_term['searchterm'] == 'encrypted_search_terms' )
     937            continue;
    931938        $searches[] = esc_html( $search_term['searchterm'] );
     939    }
    932940
    933941?>
Note: See TracChangeset for help on using the changeset viewer.