Alright, here’s what you need to do:
# On wordpress-popular-posts.php:
Find:
switch( $instance['range'] ) {
case 'all':
$range = "post_date_gmt < '".gmdate("Y-m-d H:i:s")."'";
break;
case 'daily':
$range = $table."cache.day = CURDATE()";
break;
case 'weekly':
$range = $table."cache.day >= '".gmdate("Y-m-d")."' - INTERVAL 7 DAY";
break;
case 'monthly':
$range = $table."cache.day >= '".gmdate("Y-m-d")."' - INTERVAL 30 DAY";
break;
default:
$range = "post_date_gmt < '".gmdate("Y-m-d H:i:s")."'";
break;
}
… and replace it with:
switch( $instance['range'] ) {
case 'all':
$range = "post_date_gmt < '".gmdate("Y-m-d H:i:s")."'";
break;
case 'yesterday':
$range = $table."cache.day >= '".gmdate("Y-m-d")."' - INTERVAL 1 DAY";
break;
case 'daily':
$range = $table."cache.day = CURDATE()";
break;
case 'weekly':
$range = $table."cache.day >= '".gmdate("Y-m-d")."' - INTERVAL 7 DAY";
break;
case 'monthly':
$range = $table."cache.day >= '".gmdate("Y-m-d")."' - INTERVAL 30 DAY";
break;
default:
$range = "post_date_gmt < '".gmdate("Y-m-d H:i:s")."'";
break;
}
Find:
// possible values for "Time Range" and "Order by"
$range_values = array("daily", "weekly", "monthly", "all");
… and replace it with:
// possible values for "Time Range" and "Order by"
$range_values = array("yesterday", "daily", "weekly", "monthly", "all");
# On stats.php:
Find:
<div id="wpp-stats-tabs">
<a href="#" class="button-primary" rel="wpp-daily"><?php _e("Today", "wordpress-popular-posts"); ?></a>
<a href="#" class="button-secondary" rel="wpp-weekly"><?php _e("Weekly", "wordpress-popular-posts"); ?></a>
<a href="#" class="button-secondary" rel="wpp-monthly"><?php _e("Monthly", "wordpress-popular-posts"); ?></a>
<a href="#" class="button-secondary" rel="wpp-all"><?php _e("All-time", "wordpress-popular-posts"); ?></a>
</div>
<div id="wpp-stats-canvas">
<div class="wpp-stats wpp-stats-active" id="wpp-daily">
<?php echo do_shortcode('[wpp range=today stats_views=1 order_by=views wpp_start=<ol> wpp_end=</ol>]'); ?>
</div>
<div class="wpp-stats" id="wpp-weekly">
<?php echo do_shortcode('[wpp range=weekly stats_views=1 order_by=views wpp_start=<ol> wpp_end=</ol>]'); ?>
</div>
<div class="wpp-stats" id="wpp-monthly">
<?php echo do_shortcode('[wpp range=monthly stats_views=1 order_by=views wpp_start=<ol> wpp_end=</ol>]'); ?>
</div>
<div class="wpp-stats" id="wpp-all">
<?php echo do_shortcode('[wpp range=all stats_views=1 order_by=views wpp_start=<ol> wpp_end=</ol>]'); ?>
</div>
</div>
… and replace it with:
<div id="wpp-stats-tabs">
<a href="#" class="button-primary" rel="wpp-yesterday"><?php _e("Yesterday", "wordpress-popular-posts"); ?></a>
<a href="#" class="button-secondary" rel="wpp-daily"><?php _e("Today", "wordpress-popular-posts"); ?></a>
<a href="#" class="button-secondary" rel="wpp-weekly"><?php _e("Weekly", "wordpress-popular-posts"); ?></a>
<a href="#" class="button-secondary" rel="wpp-monthly"><?php _e("Monthly", "wordpress-popular-posts"); ?></a>
<a href="#" class="button-secondary" rel="wpp-all"><?php _e("All-time", "wordpress-popular-posts"); ?></a>
</div>
<div id="wpp-stats-canvas">
<div class="wpp-stats wpp-stats-active" id="wpp-yesterday">
<?php echo do_shortcode('[wpp range=yesterday stats_views=1 order_by=views wpp_start=<ol> wpp_end=</ol>]'); ?>
</div>
<div class="wpp-stats" id="wpp-daily">
<?php echo do_shortcode('[wpp range=today stats_views=1 order_by=views wpp_start=<ol> wpp_end=</ol>]'); ?>
</div>
<div class="wpp-stats" id="wpp-weekly">
<?php echo do_shortcode('[wpp range=weekly stats_views=1 order_by=views wpp_start=<ol> wpp_end=</ol>]'); ?>
</div>
<div class="wpp-stats" id="wpp-monthly">
<?php echo do_shortcode('[wpp range=monthly stats_views=1 order_by=views wpp_start=<ol> wpp_end=</ol>]'); ?>
</div>
<div class="wpp-stats" id="wpp-all">
<?php echo do_shortcode('[wpp range=all stats_views=1 order_by=views wpp_start=<ol> wpp_end=</ol>]'); ?>
</div>
</div>
That should do it ??