: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
if (!defined('WORDFENCE_VERSION')) { exit; }
* Presents an install license prompt.
* Expects $state to be defined when applicable.
* @var string $error The error message. Optional.
* @var string $state The state of the installation. 'prompt' is the installation prompt. 'installed' is the completion view. 'bad' is if an error is encountered.
$title = __('Wordfence License Installation Successful', 'wordfence');
$title = __('Wordfence License Installation Failed', 'wordfence');
$title = __('Install Wordfence License', 'wordfence');
<title><?php echo esc_html($title); ?></title>
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
h1, h2, h3, h4, h45, h6 {
background-color: #00709e;
border: 1px solid #09486C;
border-top: 1px solid #eee
.btn.disabled, .btn[disabled] {
background-color: #9f9fa0;
border: 1px solid #7E7E7F;
filter: alpha(opacity=65);
-webkit-box-shadow: none;
<h3><?php echo esc_html($title); ?></h3>
<?php if ($state == 'installed'): ?>
<p><?php esc_html_e('The Wordfence license provided has been installed.', 'wordfence'); ?></p>
<p><?php echo wp_kses(printf(/* translators: WordPress admin URL */ __('Return to the <a href="%s">Wordfence Admin Page</a>', 'wordfence'), network_admin_url('admin.php?page=Wordfence')), array('a'=>array('href'=>array()))); ?></p>
<?php elseif ($state == 'bad'): ?>
<p><?php esc_html_e('The Wordfence license could not be installed.', 'wordfence'); echo ' ' . esc_html($error); ?></p>
<?php elseif ($state == 'prompt'): ?>
<p><?php esc_html_e('Please enter the license to install.', 'wordfence'); ?></p>
<form method="POST" action="<?php echo esc_attr(wfUtils::getSiteBaseURL() . '?_wfsf=installLicense'); ?>">
<p><input type="text" name="license"></p>
<?php wp_nonce_field('wf-form', 'nonce'); ?>
<p><input type="submit" class="btn" value="Install"></p>
<p style="color: #999999;margin-top: 2rem;"><em><?php esc_html_e('Generated by Wordfence at ', 'wordfence'); ?><?php echo gmdate('D, j M Y G:i:s T', wfWAFUtils::normalizedTime()); ?>.<br><?php esc_html_e('Your computer\'s time: ', 'wordfence'); ?><script type="application/javascript">document.write(new Date().toUTCString());</script>.</em></p>