Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/wordfenc.../modules/login-se.../views/settings
File: user-stats.php
<?php
[0] Fix | Delete
if (!defined('WORDFENCE_LS_VERSION')) { exit; }
[1] Fix | Delete
/**
[2] Fix | Delete
* @var ?array $counts The counts to display or null to hide user counts.
[3] Fix | Delete
*/
[4] Fix | Delete
?>
[5] Fix | Delete
<div class="wfls-block wfls-always-active wfls-flex-item-full-width">
[6] Fix | Delete
<div class="wfls-block-header wfls-block-header-border-bottom">
[7] Fix | Delete
<div class="wfls-block-header-content">
[8] Fix | Delete
<div class="wfls-block-title">
[9] Fix | Delete
<h3><?php esc_html_e('User Summary', 'wordfence'); ?></h3>
[10] Fix | Delete
</div>
[11] Fix | Delete
</div>
[12] Fix | Delete
<div class="wfls-block-header-action wfls-block-header-action-text wfls-nowrap wfls-padding-add-right-responsive">
[13] Fix | Delete
<a href="users.php"><?php esc_html_e('Manage Users', 'wordfence'); ?></a>
[14] Fix | Delete
</div>
[15] Fix | Delete
</div>
[16] Fix | Delete
<?php if (is_array($counts)) : ?>
[17] Fix | Delete
<div class="wfls-block-content wfls-padding-no-left wfls-padding-no-right">
[18] Fix | Delete
<table class="wfls-table wfls-table-striped wfls-table-header-separators wfls-table-expanded wfls-no-bottom">
[19] Fix | Delete
<thead>
[20] Fix | Delete
<tr>
[21] Fix | Delete
<th><?php esc_html_e('Role', 'wordfence'); ?></th>
[22] Fix | Delete
<th class="wfls-center"><?php esc_html_e('Total Users', 'wordfence'); ?></th>
[23] Fix | Delete
<th class="wfls-center"><?php esc_html_e('2FA Active', 'wordfence'); ?></th>
[24] Fix | Delete
<th class="wfls-center"><?php esc_html_e('2FA Inactive', 'wordfence'); ?></th>
[25] Fix | Delete
</tr>
[26] Fix | Delete
</thead>
[27] Fix | Delete
<tbody>
[28] Fix | Delete
<?php
[29] Fix | Delete
$roles = new WP_Roles();
[30] Fix | Delete
$roleNames = $roles->get_names();
[31] Fix | Delete
$roleNames['super-admin'] = __('Super Administrator', 'wordfence');
[32] Fix | Delete
$roleNames[\WordfenceLS\Controller_Users::TRUNCATED_ROLE_KEY] = __('Custom Capabilities / Multiple Roles', 'wordfence');
[33] Fix | Delete
foreach ($counts['avail_roles'] as $roleTag => $count):
[34] Fix | Delete
$activeCount = (isset($counts['active_avail_roles'][$roleTag]) ? $counts['active_avail_roles'][$roleTag] : 0);
[35] Fix | Delete
$inactiveCount = $count - $activeCount;
[36] Fix | Delete
if ($activeCount === 0 && $inactiveCount === 0)
[37] Fix | Delete
continue;
[38] Fix | Delete
$roleName = $roleNames[$roleTag];
[39] Fix | Delete
$requiredAt = \WordfenceLS\Controller_Settings::shared()->get_required_2fa_role_activation_time($roleTag);
[40] Fix | Delete
$inactive = $inactiveCount > 0 && $requiredAt !== false;
[41] Fix | Delete
$viewUsersBaseUrl = 'admin.php?' . http_build_query(array('page' => 'WFLS', 'role'=> $roleTag));
[42] Fix | Delete
?>
[43] Fix | Delete
<tr>
[44] Fix | Delete
<td><?php echo \WordfenceLS\Text\Model_HTML::esc_html(translate_user_role($roleName)); ?></td>
[45] Fix | Delete
<td class="wfls-center"><?php echo number_format($count); ?></td>
[46] Fix | Delete
<td class="wfls-center"><?php echo number_format($activeCount); ?></td>
[47] Fix | Delete
<td class="wfls-center">
[48] Fix | Delete
<?php if ($inactive): ?><a href="<?php echo esc_attr(is_multisite() ? network_admin_url($viewUsersBaseUrl) : admin_url($viewUsersBaseUrl)); ?>"><?php endif ?>
[49] Fix | Delete
<?php echo number_format($inactiveCount); ?>
[50] Fix | Delete
<?php if ($inactive): ?> (<?php esc_html_e('View users', 'wordfence') ?>)</a><?php endif ?>
[51] Fix | Delete
</td>
[52] Fix | Delete
</tr>
[53] Fix | Delete
<?php endforeach; ?>
[54] Fix | Delete
</tbody>
[55] Fix | Delete
<tfoot>
[56] Fix | Delete
<tr>
[57] Fix | Delete
<th><?php esc_html_e('Total', 'wordfence'); ?></th>
[58] Fix | Delete
<th class="wfls-center"><?php echo number_format($counts['total_users']); ?></th>
[59] Fix | Delete
<th class="wfls-center"><?php echo number_format($counts['active_total_users']); ?></th>
[60] Fix | Delete
<th class="wfls-center"><?php echo number_format($counts['total_users'] - $counts['active_total_users']); ?></th>
[61] Fix | Delete
</tr>
[62] Fix | Delete
<?php if (is_multisite()): ?>
[63] Fix | Delete
<tr>
[64] Fix | Delete
<td colspan="4" class="wfls-text-small"><?php esc_html_e('* User counts currently only reflect the main site on multisite installations.', 'wordfence'); ?></td>
[65] Fix | Delete
</tr>
[66] Fix | Delete
<?php endif; ?>
[67] Fix | Delete
</tfoot>
[68] Fix | Delete
</table>
[69] Fix | Delete
</div>
[70] Fix | Delete
<?php else: ?>
[71] Fix | Delete
<div class="wfls-block-content wfls-padding-add-bottom">
[72] Fix | Delete
<p><?php $counts === null ? esc_html_e('User counts are hidden by default on sites with large numbers of users in order to improve performance.', 'wordfence') : esc_html_e('User counts are currently disabled as the most recent attempt to count users failed to complete successfully.', 'wordfence') ?></p>
[73] Fix | Delete
<a href="<?php echo esc_attr(add_query_arg('wfls-show-user-counts', 'true') . '#top#settings') ?>" class="wfls-btn wfls-btn-sm wfls-btn-primary"<?php if (\WordfenceLS\Controller_Users::shared()->should_force_user_counts()): ?> onclick="window.location.reload()"<?php endif ?>><?php $counts === null ? esc_html_e('Show User Counts', 'wordfence') : esc_html_e('Try Again', 'wordfence') ?></a>
[74] Fix | Delete
</div>
[75] Fix | Delete
<?php endif ?>
[76] Fix | Delete
</div>
[77] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function