public static function on_uninstall() { if (!current_user_can('activate_plugins')) { return; } check_admin_referer('bulk-plugins'); if (__FILE__ != WP_UNINSTALL_PLUGIN) { return; } ES_List_User_Searches_Database::clear_table(); }
<?php if (!empty($_POST) && check_admin_referer('es-reset-logs', '_esnonce')) { if (isset($_POST['es_reset_input']) && strtolower($_POST['es_reset_input']) === 'reset') { ES_List_User_Searches_Database::clear_table(); } } ?> <div class="wrap"> <h2>ES User Searches</h2> <h3>Total Searches</h3> <div style="width: 30%; float: left; margin-right: 2%;"> <table class="widefat"> <thead> <tr><th colspan="2">Totals</th></tr> </thead> <tbody> <tr> <th>When</th><th>Searches</th> </tr> <tr> <td style="padding: 3px 5px">Today and yesterday</td> <td style="padding: 3px 5px;"><?php echo ES_List_User_Searches_Overview::get_count_search_queries('last_day'); ?> </td> </tr> <tr> <td style="padding: 3px 5px">Last 7 days</td>