prefix . 'aio_lockouts'; $current_time_mysql = current_time('mysql'); $current_time = time(); // Mảng active_blocks với định dạng $ip => $expires_timestamp $active_blocks = []; // Check if table exists (in case it wasn't created properly yet) if($wpdb->get_var("SHOW TABLES LIKE '$lockouts_table'") == $lockouts_table) { $results = $wpdb->get_results($wpdb->prepare("SELECT ip_address, expires_at FROM $lockouts_table WHERE expires_at > %s ORDER BY expires_at ASC LIMIT 100", $current_time_mysql)); foreach ($results as $row) { $active_blocks[$row->ip_address] = strtotime($row->expires_at); } } if (!empty($active_blocks)): ?> $expires): $mins = ceil(($expires - $current_time) / 60); ?>