function bebop_admin_flush_table() { if (!empty($_GET['page'])) { $current_page = $_GET['page']; if ($current_page == 'bebop_error_log' || $current_page == 'bebop_general_log') { if (isset($_GET)) { if (isset($_GET['clear_table'])) { if ($table_row_data = bebop_tables::flush_table_data('bp_' . $current_page)) { $_SESSION['bebop_admin_notice'] = true; } else { $_SESSION['bebop_admin_notice'] = __('Error clearing table data.', 'bebop'); } wp_safe_redirect($_SERVER['PHP_SELF'] . '?page=' . $current_page); exit; } } } } }