: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
if (!defined('WORDFENCE_VERSION')) { exit; }
$backPage = new wfPage(wfPage::PAGE_BLOCKING);
if (isset($_GET['source']) && wfPage::isValidPage($_GET['source'])) {
$backPage = new wfPage($_GET['source']);
<script type="application/javascript">
document.title = "<?php esc_attr_e('Blocking Options', 'wordfence'); ?>" + " \u2039 " + WFAD.basePageName;
//Hash-based option block linking
if (window.location.hash) {
var hashes = WFAD.parseHashes();
var hash = hashes[hashes.length - 1];
var block = $('.wf-block[data-persistence-key="' + hash + '"]');
if (!block.hasClass('wf-active')) {
block.find('.wf-block-content').slideDown({
block.addClass('wf-active');
$('html, body').animate({
scrollTop: block.offset().top - 100
WFAD.ajax('wordfence_saveDisclosureState', {name: block.data('persistenceKey'), state: true}, function() {});
$('html, body').animate({
scrollTop: block.offset().top - 100
history.replaceState('', document.title, window.location.pathname + window.location.search);
<div class="wf-options-controls">
<div class="wf-col-xs-12">
echo wfView::create('options/block-controls', array(
'backLink' => $backPage->url(),
'backLabelHTML' => wp_kses(sprintf(
/* translators: Page title/label. */
__('<span class="wf-hidden-xs">Back to </span>%s', 'wordfence'), $backPage->label()), array('span'=>array('class'=>array()))),
'restoreDefaultsSection' => wfConfig::OPTIONS_TYPE_BLOCKING,
'restoreDefaultsMessage' => __('Are you sure you want to restore the default Blocking settings? This will undo any custom changes you have made to the options on this page. Any existing blocks will be preserved.', 'wordfence'),
<div class="wf-options-controls-spacer"></div>
if (!wfOnboardingController::shouldShowAttempt3() && wfConfig::get('touppPromptNeeded')) {
echo wfView::create('gdpr/disabled-overlay')->render();
echo wfView::create('gdpr/banner')->render();
<div class="wrap wordfence">
<div class="wf-container-fluid">
if (function_exists('network_admin_url') && is_multisite()) {
$firewallURL = network_admin_url('admin.php?page=WordfenceWAF#top#waf');
$blockingURL = network_admin_url('admin.php?page=WordfenceWAF#top#blocking');
$firewallURL = admin_url('admin.php?page=WordfenceWAF#top#waf');
$blockingURL = admin_url('admin.php?page=WordfenceWAF#top#blocking');
<div class="wf-col-xs-12">
<div class="wp-header-end"></div>
<div class="<?php echo wfStyle::contentClasses(); ?>">
<div id="waf-options" class="wf-fixed-tab-content">
echo wfView::create('common/section-title', array(
'title' => __('Blocking Options', 'wordfence'),
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_FIREWALL_BLOCKING),
'helpLabelHTML' => wp_kses(__('Learn more<span class="wf-hidden-xs"> about Blocking</span>', 'wordfence'), array('span'=>array('class'=>array()))),
<div class="wf-col-xs-12">
<div class="wf-block wf-always-active">
<div class="wf-block-header">
<div class="wf-block-header-content">
<div class="wf-block-title">
<strong><?php esc_html_e('General', 'wordfence'); ?></strong>
<div class="wf-block-header-action"></div>
<div class="wf-block-content">
<ul class="wf-block-list">
echo wfView::create('options/option-toggled', array(
'optionName' => 'displayTopLevelBlocking',
'value' => wfConfig::get('displayTopLevelBlocking') ? 1 : 0,
'title' => __('Display Blocking menu option', 'wordfence'),
</div> <!-- end general options -->
echo wfView::create('blocking/options-group-advanced-country', array(
'stateKey' => 'blocking-options-country',
</div> <!-- end blocking options block -->
</div> <!-- end content block -->
</div> <!-- end container -->