$summaryIndexes=$wpdb->get_results("SHOW INDEX FROM {$prefix}summary;");
foreach($summaryIndexesas$index){
if('ID_date'==$index->Key_name){
$wpdb->query("ALTER TABLE {$prefix}summary DROP INDEX ID_date, DROP INDEX last_viewed;");
break;
}
}
// Deletes old caching tables, if found
$wpdb->query("DROP TABLE IF EXISTS {$prefix}datacache, {$prefix}datacache_backup;");
// Check storage engine
$storage_engine_data=$wpdb->get_var("SELECT `ENGINE` FROM `information_schema`.`TABLES` WHERE `TABLE_SCHEMA`='{$wpdb->dbname}' AND `TABLE_NAME`='{$prefix}data';");
...
...
@@ -1209,10 +1203,10 @@ class WPP_Admin {
}
// Update WPP version
update_site_option('wpp_ver',$this->version);
update_option('wpp_ver',$this->version);
// Remove upgrade flag
delete_site_option('wpp_update');
delete_option('wpp_update');
}// end __upgrade
...
...
@@ -1268,7 +1262,7 @@ class WPP_Admin {
unset($_GET['activate']);
printf(
__('<div class="error"><p>%1$s</p><p><i>%2$s</i> has been <strong>deactivated</strong>.</p></div>','wordpress-popular-posts'),
__('<div class="notice notice-error"><p>%1$s</p><p><i>%2$s</i> has been <strong>deactivated</strong>.</p></div>','wordpress-popular-posts'),
<pclass="description"<?phpecho($this->options['tools']['log']['limit']==0)?' style="display:none;"':'';?>><?php_e("Data from entries that haven't been viewed within the specified time frame will be automatically discarded",'wordpress-popular-posts');?>.</p>
<pclass="description"<?phpecho($this->options['tools']['log']['limit']==0)?' style="display:none;"':'';?>><?php_e("Data older than the specified time frame will be automatically discarded",'wordpress-popular-posts');?>.</p>
$join.=" LEFT JOIN (SELECT postid, SUM(pageviews) AS pageviews FROM `{$wpdb->prefix}popularpostssummary` WHERE last_viewed > DATE_SUB('{$now}', INTERVAL {$interval}) GROUP BY postid) v ON p.ID = v.postid";
$join.=" LEFT JOIN (SELECT postid, SUM(pageviews) AS pageviews FROM `{$wpdb->prefix}popularpostssummary` WHERE view_datetime > DATE_SUB('{$now}', INTERVAL {$interval}) GROUP BY postid) v ON p.ID = v.postid";
<labelfor="<?phpecho$this->get_field_id('tax_id');?>"><?php_e('Taxonomy','wordpress-popular-posts');?>:</label><small>[<ahref="https://github.com/cabrerahector/wordpress-popular-posts/wiki/5.-FAQ#what-is-category-ids-for"title="<?php_e('What is this?','wordpress-popular-posts');?>"target="_blank">?</a>]</small><br/>
<labelfor="<?phpecho$this->get_field_id('tax_id');?>"><?php_e('Taxonomy','wordpress-popular-posts');?>:</label><small>[<ahref="https://github.com/cabrerahector/wordpress-popular-posts/wiki/5.-FAQ#what-is-taxonomy-for"title="<?php_e('What is this?','wordpress-popular-posts');?>"target="_blank">?</a>]</small><br/>