keyStatus();
echo ' ' . AdminView::badge(__('Ready', 'aiwend'), 'success') . ' ' . esc_html__('Provider keys are encrypted before they are saved and are never shown again.', 'aiwend') . ' ' . esc_html($where) . ' ' . esc_html__('If your host or a security plugin ever changes the secret keys and salts in wp-config.php, Aiwend will notice, stop using the changed key, and ask you to enter the provider keys again. To avoid that, set AIWEND_SECRET_KEY in wp-config.php (see the readme).', 'aiwend') . '' . esc_html__('Encryption key for provider keys', 'aiwend') . '
';
if ($k['state'] === 'ready') {
$where = match ($k['source']) {
'constants' => __('It comes from wp-config.php (AIWEND_SECRET_KEY), outside the database.', 'aiwend'),
'both' => __('It comes from wp-config.php, with an older key file kept so keys saved earlier stay readable.', 'aiwend'),
'file' => __('It is read from a key file written by an earlier test version of Aiwend, outside the database. Aiwend will not write or move that file. You can switch to a line in wp-config.php whenever you like (see the readme).', 'aiwend'),
default => __('It is derived from the secret keys and salts in your wp-config.php, so nothing is stored in the database and nothing has to be set up.', 'aiwend'),
};
echo wp_kses('' . esc_html__('Why this key matters, and what to back up', 'aiwend') . '
'
. '
' . esc_html__('The secret keys and salts in wp-config.php have changed.', 'aiwend') . ' ' . esc_html__('Aiwend derived its encryption key from them, so provider keys saved earlier can no longer be read, and Aiwend will not silently start using a different key. Restore the previous salts if you can. Otherwise add a line AIWEND_SECRET_KEY to wp-config.php (see the readme) and enter the provider keys again.', 'aiwend') . '
' . esc_html__('The key file cannot be used.', 'aiwend') . ' ' . esc_html($why) . ' ' . esc_html__('Aiwend will not replace it, because that would make saved provider keys unreadable for good. Restore the key file from a backup, or add AIWEND_SECRET_KEY to wp-config.php.', 'aiwend') . '
' . esc_html__('No encryption key yet.', 'aiwend') . ' ' . esc_html__('Provider keys cannot be saved until there is one. The simulated demo does not need one. Aiwend normally derives the key from the secret keys and salts in wp-config.php, but the ones on this site are missing or still the sample text.', 'aiwend') . '
'; if (is_multisite() && !is_super_admin()) { echo '' . esc_html__('This is a multisite network: ask a network administrator to add the key.', 'aiwend') . '
' . esc_html__('Fix it in one of two ways, then reload this page:', 'aiwend') . '
' . esc_html__('Aiwend creates no key file. Keep wp-config.php with your backups: without the key, saved provider keys cannot be read after a restore and must be entered again.', 'aiwend') . '
'; } }