rebase from live enviornment

This commit is contained in:
Rachit Bhargava
2024-01-09 22:14:20 -05:00
parent ff0b49a046
commit 3a22fcaa4a
15968 changed files with 2344674 additions and 45234 deletions

View File

@@ -0,0 +1,217 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Shared parent view of all scan issues.
*
* Expects $internalType, $displayType, $iconSVG, and $controls.
*
* @var string $internalType The internal issue type used to select the correct template.
* @var string $displayType A human-readable string for displaying the issue type.
* @var string $iconSVG The SVG HTML for the issue's icon.
* @var array $summaryControls An array of summary controls for the issue type.
* @var array $detailPairs An array of label/value pairs for the issue's detail data. If the entry should only be conditionally shown, the value may be an array of the format array(conditional, displayValue).
* @var array $detailControls An array of detail controls for the issue type.
* @var array $textOutput If provided, used the content of the array to output plain text rather than the HTML template.
* @var array $textOutputDetailPairs An array of label/value pairs for the issue's detail data if outputting via text. If the entry should only be conditionally shown, the value may be an array of the format array(conditional, displayValue) where conditional is one or more keypaths that must all be truthy. It is preprocessed lightly for output: all values prefixed with $ will be treated as keypaths in the $textOutput array. If that is prefixed with ! for the conditional, its value will be inverted.
*/
if (!isset($textOutput) || !is_array($textOutput)):
?>
<script type="text/x-jquery-template" id="issueTmpl_<?php echo $internalType; ?>">
<ul class="wf-issue wf-issue-<?php echo $internalType; ?>
{{if severity == <?php echo wfIssues::SEVERITY_CRITICAL ?>}}wf-issue-severity-critical{{/if}}
{{if severity == <?php echo wfIssues::SEVERITY_HIGH ?>}}wf-issue-severity-high{{/if}}
{{if severity == <?php echo wfIssues::SEVERITY_MEDIUM ?>}}wf-issue-severity-medium{{/if}}
{{if severity == <?php echo wfIssues::SEVERITY_LOW ?>}}wf-issue-severity-low{{/if}}" data-issue-id="${id}" data-issue-type="<?php echo $internalType; ?>" data-issue-severity="${severity}" data-high-sensitivity="{{if (data.highSense == '1')}}1{{else}}0{{/if}}">
<li class="wf-issue-summary">
<ul>
<li class="wf-issue-icon"><?php echo $iconSVG; ?></li>
<li class="wf-issue-short wf-hidden-xs"><div class="wf-issue-message">${shortMsg}</div><div class="wf-issue-type"><?php echo __('Type:', 'wordfence') . ' ' . $displayType; ?></div></li>
<li class="wf-issue-stats wf-hidden-xs">
<div class="wf-issue-time"><?php esc_html_e('Issue Found ', 'wordfence'); ?> ${displayTime}</div>
{{if severity == <?php echo wfIssues::SEVERITY_CRITICAL ?>}}<div class="wf-issue-severity-critical"><?php echo esc_html__('Critical', 'wordfence'); ?></div>{{/if}}
{{if severity == <?php echo wfIssues::SEVERITY_HIGH ?>}}<div class="wf-issue-severity-high"><?php echo esc_html__('High', 'wordfence'); ?></div>{{/if}}
{{if severity == <?php echo wfIssues::SEVERITY_MEDIUM ?>}}<div class="wf-issue-severity-medium"><?php echo esc_html__('Medium', 'wordfence'); ?></div>{{/if}}
{{if severity == <?php echo wfIssues::SEVERITY_LOW ?>}}<div class="wf-issue-severity-low"><?php echo esc_html__('Low', 'wordfence'); ?></div>{{/if}}
</li>
<li class="wf-issue-short-stats wf-hidden-sm wf-hidden-md wf-hidden-lg">
<div class="wf-issue-message wf-split-word-xs">${shortMsg}</div>
<div class="wf-issue-type"><?php echo esc_html__('Type:', 'wordfence') . ' ' . $displayType; ?></div>
<div class="wf-issue-time"><?php esc_html_e('Found ', 'wordfence'); ?> ${displayTime}</div>
{{if severity == <?php echo wfIssues::SEVERITY_CRITICAL ?>}}<div class="wf-issue-severity-critical"><?php echo esc_html__('Critical', 'wordfence'); ?></div>{{/if}}
{{if severity == <?php echo wfIssues::SEVERITY_HIGH ?>}}<div class="wf-issue-severity-high"><?php echo esc_html__('High', 'wordfence'); ?></div>{{/if}}
{{if severity == <?php echo wfIssues::SEVERITY_MEDIUM ?>}}<div class="wf-issue-severity-medium"><?php echo esc_html__('Medium', 'wordfence'); ?></div>{{/if}}
{{if severity == <?php echo wfIssues::SEVERITY_LOW ?>}}<div class="wf-issue-severity-low"><?php echo esc_html__('Low', 'wordfence'); ?></div>{{/if}}
<div class="wf-issue-controls"><?php echo implode("\n", $summaryControls); ?></div>
</li>
<li class="wf-issue-controls wf-hidden-xs"><?php echo implode("\n", $summaryControls); ?></li>
</ul>
</li>
<li class="wf-issue-detail">
<ul>
<!--<li><strong><?php esc_html_e('Status', 'wordfence'); ?>: </strong>{{if status == 'new' }}<?php esc_html_e('New', 'wordfence'); ?>{{/if}}{{if status == 'ignoreP' || status == 'ignoreC' }}<?php esc_html_e('Ignored', 'wordfence'); ?>{{/if}}</li>
<li><strong><?php esc_html_e('Issue First Detected', 'wordfence'); ?>: </strong>${timeAgo} <?php esc_html_e('ago', 'wordfence'); ?>.</li>-->
<?php
foreach ($detailPairs as $label => $value):
if ($value === null) {
echo '<li class="wf-issue-detail-spacer"></li>';
continue;
}
unset($conditional);
if (is_array($value)) {
$conditional = $value[0];
$value = $value[1];
}
if (isset($conditional)) { echo '{{if (' . $conditional . ')}}'; }
?>
<li><strong><?php echo esc_html($label); ?>: </strong><?php echo wp_kses($value, array(
'a' => array(
'href'=>array(),
'target'=>array(),
'rel'=>array(),
'class'=>array()
),
'strong' => array(
'class'=>array()
),
'br' => array(
),
'span' => array(
'class'=>array(),
'data-tooltip'=>array(),
'title'=>array(),
)
)); ?></li>
<?php
if (isset($conditional)) { echo '{{/if}}'; }
endforeach;
?>
<?php if (count($detailControls)): ?>
<li class="wf-issue-detail-controls"><?php echo implode("\n", $detailControls); ?></li>
<?php endif; ?>
</ul>
</li>
</ul>
</script>
<?php else: ?>
<?php
echo '[' . $displayType . ($textOutput['status'] == 'ignoreP' || $textOutput['status'] == 'ignoreP' ? ', ' . __('Ignored', 'wordfence') : '') . ']' . "\n";
echo $textOutput['shortMsg'] . "\n";
echo sprintf(/* translators: Localized date. */ __('Issue Found: %s', 'wordfence'), $textOutput['displayTime']) . "\n";
$severity = null;
switch ($textOutput['severity']) {
case wfIssues::SEVERITY_CRITICAL:
$severity = __('Critical', 'wordfence');
break;
case wfIssues::SEVERITY_HIGH:
$severity = __('High', 'wordfence');
break;
case wfIssues::SEVERITY_MEDIUM:
$severity = __('Medium', 'wordfence');
break;
case wfIssues::SEVERITY_LOW:
$severity = __('Low', 'wordfence');
break;
default:
$severity = __('None', 'wordfence');
break;
}
if ($severity) {
echo sprintf(/* translators: Severity level. */ __('Severity: %s', 'wordfence'), $severity) . "\n";
}
foreach ($textOutputDetailPairs as $label => $value) {
if ($value === null) {
echo "\n";
continue;
}
unset($conditional);
if (is_array($value)) {
$conditional = $value[0];
if (!is_array($conditional)) {
$conditional = array($conditional);
}
$value = $value[1];
}
$allow = true;
if (isset($conditional)) {
foreach ($conditional as $test) {
if (!$allow) {
break;
}
if (preg_match('/^!?\$(\S+)/', $test, $matches)) {
$invert = (strpos($test, '!') === 0);
$components = explode('.', $matches[1]);
$tier = $textOutput;
foreach ($components as $index => $c) {
if (is_array($tier) && !isset($tier[$c])) {
if (!$invert) {
$allow = false;
}
break;
}
if ($index == count($components) - 1 && is_array($tier)) {
if ((!$tier[$c] && !$invert) || ($tier[$c] && $invert)) {
$allow = false;
}
break;
}
else if (!is_array($tier)) {
$allow = false;
break;
}
$tier = $tier[$c];
}
}
}
}
if (!$allow) {
continue;
}
if (preg_match_all('/(?<=^|\s)\$(\S+)(?=$|\s)/', $value, $matches, PREG_OFFSET_CAPTURE)) {
array_shift($matches);
$matches = $matches[0];
$matches = array_reverse($matches);
foreach ($matches as $m) {
$resolvedKeyPath = '';
$components = explode('.', $m[0]);
$tier = $textOutput;
foreach ($components as $index => $c) {
if (is_array($tier) && !isset($tier[$c])) {
$allow = false;
break 2;
}
if ($index == count($components) - 1 && is_array($tier)) {
$resolvedKeyPath = (string) $tier[$c];
break;
}
else if (!is_array($tier)) {
$allow = false;
break 2;
}
$tier = $tier[$c];
}
$value = substr($value, 0, $m[1] - 1) . strip_tags($resolvedKeyPath) . substr($value, $m[1] + strlen($m[0]));
}
}
if (!$allow) {
continue;
}
echo $label . ': ' . $value . "\n";
}
?>
<?php endif; ?>

View File

@@ -0,0 +1,25 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'checkGSB',
'displayType' => __('URL', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 106.37 106.37"><path d="M100.89,64.92,87.34,51.36a18.89,18.89,0,0,0-26.85.26l-5.74-5.73a18.34,18.34,0,0,0,5.74-13.62A18,18,0,0,0,55.07,19L41.65,5.54A17.86,17.86,0,0,0,28.35,0,18,18,0,0,0,15.12,5.41L5.54,14.93A17.79,17.79,0,0,0,0,28.16a18.09,18.09,0,0,0,5.48,13.3L19,55a18.12,18.12,0,0,0,13.3,5.48,18.27,18.27,0,0,0,13.56-5.74l5.73,5.74a18.32,18.32,0,0,0-5.73,13.62A18,18,0,0,0,51.3,87.34l13.43,13.49a18.81,18.81,0,0,0,26.53.13l9.58-9.52a17.79,17.79,0,0,0,5.54-13.23,18.1,18.1,0,0,0-5.48-13.3ZM45.89,37l-1.21-1.24c-.67-.7-1.14-1.16-1.4-1.4s-.68-.56-1.24-1a5.26,5.26,0,0,0-1.66-.85,6.64,6.64,0,0,0-1.79-.23,6.24,6.24,0,0,0-6.26,6.26,6.6,6.6,0,0,0,.23,1.79A5.19,5.19,0,0,0,33.41,42a14.48,14.48,0,0,0,1,1.24c.24.26.71.73,1.4,1.4L37,45.89a6.3,6.3,0,0,1-4.7,2,6,6,0,0,1-4.43-1.76L14.34,32.59a6,6,0,0,1-1.82-4.43,5.94,5.94,0,0,1,1.82-4.36l9.58-9.52a6.3,6.3,0,0,1,4.43-1.76,6,6,0,0,1,4.43,1.83L46.21,27.83A6,6,0,0,1,48,32.26,6.33,6.33,0,0,1,45.89,37ZM92,82.58,82.45,92.1A6.28,6.28,0,0,1,78,93.79,6,6,0,0,1,73.59,92L60.16,78.54a6,6,0,0,1-1.82-4.43,6.33,6.33,0,0,1,2.15-4.76l1.21,1.24c.67.69,1.14,1.16,1.4,1.4a15,15,0,0,0,1.24,1,5.18,5.18,0,0,0,1.66.85,6.6,6.6,0,0,0,1.79.23A6.23,6.23,0,0,0,74,67.79,6.76,6.76,0,0,0,73.82,66,5.34,5.34,0,0,0,73,64.33c-.41-.56-.74-1-1-1.24s-.71-.73-1.4-1.4l-1.24-1.2A6.2,6.2,0,0,1,74,58.4a6,6,0,0,1,4.43,1.82L92,73.78a6,6,0,0,1,1.83,4.43A6,6,0,0,1,92,82.58Zm0,0"/></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-ignore', array('ignoreP' => __('Ignore', 'wordfence'))), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('Bad URL', 'wordfence') => array('(typeof data.badURL !== \'undefined\') && data.badURL', '<strong class="wfWarn wf-split-word">${data.badURL}</strong>'),
null,
__('Details', 'wordfence') => '{{html longMsg}}',
),
'detailControls' => array(
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('Bad URL', 'wordfence') => '$data.badURL',
null,
__('Details', 'wordfence') => '$longMsg',
),
))->render();

View File

@@ -0,0 +1,22 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'checkHowGetIPs',
'displayType' => __('IP Detection', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 20 20"><g><path d="M18 13h1c.55 0 1 .45 1 1.01v2.98c0 .56-.45 1.01-1 1.01h-4c-.55 0-1-.45-1-1.01v-2.98c0-.56.45-1.01 1-1.01h1v-2h-5v2h1c.55 0 1 .45 1 1.01v2.98c0 .56-.45 1.01-1 1.01H8c-.55 0-1-.45-1-1.01v-2.98c0-.56.45-1.01 1-1.01h1v-2H4v2h1c.55 0 1 .45 1 1.01v2.98C6 17.55 5.55 18 5 18H1c-.55 0-1-.45-1-1.01v-2.98C0 13.45.45 13 1 13h1v-2c0-1.1.9-2 2-2h5V7H8c-.55 0-1-.45-1-1.01V3.01C7 2.45 7.45 2 8 2h4c.55 0 1 .45 1 1.01v2.98C13 6.55 12.55 7 12 7h-1v2h5c1.1 0 2 .9 2 2v2z"/></g></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-ignore', array('ignoreP' => __('Ignore', 'wordfence'))), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('Details', 'wordfence') => '{{html longMsg}}',
),
'detailControls' => array(
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle" onclick="WFAD.useRecommendedHowGetIPs(\'${id}\'); return false;" role="button">' . __('Use Recommended Value', 'wordfence') . '</a>',
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('Details', 'wordfence') => '$longMsg',
),
))->render();

View File

@@ -0,0 +1,21 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'checkSpamIP',
'displayType' => __('Spam', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 20 20"><g><path d="M18 13h1c.55 0 1 .45 1 1.01v2.98c0 .56-.45 1.01-1 1.01h-4c-.55 0-1-.45-1-1.01v-2.98c0-.56.45-1.01 1-1.01h1v-2h-5v2h1c.55 0 1 .45 1 1.01v2.98c0 .56-.45 1.01-1 1.01H8c-.55 0-1-.45-1-1.01v-2.98c0-.56.45-1.01 1-1.01h1v-2H4v2h1c.55 0 1 .45 1 1.01v2.98C6 17.55 5.55 18 5 18H1c-.55 0-1-.45-1-1.01v-2.98C0 13.45.45 13 1 13h1v-2c0-1.1.9-2 2-2h5V7H8c-.55 0-1-.45-1-1.01V3.01C7 2.45 7.45 2 8 2h4c.55 0 1 .45 1 1.01v2.98C13 6.55 12.55 7 12 7h-1v2h5c1.1 0 2 .9 2 2v2z"/></g></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-ignore', array('ignoreP' => __('Ignore', 'wordfence'))), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('Details', 'wordfence') => '{{html longMsg}}',
),
'detailControls' => array(
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('Details', 'wordfence') => '$longMsg',
),
))->render();

View File

@@ -0,0 +1,37 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'commentBadURL',
'displayType' => __('URL', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 106.37 106.37"><path d="M100.89,64.92,87.34,51.36a18.89,18.89,0,0,0-26.85.26l-5.74-5.73a18.34,18.34,0,0,0,5.74-13.62A18,18,0,0,0,55.07,19L41.65,5.54A17.86,17.86,0,0,0,28.35,0,18,18,0,0,0,15.12,5.41L5.54,14.93A17.79,17.79,0,0,0,0,28.16a18.09,18.09,0,0,0,5.48,13.3L19,55a18.12,18.12,0,0,0,13.3,5.48,18.27,18.27,0,0,0,13.56-5.74l5.73,5.74a18.32,18.32,0,0,0-5.73,13.62A18,18,0,0,0,51.3,87.34l13.43,13.49a18.81,18.81,0,0,0,26.53.13l9.58-9.52a17.79,17.79,0,0,0,5.54-13.23,18.1,18.1,0,0,0-5.48-13.3ZM45.89,37l-1.21-1.24c-.67-.7-1.14-1.16-1.4-1.4s-.68-.56-1.24-1a5.26,5.26,0,0,0-1.66-.85,6.64,6.64,0,0,0-1.79-.23,6.24,6.24,0,0,0-6.26,6.26,6.6,6.6,0,0,0,.23,1.79A5.19,5.19,0,0,0,33.41,42a14.48,14.48,0,0,0,1,1.24c.24.26.71.73,1.4,1.4L37,45.89a6.3,6.3,0,0,1-4.7,2,6,6,0,0,1-4.43-1.76L14.34,32.59a6,6,0,0,1-1.82-4.43,5.94,5.94,0,0,1,1.82-4.36l9.58-9.52a6.3,6.3,0,0,1,4.43-1.76,6,6,0,0,1,4.43,1.83L46.21,27.83A6,6,0,0,1,48,32.26,6.33,6.33,0,0,1,45.89,37ZM92,82.58,82.45,92.1A6.28,6.28,0,0,1,78,93.79,6,6,0,0,1,73.59,92L60.16,78.54a6,6,0,0,1-1.82-4.43,6.33,6.33,0,0,1,2.15-4.76l1.21,1.24c.67.69,1.14,1.16,1.4,1.4a15,15,0,0,0,1.24,1,5.18,5.18,0,0,0,1.66.85,6.6,6.6,0,0,0,1.79.23A6.23,6.23,0,0,0,74,67.79,6.76,6.76,0,0,0,73.82,66,5.34,5.34,0,0,0,73,64.33c-.41-.56-.74-1-1-1.24s-.71-.73-1.4-1.4l-1.24-1.2A6.2,6.2,0,0,1,74,58.4a6,6,0,0,1,4.43,1.82L92,73.78a6,6,0,0,1,1.83,4.43A6,6,0,0,1,92,82.58Zm0,0"/></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-edit-comment'), wfView::create('scanner/issue-control-ignore'), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('Author', 'wordfence') => '${data.author}',
__('Bad URL', 'wordfence') => '<strong class="wfWarn wf-split-word">${data.badURL}</strong>',
__('Posted on', 'wordfence') => '${data.commentDate}',
null,
__('Details', 'wordfence') => '{{html longMsg}}',
null,
__('Multisite Blog ID', 'wordfence') => array('data.isMultisite', '${data.blog_id}'),
__('Multisite Blog Domain', 'wordfence') => array('data.isMultisite', '${data.domain}'),
__('Multisite Blog Path', 'wordfence') => array('data.isMultisite', '${data.path}'),
),
'detailControls' => array(
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('Author', 'wordfence') => '$data.author',
__('Bad URL', 'wordfence') => '$data.badURL',
__('Posted on', 'wordfence') => '$data.commentDate',
null,
__('Details', 'wordfence') => '$longMsg',
null,
__('Multisite Blog ID', 'wordfence') => array('$data.isMultisite', '$data.blog_id'),
__('Multisite Blog Domain', 'wordfence') => array('$data.isMultisite', '$data.domain'),
__('Multisite Blog Path', 'wordfence') => array('$data.isMultisite', '$data.path'),
),
))->render();

View File

@@ -0,0 +1,27 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'configReadable',
'displayType' => __('Publicly Accessible Config/Backup/Log', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 20 20"><g><path d="M18 16V4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h13c.55 0 1-.45 1-1zM8 11h1c.55 0 1 .45 1 1s-.45 1-1 1H8v1.5c0 .28-.22.5-.5.5s-.5-.22-.5-.5V13H6c-.55 0-1-.45-1-1s.45-1 1-1h1V5.5c0-.28.22-.5.5-.5s.5.22.5.5V11zm5-2h-1c-.55 0-1-.45-1-1s.45-1 1-1h1V5.5c0-.28.22-.5.5-.5s.5.22.5.5V7h1c.55 0 1 .45 1 1s-.45 1-1 1h-1v5.5c0 .28-.22.5-.5.5s-.5-.22-.5-.5V9z"/></g></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-hide-file'), wfView::create('scanner/issue-control-ignore', array('ignoreC' => __('Ignore', 'wordfence'))), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('URL', 'wordfence') => '<a href="${data.url}" target="_blank" rel="noopener noreferrer">${data.url}<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>',
null,
__('Details', 'wordfence') => '{{html longMsg}}'
),
'detailControls' => array(
'{{if data.fileExists}}<a target="_blank" class="wf-btn wf-btn-default wf-btn-callout-subtle" rel="noopener noreferrer" href="${WFAD.makeViewFileLink(data)}">' . __('View File', 'wordfence') . '<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>{{/if}}',
'{{if data.canDelete}}<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-delete-file" role="button">' . __('Delete File', 'wordfence') . '</a>{{/if}}',
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('URL', 'wordfence') => '$data.url',
null,
__('Details', 'wordfence') => '$longMsg',
),
))->render();

View File

@@ -0,0 +1,4 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
?>
<a href="${data.editCommentLink}" class="wf-issue-control wf-issue-control-edit-comment"><svg class="wf-issue-control-icon" viewBox="0 0 20 20"><rect x="0" fill="none" width="20" height="20"/><g><path d="M5 2h9c1.1 0 2 .9 2 2v7c0 1.1-.9 2-2 2h-2l-5 5v-5H5c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2z"/></g></svg><span class="wf-issue-control-label"><?php esc_html_e('Edit', 'wordfence'); ?></span></a>

View File

@@ -0,0 +1,4 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
?>
<a href="${data.editPostLink}" class="wf-issue-control wf-issue-control-edit-post"><svg class="wf-issue-control-icon" viewBox="0 0 20 20"><rect x="0" fill="none" width="20" height="20"/><g><path d="M10.44 3.02l1.82-1.82 6.36 6.35-1.83 1.82c-1.05-.68-2.48-.57-3.41.36l-.75.75c-.92.93-1.04 2.35-.35 3.41l-1.83 1.82-2.41-2.41-2.8 2.79c-.42.42-3.38 2.71-3.8 2.29s1.86-3.39 2.28-3.81l2.79-2.79L4.1 9.36l1.83-1.82c1.05.69 2.48.57 3.4-.36l.75-.75c.93-.92 1.05-2.35.36-3.41z"/></g></svg><span class="wf-issue-control-label"><?php esc_html_e('Edit', 'wordfence'); ?></span></a>

View File

@@ -0,0 +1,4 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
?>
<a href="${data.editUserLink}" class="wf-issue-control wf-issue-control-edit-user"><svg class="wf-issue-control-icon" viewBox="0 0 91.77 100.11"><path d="M45.89,50.06a24.1,24.1,0,0,0,17.69-7.34A24.1,24.1,0,0,0,70.91,25a24.11,24.11,0,0,0-7.33-17.7A24.12,24.12,0,0,0,45.89,0a24.12,24.12,0,0,0-17.7,7.33A24.11,24.11,0,0,0,20.86,25a24.1,24.1,0,0,0,7.33,17.7,24.11,24.11,0,0,0,17.7,7.34Zm0,0"/><path d="M91.54,76.49a66.22,66.22,0,0,0-.91-7.1,54.55,54.55,0,0,0-1.73-7.07A33.35,33.35,0,0,0,86.1,56a22.92,22.92,0,0,0-4-5.28,17,17,0,0,0-5.57-3.49,19.61,19.61,0,0,0-7.27-1.3,8,8,0,0,0-2.74,1.4q-2.15,1.41-4.86,3.13a30.77,30.77,0,0,1-7,3.13,27.68,27.68,0,0,1-17.4,0,30.59,30.59,0,0,1-7-3.13q-2.71-1.72-4.86-3.13a8,8,0,0,0-2.74-1.4,19.6,19.6,0,0,0-7.27,1.3,17,17,0,0,0-5.57,3.49,22.9,22.9,0,0,0-4,5.28,33.29,33.29,0,0,0-2.8,6.35,55.38,55.38,0,0,0-1.73,7.07,66.22,66.22,0,0,0-.91,7.1Q0,79.78,0,83.24q0,7.82,4.76,12.35t12.64,4.53h57q7.89,0,12.65-4.53t4.76-12.35q0-3.46-.23-6.75Zm0,0"/></svg><span class="wf-issue-control-label"><?php esc_html_e('Edit', 'wordfence'); ?></span></a>

View File

@@ -0,0 +1,4 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
?>
<a href="#" class="wf-issue-control wf-issue-control-hide-file" role="button"><svg class="wf-issue-control-icon" viewBox="0 0 46 55" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><path d="M43.557,13.609l-11.214,-11.175c-1.303,-1.246 -2.962,-2.058 -4.747,-2.324l0,18.223l18.294,0c-0.269,-1.777 -1.084,-3.427 -2.333,-4.724l0,0Z" style="fill-rule:nonzero;"/><path d="M45.994,22.921l0,28.645c0.001,0.006 0.001,0.011 0.001,0.017c0,1.877 -1.551,3.423 -3.435,3.423c-0.004,0 -0.008,0 -0.012,-0.001l-39.102,0c-0.919,0.018 -1.804,-0.347 -2.443,-1.005c-0.658,-0.637 -1.022,-1.519 -1.003,-2.434l0,-48.127c-0.019,-0.914 0.345,-1.797 1.003,-2.434c0.64,-0.659 1.528,-1.024 2.449,-1.005l19.562,0l0,19.482c0,0.005 0,0.011 0,0.016c0,1.878 1.55,3.423 3.435,3.423l0.016,0l19.529,0Zm-15.947,6.153c0.015,-0.05 0.02,-0.103 0.016,-0.155c0.002,-0.191 -0.099,-0.369 -0.264,-0.464l-0.335,-0.198c-0.195,-0.107 -0.378,-0.213 -0.551,-0.316c-0.171,-0.103 -0.361,-0.208 -0.567,-0.317c-0.205,-0.108 -0.382,-0.197 -0.527,-0.263c-0.097,-0.055 -0.203,-0.092 -0.314,-0.108c-0.197,-0.01 -0.383,0.092 -0.482,0.263l-0.928,1.68c-1.02,-0.193 -2.055,-0.291 -3.092,-0.293c-3.002,-0.022 -5.952,0.786 -8.524,2.336c-2.638,1.594 -4.872,3.776 -6.53,6.374c-0.458,0.723 -0.458,1.65 0,2.373c0.998,1.562 2.204,2.981 3.583,4.218c1.35,1.213 2.877,2.213 4.529,2.964c-0.504,0.859 -0.756,1.357 -0.756,1.494c-0.01,0.198 0.092,0.384 0.263,0.483c1.406,0.801 2.174,1.202 2.304,1.202c0.197,0.009 0.382,-0.093 0.48,-0.264l0.854,-1.539c1.215,-2.166 3.025,-5.417 5.431,-9.755c2.406,-4.337 4.21,-7.576 5.41,-9.715Zm8.009,8.539c-0.7,-1.149 -1.533,-2.21 -2.483,-3.163c-0.954,-0.982 -2.004,-1.865 -3.135,-2.636l-1.083,1.924c1.938,1.345 3.586,3.067 4.845,5.062c-1.337,2.102 -3.102,3.898 -5.18,5.273c-2.013,1.344 -4.335,2.154 -6.747,2.354l-1.273,2.267c2.495,0.011 4.961,-0.547 7.208,-1.632c2.284,-1.103 4.316,-2.665 5.971,-4.587c0.69,-0.779 1.316,-1.612 1.872,-2.491c0.458,-0.723 0.458,-1.65 0,-2.373l0.005,0.002Zm-20.911,7.633c-2.988,-1.341 -5.434,-3.489 -7.337,-6.444c1.598,-2.571 3.859,-4.666 6.546,-6.063c-1.319,2.252 -1.397,5.03 -0.206,7.353c0.548,1.084 1.35,2.021 2.336,2.731l-1.339,2.423Zm12.198,-4.284c0.895,-1.277 1.37,-2.802 1.358,-4.361c-0.004,-0.483 -0.05,-0.964 -0.137,-1.439l-4.812,8.621c1.459,-0.548 2.713,-1.534 3.591,-2.821Zm-5.755,-8.173c-0.153,0.158 -0.365,0.245 -0.585,0.24c-1.959,0.003 -3.571,1.613 -3.575,3.572c0,0.453 -0.373,0.825 -0.825,0.825c-0.453,0 -0.826,-0.372 -0.826,-0.825c-0.019,-1.389 0.537,-2.726 1.537,-3.691c0.965,-1 2.302,-1.557 3.691,-1.537c0.454,0 0.828,0.374 0.828,0.828c0,0.221 -0.088,0.433 -0.245,0.588l0,0Z"></svg><span class="wf-issue-control-label"><?php esc_html_e('Hide File', 'wordfence'); ?></span></a>

View File

@@ -0,0 +1,13 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* One or both of $ignoreC and $ignoreP will be defined. If only one is defined, the ignore button will default to that. If both are defined, the user will be presented with a choice.
*/
?>
<a href="#" class="wf-issue-control wf-issue-control-ignore" data-ignore-action="{{if status == 'new'}}<?php if (isset($ignoreC) && isset($ignoreP)) { echo 'choice'; } else { echo isset($ignoreC) ? 'ignoreC' : 'ignoreP'; } ?>{{else}}new{{/if}}" role="button"><svg class="wf-issue-control-icon" viewBox="0 0 116.8 87.6"><path d="M82.45,52A28.43,28.43,0,0,0,87.6,35.46,31.39,31.39,0,0,0,87.08,30L68.83,62.7A28.69,28.69,0,0,0,82.45,52Zm0,0"/><path d="M85.12,6.91a1.64,1.64,0,0,0,.06-.59,2,2,0,0,0-1-1.76l-1.27-.75Q81.8,3.2,80.82,2.61c-.65-.39-1.37-.79-2.15-1.2s-1.45-.75-2-1A3.5,3.5,0,0,0,75.48,0a2,2,0,0,0-1.83,1L70.13,7.37A63.82,63.82,0,0,0,58.4,6.26a61.76,61.76,0,0,0-32.33,8.86A76,76,0,0,0,1.3,39.3a8.4,8.4,0,0,0,0,9,77.76,77.76,0,0,0,13.59,16A67.46,67.46,0,0,0,32.07,75.54q-2.87,4.89-2.87,5.67a2,2,0,0,0,1,1.83q8,4.56,8.74,4.56a2,2,0,0,0,1.82-1L44,80.76q6.91-12.32,20.6-37T85.12,6.91ZM36.18,68.25q-17-7.63-27.83-24.44a64,64,0,0,1,24.83-23,29,29,0,0,0-.78,27.89,28.73,28.73,0,0,0,8.86,10.36ZM60.62,21a3,3,0,0,1-2.22.91A13.58,13.58,0,0,0,44.84,35.46a3.13,3.13,0,1,1-6.26,0,19.07,19.07,0,0,1,5.83-14,19.07,19.07,0,0,1,14-5.83A3.14,3.14,0,0,1,60.62,21Zm0,0"/><path d="M115.5,39.3a64.55,64.55,0,0,0-9.42-12,77.27,77.27,0,0,0-11.89-10l-4.11,7.3A66.76,66.76,0,0,1,108.46,43.8a67.26,67.26,0,0,1-19.65,20,54.11,54.11,0,0,1-25.59,8.93l-4.83,8.6a62.26,62.26,0,0,0,27.34-6.19,70.17,70.17,0,0,0,22.65-17.4,73,73,0,0,0,7.1-9.45,8.4,8.4,0,0,0,0-9Zm0,0"/></svg><span class="wf-issue-control-label">{{if status == 'new'}}<?php esc_html_e('Ignore', 'wordfence'); ?>{{else}}<?php esc_html_e('Stop Ignoring', 'wordfence'); ?>{{/if}}</span></a>
<?php if (isset($ignoreC) && isset($ignoreP)): ?>
<ul class="wf-issue-control-ignore-menu">
<li class="wf-issue-control-ignore-menu-ignorec"><div><?php echo esc_html($ignoreC); ?></div></li>
<li class="wf-issue-control-ignore-menu-ignorep"><div><?php echo esc_html($ignoreP); ?></div></li>
</ul>
<?php endif; ?>

View File

@@ -0,0 +1,4 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
?>
{{if data.canFix}}<a href="#" class="wf-issue-control wf-issue-control-repair" data-file="${data.file}" role="button"><svg class="wf-issue-control-icon" viewBox="0 0 106.7 106.7"><path d="M104.94,18.77a4,4,0,0,0-1.17-2.93L90.86,2.93a4.25,4.25,0,0,0-5.87,0L1.17,86.75a4.25,4.25,0,0,0,0,5.86l12.91,12.91A4,4,0,0,0,17,106.7a4,4,0,0,0,2.93-1.17L103.77,21.7a4,4,0,0,0,1.17-2.93ZM75.8,37.87l-7-7,19.1-19.1,7,7Zm0,0"/><path d="M14.93,16.68l2-6.39,6.39-2-6.39-2L14.93,0,13,6.39l-6.39,2,6.39,2Zm0,0"/><path d="M31.87,24.77l3.91,12.77L39.7,24.77l12.77-3.91L39.7,16.95,35.78,4.17,31.87,16.95,19.1,20.86Zm0,0"/><path d="M100.31,48.1l-2-6.39-2,6.39-6.39,2,6.39,2,2,6.39,2-6.39,6.39-2Zm0,0"/><path d="M56.64,16.68l2-6.39,6.39-2-6.39-2L56.64,0l-2,6.39-6.39,2,6.39,2Zm0,0"/></svg><span class="wf-issue-control-label"><?php esc_html_e('Repair', 'wordfence'); ?></span></a>{{/if}}

View File

@@ -0,0 +1,4 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
?>
<a href="#" class="wf-issue-control wf-issue-control-show-details" role="button"><svg class="wf-issue-control-icon-inactive" viewBox="0 0 108.46 108.46"><path d="M106,94.25,83.69,71.89a44.66,44.66,0,0,0,8.08-26,45.12,45.12,0,0,0-3.62-17.83A45,45,0,0,0,63.71,3.62a45.74,45.74,0,0,0-35.66,0A45,45,0,0,0,3.62,28.06a45.74,45.74,0,0,0,0,35.65A44.94,44.94,0,0,0,28.06,88.16a45.12,45.12,0,0,0,17.83,3.62,44.62,44.62,0,0,0,26-8.09L94.25,106a7.74,7.74,0,0,0,5.86,2.48A8.34,8.34,0,0,0,106,94.25ZM66.52,66.52a28.12,28.12,0,0,1-20.63,8.57,28.13,28.13,0,0,1-20.63-8.57,28.12,28.12,0,0,1-8.57-20.63,28.11,28.11,0,0,1,8.57-20.63,28.12,28.12,0,0,1,20.63-8.57,28.12,28.12,0,0,1,20.63,8.57,28.12,28.12,0,0,1,8.57,20.63,28.13,28.13,0,0,1-8.57,20.63Zm0,0"/><path d="M64.66,41.72H50.06V27.11A2.12,2.12,0,0,0,48,25H43.8a2.11,2.11,0,0,0-2.08,2.09v14.6H27.12A2.11,2.11,0,0,0,25,43.8V48a2.12,2.12,0,0,0,2.09,2.09h14.6v14.6a2.11,2.11,0,0,0,2.08,2.09H48a2.11,2.11,0,0,0,2.09-2.09V50.06h14.6A2.12,2.12,0,0,0,66.74,48V43.8a2.11,2.11,0,0,0-2.08-2.09Zm0,0"/></svg><svg class="wf-issue-control-icon-active" viewBox="0 0 108.46 108.46"><path d="M106,94.25,83.69,71.89a44.66,44.66,0,0,0,8.08-26,45.12,45.12,0,0,0-3.62-17.83A45,45,0,0,0,63.71,3.62a45.74,45.74,0,0,0-35.66,0A45,45,0,0,0,3.62,28.06a45.74,45.74,0,0,0,0,35.65A44.94,44.94,0,0,0,28.06,88.16a45.12,45.12,0,0,0,17.83,3.62,44.62,44.62,0,0,0,26-8.09L94.25,106a7.74,7.74,0,0,0,5.86,2.48A8.34,8.34,0,0,0,106,94.25ZM66.52,66.52a28.12,28.12,0,0,1-20.63,8.57,28.13,28.13,0,0,1-20.63-8.57,28.12,28.12,0,0,1-8.57-20.63,28.11,28.11,0,0,1,8.57-20.63,28.12,28.12,0,0,1,20.63-8.57,28.12,28.12,0,0,1,20.63,8.57,28.12,28.12,0,0,1,8.57,20.63,28.13,28.13,0,0,1-8.57,20.63Zm0,0"/><path d="M64.66,41.72H27.12A2.11,2.11,0,0,0,25,43.8V48a2.12,2.12,0,0,0,2.09,2.09H64.66A2.12,2.12,0,0,0,66.74,48V43.8a2.11,2.11,0,0,0-2.08-2.09Zm0,0"/></svg><span class="wf-issue-control-label"><?php esc_html_e('Details', 'wordfence'); ?></span></a>

View File

@@ -0,0 +1,21 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'coreUnknown',
'displayType' => __('Unknown Core File', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 46 55" ><path d="M43.557,13.609l-11.214,-11.175c-1.303,-1.246 -2.962,-2.058 -4.747,-2.324l0,18.223l18.294,0c-0.269,-1.777 -1.084,-3.427 -2.333,-4.724l0,0Z" fill="#9e9e9e"/><path d="M26.465,22.921c-0.005,0 -0.011,0 -0.016,0c-1.885,0 -3.435,-1.545 -3.435,-3.423c0,-0.005 0,-0.011 0,-0.016l0,-19.482l-19.562,0c-0.921,-0.019 -1.809,0.346 -2.449,1.005c-0.658,0.637 -1.022,1.52 -1.003,2.434l0,48.127c-0.019,0.915 0.345,1.797 1.003,2.434c0.639,0.658 1.524,1.023 2.443,1.005l39.102,0c0.004,0.001 0.008,0.001 0.012,0.001c1.884,0 3.435,-1.546 3.435,-3.423c0,-0.006 0,-0.011 -0.001,-0.017l0,-28.645l-19.529,0Z" fill="#9e9e9e"/></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-ignore', array('ignoreP' => __('Always Ignore Version', 'wordfence'), 'ignoreC' => __('Ignore Until Version Changes', 'wordfence'))), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(__('Details', 'wordfence') => '{{html longMsg}}'),
'detailControls' => array(
'{{if data.fileExists}}<a target="_blank" class="wf-btn wf-btn-default wf-btn-callout-subtle" rel="noopener noreferrer" href="${WFAD.makeViewFileLink(data)}">' . __('View File', 'wordfence') . '<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>{{/if}}',
'{{if data.canDelete}}<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-delete-file" role="button">' . __('Delete File', 'wordfence') . '</a>{{/if}}',
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('Details', 'wordfence') => '$longMsg',
),
))->render();

View File

@@ -0,0 +1,29 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'database',
'displayType' => __('Option', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 20 20"><g><path d="M18 16V4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h13c.55 0 1-.45 1-1zM8 11h1c.55 0 1 .45 1 1s-.45 1-1 1H8v1.5c0 .28-.22.5-.5.5s-.5-.22-.5-.5V13H6c-.55 0-1-.45-1-1s.45-1 1-1h1V5.5c0-.28.22-.5.5-.5s.5.22.5.5V11zm5-2h-1c-.55 0-1-.45-1-1s.45-1 1-1h1V5.5c0-.28.22-.5.5-.5s.5.22.5.5V7h1c.55 0 1 .45 1 1s-.45 1-1 1h-1v5.5c0 .28-.22.5-.5.5s-.5-.22-.5-.5V9z"/></g></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-ignore', array('ignoreC' => __('Ignore Value', 'wordfence'), 'ignoreP' => __('Ignore Option', 'wordfence'))), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('Option Name', 'wordfence') => '${data.option_name}',
__('Bad URL', 'wordfence') => array('(typeof data.badURL !== \'undefined\') && data.badURL', '<strong class="wfWarn wf-split-word">${data.badURL}</strong>'),
null,
__('Details', 'wordfence') => '{{html longMsg}}',
),
'detailControls' => array(
'{{if data.optionExists}}<a href="${WFAD.makeViewOptionLink(data.option_name, data.site_id)}" class="wf-btn wf-btn-default wf-btn-callout-subtle" target="_blank">' . __('View Option', 'wordfence') . '<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>{{/if}}',
'{{if data.canDelete}}<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle" onclick="WFAD.deleteDatabaseOption(\'${id}\'); return false;" role="button">' . __('Delete Option', 'wordfence') . '</a>{{/if}}',
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('Option Name', 'wordfence') => '$data.option_name',
__('Bad URL', 'wordfence') => '$data.badURL',
null,
__('Details', 'wordfence') => '$longMsg',
),
))->render();

View File

@@ -0,0 +1,25 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'diskSpace',
'displayType' => __('Disk Space', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 116.8 91.77"><path d="M112.17,35.72A57.35,57.35,0,0,0,81.08,4.63a57.88,57.88,0,0,0-45.36,0A57.38,57.38,0,0,0,4.63,35.72,58.26,58.26,0,0,0,9.19,89.88a4,4,0,0,0,3.52,1.89h91.38a4,4,0,0,0,3.52-1.89,58.25,58.25,0,0,0,4.56-54.16ZM52.5,10.79a8.34,8.34,0,0,1,14.24,5.9,8,8,0,0,1-2.44,5.9,8.34,8.34,0,0,1-11.8,0,8,8,0,0,1-2.44-5.9,8,8,0,0,1,2.44-5.9ZM22.59,64.3a8,8,0,0,1-5.9,2.45,8,8,0,0,1-5.9-2.45,8.34,8.34,0,0,1,0-11.8,8,8,0,0,1,5.9-2.45,8,8,0,0,1,5.9,2.45,8.35,8.35,0,0,1,0,11.8ZM35.1,35.1a8.34,8.34,0,0,1-11.8,0,8.34,8.34,0,0,1,0-11.8,8.35,8.35,0,0,1,11.8,0,8.34,8.34,0,0,1,0,11.8ZM72,35.65l-6.59,24.9a12.39,12.39,0,0,1,4.7,5.93,12.54,12.54,0,0,1-5.41,15.25A12.2,12.2,0,0,1,55.21,83a12,12,0,0,1-7.63-5.8,12.49,12.49,0,0,1,2.8-15.94,12.42,12.42,0,0,1,7-2.84l6.59-24.9a4.1,4.1,0,0,1,2-2.57A3.88,3.88,0,0,1,69,30.57a4.27,4.27,0,0,1,3,5.08Zm9.68-.56a8.34,8.34,0,0,1,0-11.8,8.34,8.34,0,0,1,14.24,5.9A8.34,8.34,0,0,1,81.7,35.1ZM106,64.3a8.34,8.34,0,1,1-11.8-11.8A8.34,8.34,0,1,1,106,64.3Zm0,0"/></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-ignore', array('ignoreP' => __('Ignore', 'wordfence'))), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('Space Remaining', 'wordfence') => '${data.spaceLeft}',
null,
__('Details', 'wordfence') => '{{html longMsg}}',
),
'detailControls' => array(
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('Space Remaining', 'wordfence') => '$data.spaceLeft',
null,
__('Details', 'wordfence') => '$longMsg',
),
))->render();

View File

@@ -0,0 +1,29 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'easyPassword',
'displayType' => __('Insecure Password', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 91.77 100.11"><path d="M45.89,50.06a24.1,24.1,0,0,0,17.69-7.34A24.1,24.1,0,0,0,70.91,25a24.11,24.11,0,0,0-7.33-17.7A24.12,24.12,0,0,0,45.89,0a24.12,24.12,0,0,0-17.7,7.33A24.11,24.11,0,0,0,20.86,25a24.1,24.1,0,0,0,7.33,17.7,24.11,24.11,0,0,0,17.7,7.34Zm0,0"/><path d="M91.54,76.49a66.22,66.22,0,0,0-.91-7.1,54.55,54.55,0,0,0-1.73-7.07A33.35,33.35,0,0,0,86.1,56a22.92,22.92,0,0,0-4-5.28,17,17,0,0,0-5.57-3.49,19.61,19.61,0,0,0-7.27-1.3,8,8,0,0,0-2.74,1.4q-2.15,1.41-4.86,3.13a30.77,30.77,0,0,1-7,3.13,27.68,27.68,0,0,1-17.4,0,30.59,30.59,0,0,1-7-3.13q-2.71-1.72-4.86-3.13a8,8,0,0,0-2.74-1.4,19.6,19.6,0,0,0-7.27,1.3,17,17,0,0,0-5.57,3.49,22.9,22.9,0,0,0-4,5.28,33.29,33.29,0,0,0-2.8,6.35,55.38,55.38,0,0,0-1.73,7.07,66.22,66.22,0,0,0-.91,7.1Q0,79.78,0,83.24q0,7.82,4.76,12.35t12.64,4.53h57q7.89,0,12.65-4.53t4.76-12.35q0-3.46-.23-6.75Zm0,0"/></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-edit-user'), wfView::create('scanner/issue-control-ignore', array('ignoreP' => __('Ignore All for User', 'wordfence'), 'ignoreC' => __('Ignore Only this Password', 'wordfence'))), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('Login Name', 'wordfence') => '${data.user_login}',
__('User Email', 'wordfence') => '${data.user_email}',
__('Full Name', 'wordfence') => '${data.first_name} ${data.last_name}',
null,
__('Details', 'wordfence') => '{{html longMsg}}',
),
'detailControls' => array(
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('Login Name', 'wordfence') => '$data.user_login',
__('User Email', 'wordfence') => '$data.user_email',
__('Full Name', 'wordfence') => '$data.first_name $data.last_name',
null,
__('Details', 'wordfence') => '$longMsg',
),
))->render();

View File

@@ -0,0 +1,34 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'file',
'displayType' => __('File', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 46 55" ><path d="M43.557,13.609l-11.214,-11.175c-1.303,-1.246 -2.962,-2.058 -4.747,-2.324l0,18.223l18.294,0c-0.269,-1.777 -1.084,-3.427 -2.333,-4.724l0,0Z" fill="#9e9e9e"/><path d="M26.465,22.921c-0.005,0 -0.011,0 -0.016,0c-1.885,0 -3.435,-1.545 -3.435,-3.423c0,-0.005 0,-0.011 0,-0.016l0,-19.482l-19.562,0c-0.921,-0.019 -1.809,0.346 -2.449,1.005c-0.658,0.637 -1.022,1.52 -1.003,2.434l0,48.127c-0.019,0.915 0.345,1.797 1.003,2.434c0.639,0.658 1.524,1.023 2.443,1.005l39.102,0c0.004,0.001 0.008,0.001 0.012,0.001c1.884,0 3.435,-1.546 3.435,-3.423c0,-0.006 0,-0.011 -0.001,-0.017l0,-28.645l-19.529,0Z" fill="#9e9e9e"/></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-repair'), wfView::create('scanner/issue-control-ignore', array('ignoreP' => __('Always Ignore', 'wordfence'), 'ignoreC' => __('Ignore Until File Changes', 'wordfence'))), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('Filename', 'wordfence') => '<span class="wf-split-word-xs">${data.realFile}</span>',
__('File Type', 'wordfence') => '{{if data.cType}}${WFAD.ucfirst(data.cType)}{{else data.wpconfig}}' . __('WordPress Configuration File', 'wordfence') . '{{else}}' . __('Not a core, theme, or plugin file from wordpress.org', 'wordfence') . '.{{/if}}',
__('Bad URL', 'wordfence') => array('(typeof data.badURL !== \'undefined\') && data.badURL', '${data.badURL}'),
null,
__('Details', 'wordfence') => '{{html longMsg}}<br><br>{{if data.wpconfig}}<strong>' . esc_html__('This is your main configuration file and cannot be deleted. It must be cleaned manually.', 'wordfence') . '</strong>{{/if}}',
),
'detailControls' => array(
'{{if data.fileExists}}<a target="_blank" class="wf-btn wf-btn-default wf-btn-callout-subtle" rel="noopener noreferrer" href="${WFAD.makeViewFileLink(data)}">' . __('View File', 'wordfence') . '<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>{{/if}}',
'{{if data.canDiff}}<a target="_blank" class="wf-btn wf-btn-default wf-btn-callout-subtle" rel="noopener noreferrer" href="${WFAD.makeDiffLink(data)}">' . __('View Differences', 'wordfence') . '<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>{{/if}}',
'{{if data.canDelete}}<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-delete-file" role="button">' . __('Delete File', 'wordfence') . '</a>{{/if}}',
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('Filename', 'wordfence') => '$data.realFile',
__('File Type', 'wordfence') => '$data.ucType',
__('File Type', 'wordfence') => '$data.wpconfig',
__('File Type', 'wordfence') => array(array('!$data.ucType', '!$data.wpconfig'), 'Not a core, theme, or plugin file from wordpress.org'),
__('Bad URL', 'wordfence') => '$data.badURL',
null,
__('Details', 'wordfence') => '$longMsg',
),
))->render();

View File

@@ -0,0 +1,21 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'geoipSupport',
'displayType' => __('Server Update', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 116.8 91.77"><path d="M112.17,35.72A57.35,57.35,0,0,0,81.08,4.63a57.88,57.88,0,0,0-45.36,0A57.38,57.38,0,0,0,4.63,35.72,58.26,58.26,0,0,0,9.19,89.88a4,4,0,0,0,3.52,1.89h91.38a4,4,0,0,0,3.52-1.89,58.25,58.25,0,0,0,4.56-54.16ZM52.5,10.79a8.34,8.34,0,0,1,14.24,5.9,8,8,0,0,1-2.44,5.9,8.34,8.34,0,0,1-11.8,0,8,8,0,0,1-2.44-5.9,8,8,0,0,1,2.44-5.9ZM22.59,64.3a8,8,0,0,1-5.9,2.45,8,8,0,0,1-5.9-2.45,8.34,8.34,0,0,1,0-11.8,8,8,0,0,1,5.9-2.45,8,8,0,0,1,5.9,2.45,8.35,8.35,0,0,1,0,11.8ZM35.1,35.1a8.34,8.34,0,0,1-11.8,0,8.34,8.34,0,0,1,0-11.8,8.35,8.35,0,0,1,11.8,0,8.34,8.34,0,0,1,0,11.8ZM72,35.65l-6.59,24.9a12.39,12.39,0,0,1,4.7,5.93,12.54,12.54,0,0,1-5.41,15.25A12.2,12.2,0,0,1,55.21,83a12,12,0,0,1-7.63-5.8,12.49,12.49,0,0,1,2.8-15.94,12.42,12.42,0,0,1,7-2.84l6.59-24.9a4.1,4.1,0,0,1,2-2.57A3.88,3.88,0,0,1,69,30.57a4.27,4.27,0,0,1,3,5.08Zm9.68-.56a8.34,8.34,0,0,1,0-11.8,8.34,8.34,0,0,1,14.24,5.9A8.34,8.34,0,0,1,81.7,35.1ZM106,64.3a8.34,8.34,0,1,1-11.8-11.8A8.34,8.34,0,1,1,106,64.3Zm0,0"/></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-ignore', array('ignoreP' => __('Ignore', 'wordfence'))), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('Details', 'wordfence') => '{{html longMsg}}',
),
'detailControls' => array(
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('Details', 'wordfence') => '$longMsg',
),
))->render();

View File

@@ -0,0 +1,33 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'knownfile',
'displayType' => __('File', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 46 55" ><path d="M43.557,13.609l-11.214,-11.175c-1.303,-1.246 -2.962,-2.058 -4.747,-2.324l0,18.223l18.294,0c-0.269,-1.777 -1.084,-3.427 -2.333,-4.724l0,0Z" fill="#9e9e9e"/><path d="M26.465,22.921c-0.005,0 -0.011,0 -0.016,0c-1.885,0 -3.435,-1.545 -3.435,-3.423c0,-0.005 0,-0.011 0,-0.016l0,-19.482l-19.562,0c-0.921,-0.019 -1.809,0.346 -2.449,1.005c-0.658,0.637 -1.022,1.52 -1.003,2.434l0,48.127c-0.019,0.915 0.345,1.797 1.003,2.434c0.639,0.658 1.524,1.023 2.443,1.005l39.102,0c0.004,0.001 0.008,0.001 0.012,0.001c1.884,0 3.435,-1.546 3.435,-3.423c0,-0.006 0,-0.011 -0.001,-0.017l0,-28.645l-19.529,0Z" fill="#9e9e9e"/></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-repair'), wfView::create('scanner/issue-control-ignore', array('ignoreP' => __('Always Ignore', 'wordfence'), 'ignoreC' => __('Ignore Until File Changes', 'wordfence'))), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('Filename', 'wordfence') => '<span class="wf-split-word-xs">${data.realFile}</span>',
__('File Type', 'wordfence') => '{{if data.cType}}${WFAD.ucfirst(data.cType)}{{else}}' . __('Not a core, theme, or plugin file from wordpress.org', 'wordfence') . '.{{/if}}',
__('Bad URL', 'wordfence') => array('(typeof data.badURL !== \'undefined\') && data.badURL', '${data.badURL}'),
null,
__('Details', 'wordfence') => '{{html longMsg}}',
),
'detailControls' => array(
'{{if data.fileExists}}<a target="_blank" class="wf-btn wf-btn-default wf-btn-callout-subtle" rel="noopener noreferrer" href="${WFAD.makeViewFileLink(data)}">' . __('View File', 'wordfence') . '<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>{{/if}}',
'{{if data.canDiff}}<a target="_blank" class="wf-btn wf-btn-default wf-btn-callout-subtle" rel="noopener noreferrer" href="${WFAD.makeDiffLink(data)}">' . __('View Differences', 'wordfence') . '<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>{{/if}}',
'{{if data.canDelete}}<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-delete-file" role="button">' . __('Delete File', 'wordfence') . '</a>{{/if}}',
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('Filename', 'wordfence') => '$data.realFile',
__('File Type', 'wordfence') => '$data.ucType',
__('File Type', 'wordfence') => array('!$data.ucType', 'Not a core, theme, or plugin file from wordpress.org'),
__('Bad URL', 'wordfence') => '$data.badURL',
null,
__('Details', 'wordfence') => '$longMsg',
),
))->render();

View File

@@ -0,0 +1,35 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'optionBadURL',
'displayType' => __('URL', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 20 20"><g><path d="M18 16V4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h13c.55 0 1-.45 1-1zM8 11h1c.55 0 1 .45 1 1s-.45 1-1 1H8v1.5c0 .28-.22.5-.5.5s-.5-.22-.5-.5V13H6c-.55 0-1-.45-1-1s.45-1 1-1h1V5.5c0-.28.22-.5.5-.5s.5.22.5.5V11zm5-2h-1c-.55 0-1-.45-1-1s.45-1 1-1h1V5.5c0-.28.22-.5.5-.5s.5.22.5.5V7h1c.55 0 1 .45 1 1s-.45 1-1 1h-1v5.5c0 .28-.22.5-.5.5s-.5-.22-.5-.5V9z"/></g></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-ignore', array('ignoreC' => __('Ignore URL', 'wordfence'), 'ignoreP' => __('Ignore Option', 'wordfence'))), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('Option Name', 'wordfence') => '${data.optionKey}',
__('Bad URL', 'wordfence') => '<strong class="wfWarn wf-split-word">${data.badURL}</strong>',
null,
__('Details', 'wordfence') => '{{html longMsg}}',
null,
__('Multisite Blog ID', 'wordfence') => array('data.isMultisite', '${data.blog_id}'),
__('Multisite Blog Domain', 'wordfence') => array('data.isMultisite', '${data.domain}'),
__('Multisite Blog Path', 'wordfence') => array('data.isMultisite', '${data.path}'),
),
'detailControls' => array(
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('Option Name', 'wordfence') => '$data.optionKey',
__('Bad URL', 'wordfence') => '$data.badURL',
null,
__('Details', 'wordfence') => '$longMsg',
null,
__('Multisite Blog ID', 'wordfence') => array('$data.isMultisite', '$data.blog_id'),
__('Multisite Blog Domain', 'wordfence') => array('$data.isMultisite', '$data.domain'),
__('Multisite Blog Path', 'wordfence') => array('$data.isMultisite', '$data.path'),
),
))->render();

View File

@@ -0,0 +1,35 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'postBadTitle',
'displayType' => __('Post', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 20 20"><rect x="0" fill="none" width="20" height="20"/><g><path d="M10.44 3.02l1.82-1.82 6.36 6.35-1.83 1.82c-1.05-.68-2.48-.57-3.41.36l-.75.75c-.92.93-1.04 2.35-.35 3.41l-1.83 1.82-2.41-2.41-2.8 2.79c-.42.42-3.38 2.71-3.8 2.29s1.86-3.39 2.28-3.81l2.79-2.79L4.1 9.36l1.83-1.82c1.05.69 2.48.57 3.4-.36l.75-.75c.93-.92 1.05-2.35.36-3.41z"/></g></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-edit-post'), wfView::create('scanner/issue-control-ignore', array('ignoreP' => __('Always Ignore', 'wordfence'), 'ignoreC' => __('Ignore Only this Title', 'wordfence'))), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('Title', 'wordfence') => '<strong class="wfWarn">${data.postTitle}</strong>',
__('Posted on', 'wordfence') => '${data.postDate}',
null,
__('Details', 'wordfence') => '{{html longMsg}}',
null,
__('Multisite Blog ID', 'wordfence') => array('data.isMultisite', '${data.blog_id}'),
__('Multisite Blog Domain', 'wordfence') => array('data.isMultisite', '${data.domain}'),
__('Multisite Blog Path', 'wordfence') => array('data.isMultisite', '${data.path}'),
),
'detailControls' => array(
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('Title', 'wordfence') => '$data.postTitle',
__('Posted on', 'wordfence') => '$data.postDate',
null,
__('Details', 'wordfence') => '$longMsg',
null,
__('Multisite Blog ID', 'wordfence') => array('$data.isMultisite', '$data.blog_id'),
__('Multisite Blog Domain', 'wordfence') => array('$data.isMultisite', '$data.domain'),
__('Multisite Blog Path', 'wordfence') => array('$data.isMultisite', '$data.path'),
),
))->render();

View File

@@ -0,0 +1,37 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'postBadURL',
'displayType' => __('URL', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 106.37 106.37"><path d="M100.89,64.92,87.34,51.36a18.89,18.89,0,0,0-26.85.26l-5.74-5.73a18.34,18.34,0,0,0,5.74-13.62A18,18,0,0,0,55.07,19L41.65,5.54A17.86,17.86,0,0,0,28.35,0,18,18,0,0,0,15.12,5.41L5.54,14.93A17.79,17.79,0,0,0,0,28.16a18.09,18.09,0,0,0,5.48,13.3L19,55a18.12,18.12,0,0,0,13.3,5.48,18.27,18.27,0,0,0,13.56-5.74l5.73,5.74a18.32,18.32,0,0,0-5.73,13.62A18,18,0,0,0,51.3,87.34l13.43,13.49a18.81,18.81,0,0,0,26.53.13l9.58-9.52a17.79,17.79,0,0,0,5.54-13.23,18.1,18.1,0,0,0-5.48-13.3ZM45.89,37l-1.21-1.24c-.67-.7-1.14-1.16-1.4-1.4s-.68-.56-1.24-1a5.26,5.26,0,0,0-1.66-.85,6.64,6.64,0,0,0-1.79-.23,6.24,6.24,0,0,0-6.26,6.26,6.6,6.6,0,0,0,.23,1.79A5.19,5.19,0,0,0,33.41,42a14.48,14.48,0,0,0,1,1.24c.24.26.71.73,1.4,1.4L37,45.89a6.3,6.3,0,0,1-4.7,2,6,6,0,0,1-4.43-1.76L14.34,32.59a6,6,0,0,1-1.82-4.43,5.94,5.94,0,0,1,1.82-4.36l9.58-9.52a6.3,6.3,0,0,1,4.43-1.76,6,6,0,0,1,4.43,1.83L46.21,27.83A6,6,0,0,1,48,32.26,6.33,6.33,0,0,1,45.89,37ZM92,82.58,82.45,92.1A6.28,6.28,0,0,1,78,93.79,6,6,0,0,1,73.59,92L60.16,78.54a6,6,0,0,1-1.82-4.43,6.33,6.33,0,0,1,2.15-4.76l1.21,1.24c.67.69,1.14,1.16,1.4,1.4a15,15,0,0,0,1.24,1,5.18,5.18,0,0,0,1.66.85,6.6,6.6,0,0,0,1.79.23A6.23,6.23,0,0,0,74,67.79,6.76,6.76,0,0,0,73.82,66,5.34,5.34,0,0,0,73,64.33c-.41-.56-.74-1-1-1.24s-.71-.73-1.4-1.4l-1.24-1.2A6.2,6.2,0,0,1,74,58.4a6,6,0,0,1,4.43,1.82L92,73.78a6,6,0,0,1,1.83,4.43A6,6,0,0,1,92,82.58Zm0,0"/></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-edit-post'), wfView::create('scanner/issue-control-ignore', array('ignoreP' => __('Always Ignore', 'wordfence'), 'ignoreC' => __('Ignore this URL', 'wordfence'))), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('Title', 'wordfence') => '${data.postTitle}',
__('Bad URL', 'wordfence') => '<strong class="wfWarn wf-split-word">${data.badURL}</strong>',
__('Posted on', 'wordfence') => '${data.postDate}',
null,
__('Details', 'wordfence') => '{{html longMsg}}',
null,
__('Multisite Blog ID', 'wordfence') => array('data.isMultisite', '${data.blog_id}'),
__('Multisite Blog Domain', 'wordfence') => array('data.isMultisite', '${data.domain}'),
__('Multisite Blog Path', 'wordfence') => array('data.isMultisite', '${data.path}'),
),
'detailControls' => array(
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('Title', 'wordfence') => '$data.postTitle',
__('Bad URL', 'wordfence') => '$data.badURL',
__('Posted on', 'wordfence') => '$data.postDate',
null,
__('Details', 'wordfence') => '$longMsg',
null,
__('Multisite Blog ID', 'wordfence') => array('$data.isMultisite', '$data.blog_id'),
__('Multisite Blog Domain', 'wordfence') => array('$data.isMultisite', '$data.domain'),
__('Multisite Blog Path', 'wordfence') => array('$data.isMultisite', '$data.path'),
),
))->render();

View File

@@ -0,0 +1,27 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'publiclyAccessible',
'displayType' => __('Quarantined File', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 20 20"><g><path d="M18 16V4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h13c.55 0 1-.45 1-1zM8 11h1c.55 0 1 .45 1 1s-.45 1-1 1H8v1.5c0 .28-.22.5-.5.5s-.5-.22-.5-.5V13H6c-.55 0-1-.45-1-1s.45-1 1-1h1V5.5c0-.28.22-.5.5-.5s.5.22.5.5V11zm5-2h-1c-.55 0-1-.45-1-1s.45-1 1-1h1V5.5c0-.28.22-.5.5-.5s.5.22.5.5V7h1c.55 0 1 .45 1 1s-.45 1-1 1h-1v5.5c0 .28-.22.5-.5.5s-.5-.22-.5-.5V9z"/></g></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-hide-file'), wfView::create('scanner/issue-control-ignore', array('ignoreC' => __('Ignore', 'wordfence'))), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('URL', 'wordfence') => '<a href="${data.url}" target="_blank" rel="noopener noreferrer">${data.url}<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>',
null,
__('Details', 'wordfence') => '{{html longMsg}}'
),
'detailControls' => array(
'{{if data.fileExists}}<a target="_blank" class="wf-btn wf-btn-default wf-btn-callout-subtle" rel="noopener noreferrer" href="${WFAD.makeViewFileLink(data)}">' . __('View File', 'wordfence') . '<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>{{/if}}',
'{{if data.canDelete}}<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-delete-file" role="button">' . __('Delete File', 'wordfence') . '</a>{{/if}}',
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('URL', 'wordfence') => '$data.url',
null,
__('Details', 'wordfence') => '$longMsg',
),
))->render();

View File

@@ -0,0 +1,26 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
if (function_exists('network_admin_url') && is_multisite()) { $optionsURL = network_admin_url('admin.php?page=WordfenceScan&subpage=scan_options#wf-option-other-scanOutside#wf-scanner-options-general'); }
else { $optionsURL = admin_url('admin.php?page=WordfenceScan&subpage=scan_options#wf-option-other-scanOutside#wf-scanner-options-general'); }
echo wfView::create('scanner/issue-base', array(
'internalType' => 'skippedPaths',
'displayType' => __('Skipped Paths', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 20 20"><g><path d="M18 16V4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h13c.55 0 1-.45 1-1zM8 11h1c.55 0 1 .45 1 1s-.45 1-1 1H8v1.5c0 .28-.22.5-.5.5s-.5-.22-.5-.5V13H6c-.55 0-1-.45-1-1s.45-1 1-1h1V5.5c0-.28.22-.5.5-.5s.5.22.5.5V11zm5-2h-1c-.55 0-1-.45-1-1s.45-1 1-1h1V5.5c0-.28.22-.5.5-.5s.5.22.5.5V7h1c.55 0 1 .45 1 1s-.45 1-1 1h-1v5.5c0 .28-.22.5-.5.5s-.5-.22-.5-.5V9z"/></g></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-ignore', array('ignoreP' => __('Ignore', 'wordfence'))), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('Details', 'wordfence') => '{{html longMsg}}',
),
'detailControls' => array(
'<a href="' . $optionsURL . '" class="wf-btn wf-btn-default wf-btn-callout-subtle">' . __('Go To Option', 'wordfence') . '</a>',
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('Details', 'wordfence') => '$longMsg',
),
))->render();

View File

@@ -0,0 +1,21 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'spamvertizeCheck',
'displayType' => __('Spam', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 20 20"><g><path d="M18 13h1c.55 0 1 .45 1 1.01v2.98c0 .56-.45 1.01-1 1.01h-4c-.55 0-1-.45-1-1.01v-2.98c0-.56.45-1.01 1-1.01h1v-2h-5v2h1c.55 0 1 .45 1 1.01v2.98c0 .56-.45 1.01-1 1.01H8c-.55 0-1-.45-1-1.01v-2.98c0-.56.45-1.01 1-1.01h1v-2H4v2h1c.55 0 1 .45 1 1.01v2.98C6 17.55 5.55 18 5 18H1c-.55 0-1-.45-1-1.01v-2.98C0 13.45.45 13 1 13h1v-2c0-1.1.9-2 2-2h5V7H8c-.55 0-1-.45-1-1.01V3.01C7 2.45 7.45 2 8 2h4c.55 0 1 .45 1 1.01v2.98C13 6.55 12.55 7 12 7h-1v2h5c1.1 0 2 .9 2 2v2z"/></g></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-ignore', array('ignoreP' => __('Ignore', 'wordfence'))), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('Details', 'wordfence') => '{{html longMsg}}',
),
'detailControls' => array(
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('Details', 'wordfence') => '$longMsg',
),
))->render();

View File

@@ -0,0 +1,24 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'suspiciousAdminUsers',
'displayType' => __('Unknown Administrator', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 91.77 100.11"><path d="M45.89,50.06a24.1,24.1,0,0,0,17.69-7.34A24.1,24.1,0,0,0,70.91,25a24.11,24.11,0,0,0-7.33-17.7A24.12,24.12,0,0,0,45.89,0a24.12,24.12,0,0,0-17.7,7.33A24.11,24.11,0,0,0,20.86,25a24.1,24.1,0,0,0,7.33,17.7,24.11,24.11,0,0,0,17.7,7.34Zm0,0"/><path d="M91.54,76.49a66.22,66.22,0,0,0-.91-7.1,54.55,54.55,0,0,0-1.73-7.07A33.35,33.35,0,0,0,86.1,56a22.92,22.92,0,0,0-4-5.28,17,17,0,0,0-5.57-3.49,19.61,19.61,0,0,0-7.27-1.3,8,8,0,0,0-2.74,1.4q-2.15,1.41-4.86,3.13a30.77,30.77,0,0,1-7,3.13,27.68,27.68,0,0,1-17.4,0,30.59,30.59,0,0,1-7-3.13q-2.71-1.72-4.86-3.13a8,8,0,0,0-2.74-1.4,19.6,19.6,0,0,0-7.27,1.3,17,17,0,0,0-5.57,3.49,22.9,22.9,0,0,0-4,5.28,33.29,33.29,0,0,0-2.8,6.35,55.38,55.38,0,0,0-1.73,7.07,66.22,66.22,0,0,0-.91,7.1Q0,79.78,0,83.24q0,7.82,4.76,12.35t12.64,4.53h57q7.89,0,12.65-4.53t4.76-12.35q0-3.46-.23-6.75Zm0,0"/></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-ignore', array('ignoreP' => __('Ignore', 'wordfence'))), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('Details', 'wordfence') => '{{html longMsg}}',
),
'detailControls' => array(
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle" onclick="WFAD.deleteAdminUser(\'${id}\'); return false;" role="button">' . __('Delete User', 'wordfence') . '</a>',
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle" onclick="WFAD.revokeAdminUser(\'${id}\'); return false;" role="button">' . __('Revoke Capabilities', 'wordfence') . '</a>',
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle" onclick="WFAD.acknowledgeAdminUser(\'${id}\'); return false;" role="button">' . __('Acknowledge User', 'wordfence') . '</a>',
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('Details', 'wordfence') => '$longMsg',
),
))->render();

View File

@@ -0,0 +1,21 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'timelimit',
'displayType' => __('Time Limit', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 116.8 91.77"><path d="M112.17,35.72A57.35,57.35,0,0,0,81.08,4.63a57.88,57.88,0,0,0-45.36,0A57.38,57.38,0,0,0,4.63,35.72,58.26,58.26,0,0,0,9.19,89.88a4,4,0,0,0,3.52,1.89h91.38a4,4,0,0,0,3.52-1.89,58.25,58.25,0,0,0,4.56-54.16ZM52.5,10.79a8.34,8.34,0,0,1,14.24,5.9,8,8,0,0,1-2.44,5.9,8.34,8.34,0,0,1-11.8,0,8,8,0,0,1-2.44-5.9,8,8,0,0,1,2.44-5.9ZM22.59,64.3a8,8,0,0,1-5.9,2.45,8,8,0,0,1-5.9-2.45,8.34,8.34,0,0,1,0-11.8,8,8,0,0,1,5.9-2.45,8,8,0,0,1,5.9,2.45,8.35,8.35,0,0,1,0,11.8ZM35.1,35.1a8.34,8.34,0,0,1-11.8,0,8.34,8.34,0,0,1,0-11.8,8.35,8.35,0,0,1,11.8,0,8.34,8.34,0,0,1,0,11.8ZM72,35.65l-6.59,24.9a12.39,12.39,0,0,1,4.7,5.93,12.54,12.54,0,0,1-5.41,15.25A12.2,12.2,0,0,1,55.21,83a12,12,0,0,1-7.63-5.8,12.49,12.49,0,0,1,2.8-15.94,12.42,12.42,0,0,1,7-2.84l6.59-24.9a4.1,4.1,0,0,1,2-2.57A3.88,3.88,0,0,1,69,30.57a4.27,4.27,0,0,1,3,5.08Zm9.68-.56a8.34,8.34,0,0,1,0-11.8,8.34,8.34,0,0,1,14.24,5.9A8.34,8.34,0,0,1,81.7,35.1ZM106,64.3a8.34,8.34,0,1,1-11.8-11.8A8.34,8.34,0,1,1,106,64.3Zm0,0"/></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-ignore', array('ignoreP' => __('Ignore', 'wordfence'))), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('Details', 'wordfence') => '{{html longMsg}}',
),
'detailControls' => array(
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('Details', 'wordfence') => '$longMsg',
),
))->render();

View File

@@ -0,0 +1,25 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'wafStatus',
'displayType' => __('WAF Status', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 116.8 91.77"><path d="M112.17,35.72A57.35,57.35,0,0,0,81.08,4.63a57.88,57.88,0,0,0-45.36,0A57.38,57.38,0,0,0,4.63,35.72,58.26,58.26,0,0,0,9.19,89.88a4,4,0,0,0,3.52,1.89h91.38a4,4,0,0,0,3.52-1.89,58.25,58.25,0,0,0,4.56-54.16ZM52.5,10.79a8.34,8.34,0,0,1,14.24,5.9,8,8,0,0,1-2.44,5.9,8.34,8.34,0,0,1-11.8,0,8,8,0,0,1-2.44-5.9,8,8,0,0,1,2.44-5.9ZM22.59,64.3a8,8,0,0,1-5.9,2.45,8,8,0,0,1-5.9-2.45,8.34,8.34,0,0,1,0-11.8,8,8,0,0,1,5.9-2.45,8,8,0,0,1,5.9,2.45,8.35,8.35,0,0,1,0,11.8ZM35.1,35.1a8.34,8.34,0,0,1-11.8,0,8.34,8.34,0,0,1,0-11.8,8.35,8.35,0,0,1,11.8,0,8.34,8.34,0,0,1,0,11.8ZM72,35.65l-6.59,24.9a12.39,12.39,0,0,1,4.7,5.93,12.54,12.54,0,0,1-5.41,15.25A12.2,12.2,0,0,1,55.21,83a12,12,0,0,1-7.63-5.8,12.49,12.49,0,0,1,2.8-15.94,12.42,12.42,0,0,1,7-2.84l6.59-24.9a4.1,4.1,0,0,1,2-2.57A3.88,3.88,0,0,1,69,30.57a4.27,4.27,0,0,1,3,5.08Zm9.68-.56a8.34,8.34,0,0,1,0-11.8,8.34,8.34,0,0,1,14.24,5.9A8.34,8.34,0,0,1,81.7,35.1ZM106,64.3a8.34,8.34,0,1,1-11.8-11.8A8.34,8.34,0,1,1,106,64.3Zm0,0"/></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-ignore', array('ignoreP' => __('Ignore', 'wordfence'))), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('Status', 'wordfence') => '${data.wafStatusDisplay}',
null,
__('Details', 'wordfence') => '{{html longMsg}}',
),
'detailControls' => array(
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('Status', 'wordfence') => '$data.wafStatusDisplay',
null,
__('Details', 'wordfence') => '$longMsg',
),
))->render();

View File

@@ -0,0 +1,41 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'wfPluginAbandoned',
'displayType' => __('Plugin Abandoned', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 20 20"><g><path d="M13.11 4.36L9.87 7.6 8 5.73l3.24-3.24c.35-.34 1.05-.2 1.56.32.52.51.66 1.21.31 1.55zm-8 1.77l.91-1.12 9.01 9.01-1.19.84c-.71.71-2.63 1.16-3.82 1.16H6.14L4.9 17.26c-.59.59-1.54.59-2.12 0-.59-.58-.59-1.53 0-2.12l1.24-1.24v-3.88c0-1.13.4-3.19 1.09-3.89zm7.26 3.97l3.24-3.24c.34-.35 1.04-.21 1.55.31.52.51.66 1.21.31 1.55l-3.24 3.25z"/></g></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-ignore', array('ignoreC' => __('Ignore', 'wordfence'))), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('Plugin Name', 'wordfence') => '${data.name}',
__('Current Plugin Version', 'wordfence') => '${data.version}',
__('Last Updated', 'wordfence') => '${data.dateUpdated}',
null,
__('Details', 'wordfence') => '{{if data.vulnerable}}<strong>' . esc_html__('Plugin has unpatched security issues.', 'wordfence') . '</strong><br>{{/if}}{{html longMsg}}',
null,
__('Plugin URL', 'wordfence') => array('data.homepage', '<a href="${data.homepage}" target="_blank" rel="noopener noreferrer"><span class="wf-hidden-xs wf-split-word">${data.homepage}</span><span class="wf-visible-xs">' . __('View', 'wordfence') . '</span><span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>'),
__('Repository URL', 'wordfence') => array('data.wpURL', '<a href="${data.wpURL}" target="_blank" rel="noopener noreferrer"><span class="wf-hidden-xs wf-split-word">${data.wpURL}</span><span class="wf-visible-xs">' . __('View', 'wordfence') . '</span><span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>'),
__('Vulnerability Information', 'wordfence') => array('data.vulnerabilityLink', '<a href="${data.vulnerabilityLink}" target="_blank" rel="noopener noreferrer"><span class="wf-hidden-xs wf-split-word">${data.vulnerabilityLink}</span><span class="wf-visible-xs">' . __('View', 'wordfence') . '</span><span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>'),
__('Vulnerability Severity', 'wordfence') => array('data.cvssScore', '${data.cvssScore}/10.0 (<span class="${data.severityClass}" data-tooltip="test" title="This is the severity of the vulnerability itself, which can differ from the scan result severity. Some lower-severity vulnerabilities may still be important to address depending on your site\'s configuration and user base, so they are still important for you to review.">${data.severityLabel}</span>)'),
),
'detailControls' => array(
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
'<a href="' . esc_url(wfUtils::wpAdminURL('plugins.php')) . '" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-manage-plugins">' . __('Manage Plugins', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('Plugin Name', 'wordfence') => '$data.name',
__('Current Plugin Version', 'wordfence') => '$data.version',
__('Last Updated', 'wordfence') => '$data.dateUpdated',
null,
__('Details', 'wordfence') => '$longMsg',
__('Vulnerability Status', 'wordfence') => array('$data.vulnerable', __('Plugin has unpatched security issues.', 'wordfence')),
null,
__('Plugin URL', 'wordfence') => '$data.homepage',
__('Repository URL', 'wordfence') => '$data.wpURL',
__('Vulnerability Information', 'wordfence') => '$data.vulnerabilityLink',
__('Vulnerability Severity', 'wordfence') => '${data.cvssScore}/10.0 (${data.severityLabel})',
),
))->render();

View File

@@ -0,0 +1,36 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'wfPluginRemoved',
'displayType' => __('Plugin Removed', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 20 20"><g><path d="M13.11 4.36L9.87 7.6 8 5.73l3.24-3.24c.35-.34 1.05-.2 1.56.32.52.51.66 1.21.31 1.55zm-8 1.77l.91-1.12 9.01 9.01-1.19.84c-.71.71-2.63 1.16-3.82 1.16H6.14L4.9 17.26c-.59.59-1.54.59-2.12 0-.59-.58-.59-1.53 0-2.12l1.24-1.24v-3.88c0-1.13.4-3.19 1.09-3.89zm7.26 3.97l3.24-3.24c.34-.35 1.04-.21 1.55.31.52.51.66 1.21.31 1.55l-3.24 3.25z"/></g></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-ignore', array('ignoreC' => __('Ignore', 'wordfence'))), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('Plugin Name', 'wordfence') => '${data.Name}',
__('Current Plugin Version', 'wordfence') => '${data.Version}',
null,
__('Details', 'wordfence') => '{{html longMsg}}',
null,
__('Plugin URL', 'wordfence') => array('data.PluginURI', '<a href="${data.PluginURI}" target="_blank" rel="noopener noreferrer"><span class="wf-hidden-xs wf-split-word">${data.PluginURI}</span><span class="wf-visible-xs">' . __('View', 'wordfence') . '</span><span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>'),
__('Vulnerability Information', 'wordfence') => array('data.vulnerabilityLink', '<a href="${data.vulnerabilityLink}" target="_blank" rel="noopener noreferrer"><span class="wf-hidden-xs wf-split-word">${data.vulnerabilityLink}</span><span class="wf-visible-xs">' . __('View', 'wordfence') . '</span><span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>'),
__('Vulnerability Severity', 'wordfence') => array('data.cvssScore', '${data.cvssScore}/10.0 (<span class="${data.severityClass}" data-tooltip="test" title="This is the severity of the vulnerability itself, which can differ from the scan result severity. Some lower-severity vulnerabilities may still be important to address depending on your site\'s configuration and user base, so they are still important for you to review.">${data.severityLabel}</span>)'),
),
'detailControls' => array(
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
'<a href="' . esc_url(wfUtils::wpAdminURL('plugins.php')) . '" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-manage-plugins">' . __('Manage Plugins', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('Plugin Name', 'wordfence') => '$data.Name',
__('Current Plugin Version', 'wordfence') => '$data.Version',
null,
__('Details', 'wordfence') => '$longMsg',
null,
__('Plugin URL', 'wordfence') => '$data.PluginURI',
__('Vulnerability Information', 'wordfence') => '$data.vulnerabilityLink',
__('Vulnerability Severity', 'wordfence') => '${data.cvssScore}/10.0 (${data.severityLabel})',
),
))->render();

View File

@@ -0,0 +1,41 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'wfPluginUpgrade',
'displayType' => __('Plugin Upgrade', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 20 20"><g><path d="M13.11 4.36L9.87 7.6 8 5.73l3.24-3.24c.35-.34 1.05-.2 1.56.32.52.51.66 1.21.31 1.55zm-8 1.77l.91-1.12 9.01 9.01-1.19.84c-.71.71-2.63 1.16-3.82 1.16H6.14L4.9 17.26c-.59.59-1.54.59-2.12 0-.59-.58-.59-1.53 0-2.12l1.24-1.24v-3.88c0-1.13.4-3.19 1.09-3.89zm7.26 3.97l3.24-3.24c.34-.35 1.04-.21 1.55.31.52.51.66 1.21.31 1.55l-3.24 3.25z"/></g></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-ignore', array('ignoreC' => __('Ignore Update', 'wordfence'))), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('Plugin Name', 'wordfence') => '${data.Name}',
__('Current Plugin Version', 'wordfence') => '${data.Version}',
__('New Plugin Version', 'wordfence') => '${data.newVersion}',
null,
__('Details', 'wordfence') => '{{if data.vulnerable}}<strong>' . esc_html__('Update includes security-related fixes.', 'wordfence') . '</strong><br>{{/if}}{{html longMsg}}<br><a href="' . get_admin_url() . 'update-core.php' . '">' . esc_html__('Click here to update now', 'wordfence') . '</a>.',
null,
__('Plugin URL', 'wordfence') => array('data.PluginURI', '<a href="${data.PluginURI}" target="_blank" rel="noopener noreferrer"><span class="wf-hidden-xs wf-split-word">${data.PluginURI}</span><span class="wf-visible-xs">' . __('View', 'wordfence') . '</span><span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>'),
__('Changelog', 'wordfence') => array('data.wpURL', '<a href="${data.wpURL}/#developers" target="_blank" rel="noopener noreferrer"><span class="wf-hidden-xs wf-split-word">${data.wpURL}/#developers</span><span class="wf-visible-xs">' . __('View', 'wordfence') . '</span><span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>'),
__('Vulnerability Information', 'wordfence') => array('data.vulnerabilityLink', '<a href="${data.vulnerabilityLink}" target="_blank" rel="noopener noreferrer"><span class="wf-hidden-xs wf-split-word">${data.vulnerabilityLink}</span><span class="wf-visible-xs">' . __('View', 'wordfence') . '</span><span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>'),
__('Vulnerability Severity', 'wordfence') => array('data.cvssScore', '${data.cvssScore}/10.0 (<span class="${data.severityClass}" data-tooltip="test" title="This is the severity of the vulnerability itself, which can differ from the scan result severity. Some lower-severity vulnerabilities may still be important to address depending on your site\'s configuration and user base, so they are still important for you to review.">${data.severityLabel}</span>)'),
),
'detailControls' => array(
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
'<a href="' . esc_url(wfUtils::wpAdminURL('update-core.php')) . '" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-view-updates">' . __('View Updates', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('Plugin Name', 'wordfence') => '$data.Name',
__('Current Plugin Version', 'wordfence') => '$data.Version',
__('New Plugin Version', 'wordfence') => '$data.newVersion',
null,
__('Details', 'wordfence') => '$longMsg',
__('Vulnerability Status', 'wordfence') => array('$data.vulnerable', __('Update includes security-related fixes.', 'wordfence')),
null,
__('Plugin URL', 'wordfence') => '$data.PluginURI',
__('Repository URL', 'wordfence') => '$data.wpURL',
__('Vulnerability Information', 'wordfence') => '$data.vulnerabilityLink',
__('Vulnerability Severity', 'wordfence') => '${data.cvssScore}/10.0 (${data.severityLabel})',
),
))->render();

View File

@@ -0,0 +1,35 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'wfPluginVulnerable',
'displayType' => __('Plugin Vulnerable', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 20 20"><g><path d="M13.11 4.36L9.87 7.6 8 5.73l3.24-3.24c.35-.34 1.05-.2 1.56.32.52.51.66 1.21.31 1.55zm-8 1.77l.91-1.12 9.01 9.01-1.19.84c-.71.71-2.63 1.16-3.82 1.16H6.14L4.9 17.26c-.59.59-1.54.59-2.12 0-.59-.58-.59-1.53 0-2.12l1.24-1.24v-3.88c0-1.13.4-3.19 1.09-3.89zm7.26 3.97l3.24-3.24c.34-.35 1.04-.21 1.55.31.52.51.66 1.21.31 1.55l-3.24 3.25z"/></g></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-ignore', array('ignoreC' => __('Ignore', 'wordfence'))), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('Plugin Name', 'wordfence') => '${data.Name}',
__('Current Plugin Version', 'wordfence') => '${data.Version}',
null,
__('Details', 'wordfence') => '{{html longMsg}}',
null,
__('Repository URL', 'wordfence') => array('data.wpURL', '<a href="${data.wpURL}" target="_blank" rel="noopener noreferrer"><span class="wf-hidden-xs wf-split-word">${data.wpURL}</span><span class="wf-visible-xs">' . __('View', 'wordfence') . '</span><span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>'),
__('Vulnerability Information', 'wordfence') => array('data.vulnerabilityLink', '<a href="${data.vulnerabilityLink}" target="_blank" rel="noopener noreferrer"><span class="wf-hidden-xs wf-split-word">${data.vulnerabilityLink}</span><span class="wf-visible-xs">' . __('View', 'wordfence') . '</span><span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>'),
__('Vulnerability Severity', 'wordfence') => array('data.cvssScore', '${data.cvssScore}/10.0 (<span class="${data.severityClass}" data-tooltip="test" title="This is the severity of the vulnerability itself, which can differ from the scan result severity. Some lower-severity vulnerabilities may still be important to address depending on your site\'s configuration and user base, so they are still important for you to review.">${data.severityLabel}</span>)'),
),
'detailControls' => array(
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
'<a href="' . esc_url(wfUtils::wpAdminURL('plugins.php')) . '" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-manage-plugins">' . __('Manage Plugins', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('Plugin Name', 'wordfence') => '$data.Name',
__('Current Plugin Version', 'wordfence') => '$data.Version',
null,
__('Details', 'wordfence') => '$longMsg',
null,
__('Vulnerability Information', 'wordfence') => '$data.vulnerabilityLink',
__('Vulnerability Severity', 'wordfence') => '${data.cvssScore}/10.0 (${data.severityLabel})',
),
))->render();

View File

@@ -0,0 +1,39 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'wfThemeUpgrade',
'displayType' => __('Theme Upgrade', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 20 20"><g><path d="M14.48 11.06L7.41 3.99l1.5-1.5c.5-.56 2.3-.47 3.51.32 1.21.8 1.43 1.28 2.91 2.1 1.18.64 2.45 1.26 4.45.85zm-.71.71L6.7 4.7 4.93 6.47c-.39.39-.39 1.02 0 1.41l1.06 1.06c.39.39.39 1.03 0 1.42-.6.6-1.43 1.11-2.21 1.69-.35.26-.7.53-1.01.84C1.43 14.23.4 16.08 1.4 17.07c.99 1 2.84-.03 4.18-1.36.31-.31.58-.66.85-1.02.57-.78 1.08-1.61 1.69-2.21.39-.39 1.02-.39 1.41 0l1.06 1.06c.39.39 1.02.39 1.41 0z"/></g></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-ignore', array('ignoreC' => __('Ignore ', 'wordfence'))), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('Theme Name', 'wordfence') => '${data.name}',
__('Current Theme Version', 'wordfence') => '${data.version}',
__('New Theme Version', 'wordfence') => '${data.newVersion}',
null,
__('Details', 'wordfence') => '{{if data.vulnerable}}<strong>' . esc_html__('Update includes security-related fixes.', 'wordfence') . '</strong><br>{{/if}}{{html longMsg}}<br><a href="' . get_admin_url() . 'update-core.php' . '">' . esc_html__('Click here to update now', 'wordfence') . '</a>.',
null,
__('Theme URL', 'wordfence') => '<a href="${data.URL}" target="_blank" rel="noopener noreferrer"><span class="wf-hidden-xs wf-split-word">${data.URL}</span><span class="wf-visible-xs">' . __('View', 'wordfence') . '</span><span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>',
__('Vulnerability Information', 'wordfence') => array('data.vulnerabilityLink', '<a href="${data.vulnerabilityLink}" target="_blank" rel="noopener noreferrer"><span class="wf-hidden-xs wf-split-word">${data.vulnerabilityLink}</span><span class="wf-visible-xs">' . __('View', 'wordfence') . '</span><span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>'),
__('Vulnerability Severity', 'wordfence') => array('data.cvssScore', '${data.cvssScore}/10.0 (<span class="${data.severityClass}" data-tooltip="test" title="This is the severity of the vulnerability itself, which can differ from the scan result severity. Some lower-severity vulnerabilities may still be important to address depending on your site\'s configuration and user base, so they are still important for you to review.">${data.severityLabel}</span>)'),
),
'detailControls' => array(
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
'<a href="' . esc_url(wfUtils::wpAdminURL('update-core.php')) . '" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-view-updates">' . __('View Updates', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('Theme Name', 'wordfence') => '$data.name',
__('Current Theme Version', 'wordfence') => '$data.version',
__('New Theme Version', 'wordfence') => '$data.newVersion',
null,
__('Details', 'wordfence') => '$longMsg',
__('Vulnerability Status', 'wordfence') => array('$data.vulnerable', __('Update includes security-related fixes.', 'wordfence')),
null,
__('Theme URL', 'wordfence') => '$data.URL',
__('Vulnerability Information', 'wordfence') => '$data.vulnerabilityLink',
__('Vulnerability Severity', 'wordfence') => '${data.cvssScore}/10.0 (${data.severityLabel})',
),
))->render();

View File

@@ -0,0 +1,35 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'wfUpgrade',
'displayType' => __('Core Upgrade', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 20 20"><g><path d="M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"/></g></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-ignore', array('ignoreC' => __('Ignore', 'wordfence'))), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('Current WordPress Version', 'wordfence') => '${data.currentVersion}',
__('New WordPress Version', 'wordfence') => '${data.newVersion}',
null,
__('Details', 'wordfence') => '{{if data.vulnerable}}<strong>' . esc_html__('Update includes security-related fixes.', 'wordfence') . '</strong><br>{{/if}}{{html longMsg}}<br><a href="' . get_admin_url() . 'update-core.php' . '">' . esc_html__('Click here to update now', 'wordfence') . '</a>.',
null,
__('Vulnerability Information', 'wordfence') => array('data.vulnerabilityLink', '<a href="${data.vulnerabilityLink}" target="_blank" rel="noopener noreferrer"><span class="wf-hidden-xs wf-split-word">${data.vulnerabilityLink}</span><span class="wf-visible-xs">' . __('View', 'wordfence') . '</span><span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>'),
__('Vulnerability Severity', 'wordfence') => array('data.cvssScore', '${data.cvssScore}/10.0 (<span class="${data.severityClass}" data-tooltip="test" title="This is the severity of the vulnerability itself, which can differ from the scan result severity. Some lower-severity vulnerabilities may still be important to address depending on your site\'s configuration and user base, so they are still important for you to review.">${data.severityLabel}</span>)'),
),
'detailControls' => array(
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
'<a href="' . esc_url(wfUtils::wpAdminURL('update-core.php')) . '" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-view-updates">' . __('View Updates', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('Current WordPress Version', 'wordfence') => '$data.currentVersion',
__('New WordPress Version', 'wordfence') => '$data.newVersion',
null,
__('Details', 'wordfence') => '$longMsg',
__('Vulnerability Status', 'wordfence') => array('$data.vulnerable', __('Update includes security-related fixes.', 'wordfence')),
null,
__('Vulnerability Information', 'wordfence') => '$data.vulnerabilityLink',
__('Vulnerability Severity', 'wordfence') => '${data.cvssScore}/10.0 (${data.severityLabel})',
),
))->render();

View File

@@ -0,0 +1,22 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'wfUpgradeError',
'displayType' => __('Update Check Error', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 20 20"><g><path d="M13.11 4.36L9.87 7.6 8 5.73l3.24-3.24c.35-.34 1.05-.2 1.56.32.52.51.66 1.21.31 1.55zm-8 1.77l.91-1.12 9.01 9.01-1.19.84c-.71.71-2.63 1.16-3.82 1.16H6.14L4.9 17.26c-.59.59-1.54.59-2.12 0-.59-.58-.59-1.53 0-2.12l1.24-1.24v-3.88c0-1.13.4-3.19 1.09-3.89zm7.26 3.97l3.24-3.24c.34-.35 1.04-.21 1.55.31.52.51.66 1.21.31 1.55l-3.24 3.25z"/></g></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-ignore', array('ignoreC' => __('Ignore Update', 'wordfence'))), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('Details', 'wordfence') => '{{html longMsg}}',
),
'detailControls' => array(
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-mark-fixed" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
'<a href="' . esc_url(wfUtils::wpAdminURL('update-core.php')) . '" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-issue-control-view-updates">' . __('View Updates', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('Details', 'wordfence') => '$longMsg',
),
))->render();

View File

@@ -0,0 +1,27 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'wpscan_fullPathDiscl',
'displayType' => __('Directory Listing Enabled', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 46 55" ><path d="M43.557,13.609l-11.214,-11.175c-1.303,-1.246 -2.962,-2.058 -4.747,-2.324l0,18.223l18.294,0c-0.269,-1.777 -1.084,-3.427 -2.333,-4.724l0,0Z" fill="#9e9e9e"/><path d="M26.465,22.921c-0.005,0 -0.011,0 -0.016,0c-1.885,0 -3.435,-1.545 -3.435,-3.423c0,-0.005 0,-0.011 0,-0.016l0,-19.482l-19.562,0c-0.921,-0.019 -1.809,0.346 -2.449,1.005c-0.658,0.637 -1.022,1.52 -1.003,2.434l0,48.127c-0.019,0.915 0.345,1.797 1.003,2.434c0.639,0.658 1.524,1.023 2.443,1.005l39.102,0c0.004,0.001 0.008,0.001 0.012,0.001c1.884,0 3.435,-1.546 3.435,-3.423c0,-0.006 0,-0.011 -0.001,-0.017l0,-28.645l-19.529,0Z" fill="#9e9e9e"/></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-ignore'), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('URL', 'wordfence') => '<a href="${data.url}" target="_blank" rel="noopener noreferrer">${data.url}<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>',
null,
__('Details', 'wordfence') => '{{html longMsg}}'
),
'detailControls' => array(
'{{if data.fileExists}}<a target="_blank" class="wf-btn wf-btn-default wf-btn-callout-subtle" rel="noopener noreferrer" href="${WFAD.makeViewFileLink(data)}">' . __('View File', 'wordfence') . '<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>{{/if}}',
'{{if data.canDelete}}<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle" onclick="WFAD.deleteFile(\'${id}\'); return false;" role="button">' . __('Delete File', 'wordfence') . '</a>{{/if}}',
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle" onclick="WFAD.updateIssueStatus(\'${id}\', \'delete\'); return false;" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('URL', 'wordfence') => '$data.url',
null,
__('Details', 'wordfence') => '$longMsg',
),
))->render();

View File

@@ -0,0 +1,27 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an issue template.
*/
echo wfView::create('scanner/issue-base', array(
'internalType' => 'wpscan_fullPathDiscl',
'displayType' => __('Full Path Disclosure', 'wordfence'),
'iconSVG' => '<svg viewBox="0 0 46 55" ><path d="M43.557,13.609l-11.214,-11.175c-1.303,-1.246 -2.962,-2.058 -4.747,-2.324l0,18.223l18.294,0c-0.269,-1.777 -1.084,-3.427 -2.333,-4.724l0,0Z" fill="#9e9e9e"/><path d="M26.465,22.921c-0.005,0 -0.011,0 -0.016,0c-1.885,0 -3.435,-1.545 -3.435,-3.423c0,-0.005 0,-0.011 0,-0.016l0,-19.482l-19.562,0c-0.921,-0.019 -1.809,0.346 -2.449,1.005c-0.658,0.637 -1.022,1.52 -1.003,2.434l0,48.127c-0.019,0.915 0.345,1.797 1.003,2.434c0.639,0.658 1.524,1.023 2.443,1.005l39.102,0c0.004,0.001 0.008,0.001 0.012,0.001c1.884,0 3.435,-1.546 3.435,-3.423c0,-0.006 0,-0.011 -0.001,-0.017l0,-28.645l-19.529,0Z" fill="#9e9e9e"/></svg>',
'summaryControls' => array(wfView::create('scanner/issue-control-ignore'), wfView::create('scanner/issue-control-show-details')),
'detailPairs' => array(
__('URL', 'wordfence') => '<a href="${data.url}" target="_blank" rel="noopener noreferrer">${data.url}<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>',
null,
__('Details', 'wordfence') => '{{html longMsg}}'
),
'detailControls' => array(
'{{if data.fileExists}}<a target="_blank" class="wf-btn wf-btn-default wf-btn-callout-subtle" rel="noopener noreferrer" href="${WFAD.makeViewFileLink(data)}">' . __('View File', 'wordfence') . '<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>{{/if}}',
'{{if data.canDelete}}<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle" onclick="WFAD.deleteFile(\'${id}\'); return false;" role="button">' . __('Delete File', 'wordfence') . '</a>{{/if}}',
'<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle" onclick="WFAD.updateIssueStatus(\'${id}\', \'delete\'); return false;" role="button">' . __('Mark as Fixed', 'wordfence') . '</a>',
),
'textOutput' => (isset($textOutput) ? $textOutput : null),
'textOutputDetailPairs' => array(
__('URL', 'wordfence') => '$data.url',
null,
__('Details', 'wordfence') => '$longMsg',
),
))->render();

View File

@@ -0,0 +1,26 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* No issues found template view.
*
* Expects $internalType, $displayType, $iconSVG, and $controls.
*
* @var string $internalType The internal issue type used to select the correct template.
* @var string $displayType A human-readable string for displaying the issue type.
* @var string $iconSVG The SVG HTML for the issue's icon.
* @var array $summaryControls An array of summary controls for the issue type.
* @var array $detailPairs An array of label/value pairs for the issue's detail data. If the entry should only be conditionally shown, the value may be an array of the format array(conditional, displayValue).
* @var array $detailControls An array of detail controls for the issue type.
*/
?>
<script type="text/x-jquery-template" id="issueTmpl_noneFound">
<ul class="wf-issue wf-issue-severity-good" data-issue-id="${id}">
<li class="wf-issue-summary">
<ul>
<li class="wf-issue-short"><div class="wf-issue-message">${shortMsg}</div></li>
<li class="wf-issue-stats"></li>
<li class="wf-issue-controls"></li>
</ul>
</li>
</ul>
</script>

View File

@@ -0,0 +1,126 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents the scan option scansEnabled_fileContents with a boolean on/off toggle checkbox and text area (hidden by default) for custom scan signatures.
*
* Expects $toggleOptionName, $enabledToggleValue, $disabledToggleValue, $toggleValue, $textAreaOptionName, $textAreaValue, and $title to be defined. $helpLink may also be defined.
*
* @var string $toggleOptionName The option name for the toggle portion.
* @var string $enabledToggleValue The value to save in $toggleOption if the toggle is enabled.
* @var string $disabledToggleValue The value to save in $toggleOption if the toggle is disabled.
* @var string $toggleValue The current value of $toggleOptionName.
* @var string $textAreaOptionName The option name for the text area portion.
* @var string $textAreaValue The current value of $textAreaOptionName.
* @var string $title The title shown for the option.
* @var string $helpLink If defined, the link to the corresponding external help page.
*/
?>
<ul class="wf-flex-vertical wf-flex-full-width">
<li>
<ul id="wf-option-scansEnabled-fileContents" class="wf-option wf-option-scan-signatures" data-toggle-option="scansEnabled_fileContents" data-enabled-toggle-value="1" data-disabled-toggle-value="0" data-original-toggle-value="<?php echo wfConfig::get('scansEnabled_fileContents') ? 1 : 0; ?>" data-text-area-option="scan_include_extra" data-original-text-area-value="<?php echo esc_attr(wfConfig::get('scan_include_extra')); ?>">
<li class="wf-option-checkbox<?php echo (wfConfig::get('scansEnabled_fileContents') ? ' wf-checked' : ''); ?>" role="checkbox" aria-checked="<?php echo ($value == $enabledValue ? 'true' : 'false'); ?>" tabindex="0" aria-labelledby="wf-option-scansEnabled-fileContents-label"><i class="wf-ion-ios-checkmark-empty" aria-hidden="true"></i></li>
<li class="wf-option-title"><span id="wf-option-scansEnabled-fileContents-label"><?php echo esc_html($title); ?></span> <a href="<?php echo wfSupportController::esc_supportURL(wfSupportController::ITEM_SCAN_OPTION_MALWARE_SIGNATURES); ?>" target="_blank" rel="noopener noreferrer" class="wf-inline-help"><i class="wf-fa wf-fa-question-circle-o" aria-hidden="true"></i><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a></li>
<li class="wf-option-disclosure"><svg width="12px" height="12px" viewBox="0 0 12 12"><path id="disclosure-closed" d="M 6 0 l 6 6 -6 6 0 -12" fill="#777"/></svg></li>
</ul>
</li>
<li id="wf-scan-additional-signatures">
<h4 id="wf-scan-additional-signatures-label"><?php esc_html_e('Add Additional Signatures', 'wordfence') ?></h4>
<textarea id="wf-option-scan-include-extra" spellcheck="false" autocapitalize="none" autocomplete="off" aria-labelledby="wf-scan-additional-signatures-label"><?php echo esc_html(wfConfig::get('scan_include_extra')); ?></textarea>
</li>
</ul>
<script type="application/javascript">
(function($) {
$(function() {
$('.wf-option.wf-option-scan-signatures .wf-option-checkbox').each(function() {
$(this).on('click', function(e) {
e.preventDefault();
e.stopPropagation();
var optionElement = $(this).closest('.wf-option');
var option = optionElement.data('toggleOption');
var value = false;
var isActive = $(this).hasClass('wf-checked');
if (isActive) {
$(this).removeClass('wf-checked').attr('aria-checked', 'false');
value = optionElement.data('disabledToggleValue');
}
else {
$(this).addClass('wf-checked').attr('aria-checked', 'true');
value = optionElement.data('enabledToggleValue');
}
var originalValue = optionElement.data('originalToggleValue');
if (originalValue == value) {
delete WFAD.pendingChanges[option];
}
else {
WFAD.pendingChanges[option] = value;
}
WFAD.updatePendingChanges();
});
});
$('#wf-scan-additional-signatures textarea').on('change paste keyup', function() {
var e = this;
setTimeout(function() {
var optionElement = $(e).closest('ul').find('.wf-option.wf-option-scan-signatures');
var option = optionElement.data('textAreaOption');
var value = $(e).val();
var originalValue = optionElement.data('originalTextAreaValue');
if (originalValue == value) {
delete WFAD.pendingChanges[option];
}
else {
WFAD.pendingChanges[option] = value;
}
WFAD.updatePendingChanges();
}, 4);
});
$(window).on('wfOptionsReset', function() {
$('.wf-option.wf-option-scan-signatures .wf-option-checkbox').each(function() {
var optionElement = $(this).closest('.wf-option');
$(this).toggleClass('wf-checked', !!parseInt(optionElement.data('originalToggleValue')));
});
$('#wf-scan-additional-signatures textarea').each(function() {
var optionElement = $(this).closest('ul').find('.wf-option.wf-option-scan-signatures');
var originalValue = optionElement.data('originalTextAreaValue');
$(this).val(originalValue);
});
});
$('.wf-option.wf-option-scan-signatures .wf-option-disclosure').each(function() {
var disclosure = $(this).find('svg');
$(this).closest('.wf-option').css('cursor', 'pointer');
$(this).closest('.wf-option').on('click', function(e) {
e.preventDefault();
e.stopPropagation();
var isActive = $('#wf-scan-additional-signatures').hasClass('wf-active');
if (isActive) {
disclosure.css('transform', 'rotate(0deg)');
$('#wf-scan-additional-signatures').slideUp({
always: function() {
$('#wf-scan-additional-signatures').removeClass('wf-active');
}
});
}
else {
disclosure.css('transform', 'rotate(90deg)');
$('#wf-scan-additional-signatures').slideDown({
always: function() {
$('#wf-scan-additional-signatures').addClass('wf-active');
}
});
}
});
});
});
})(jQuery);
</script>

View File

@@ -0,0 +1,86 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents the Advanced Scan Options group.
*
* Expects $scanner and $stateKey.
*
* @var wfScanner $scanner
* @var string $stateKey The key under which the collapse state is stored.
* @var bool $collapseable If defined, specifies whether or not this grouping can be collapsed. Defaults to true.
*/
if (!isset($collapseable)) {
$collapseable = true;
}
?>
<div class="wf-row">
<div class="wf-col-xs-12">
<div class="wf-block<?php if (!$collapseable) { echo ' wf-always-active'; } else { echo (wfPersistenceController::shared()->isActive($stateKey) ? ' wf-active' : ''); } ?>" data-persistence-key="<?php echo esc_attr($stateKey); ?>">
<div class="wf-block-header">
<div class="wf-block-header-content">
<div class="wf-block-title">
<strong><?php esc_html_e('Advanced Scan Options', 'wordfence'); ?></strong>
</div>
<?php if ($collapseable): ?><div class="wf-block-header-action"><div class="wf-block-header-action-disclosure" role="checkbox" aria-checked="<?php echo (wfPersistenceController::shared()->isActive($stateKey) ? 'true' : 'false'); ?>" tabindex="0"></div></div><?php endif; ?>
</div>
</div>
<div class="wf-block-content">
<ul class="wf-block-list">
<li>
<?php
echo wfView::create('options/option-textarea', array(
'textOptionName' => 'scan_exclude',
'textValue' => wfUtils::cleanupOneEntryPerLine(wfConfig::get('scan_exclude')),
'title' => __('Exclude files from scan that match these wildcard patterns (one per line)', 'wordfence'),
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_EXCLUDE_PATTERNS),
'noSpacer' => true,
))->render();
?>
</li>
<li>
<?php
echo wfView::create('options/option-textarea', array(
'textOptionName' => 'scan_include_extra',
'textValue' => wfConfig::get('scan_include_extra'),
'title' => __('Additional scan signatures (one per line)', 'wordfence'),
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_CUSTOM_MALWARE_SIGNATURES),
'noSpacer' => true,
))->render();
?>
</li>
<li>
<?php
echo wfView::create('options/option-toggled', array(
'optionName' => 'scan_force_ipv4_start',
'enabledValue' => 1,
'disabledValue' => 0,
'value' => wfConfig::get('scan_force_ipv4_start') ? 1 : 0,
'title' => __('Use only IPv4 to start scans', 'wordfence'),
'subtitle' => __('This option requires cURL. (This may have no effect on some old PHP or cURL versions.)', 'wordfence'),
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_USE_ONLY_IPV4),
'premium' => false,
'disabled' => !wfUtils::isCurlSupported()
))->render();
?>
</li>
<li>
<?php
$options = array();
foreach (range(0, wfScanMonitor::MAX_RESUME_ATTEMPTS) as $number) {
$options[] = array('value' => $number, 'label' => $number > 0 ? $number : '0 (Disabled)');
}
echo wfView::create('options/option-select', array(
'selectOptionName' => 'scan_max_resume_attempts',
'selectOptions' => $options,
'selectValue' => wfConfig::get('scan_max_resume_attempts', wfScanMonitor::DEFAULT_RESUME_ATTEMPTS),
'title' => __('Maximum number of attempts to resume each scan stage', 'wordfence'),
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_MAX_RESUME_ATTEMPTS),
))->render();
?>
</li>
</ul>
</div>
</div>
</div>
</div> <!-- end custom scan options -->

View File

@@ -0,0 +1,37 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents the Basic Scan Type Options group.
*
* Expects $scanner and $stateKey.
*
* @var wfScanner $scanner
* @var string $stateKey The key under which the collapse state is stored.
* @var bool $collapseable If defined, specifies whether or not this grouping can be collapsed. Defaults to true.
*/
if (!isset($collapseable)) {
$collapseable = true;
}
?>
<div class="wf-row">
<div class="wf-col-xs-12">
<div class="wf-block<?php if (!$collapseable) { echo ' wf-always-active'; } else { echo (wfPersistenceController::shared()->isActive($stateKey) ? ' wf-active' : ''); } ?>" data-persistence-key="<?php echo esc_attr($stateKey); ?>">
<div class="wf-block-header">
<div class="wf-block-header-content">
<div class="wf-block-title">
<strong><?php esc_html_e('Basic Scan Type Options', 'wordfence'); ?></strong>
</div>
<?php if ($collapseable): ?><div class="wf-block-header-action"><div class="wf-block-header-action-disclosure" role="checkbox" aria-checked="<?php echo (wfPersistenceController::shared()->isActive($stateKey) ? 'true' : 'false'); ?>" tabindex="0"></div></div><?php endif; ?>
</div>
</div>
<div class="wf-block-content">
<?php
echo wfView::create('scanner/scan-type', array(
'scanner' => $scanner,
))->render();
?>
</div>
</div>
</div>
</div> <!-- end scan type -->

View File

@@ -0,0 +1,88 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents the General Options group.
*
* Expects $scanner and $stateKey.
*
* @var wfScanner $scanner
* @var string $stateKey The key under which the collapse state is stored.
* @var bool $collapseable If defined, specifies whether or not this grouping can be collapsed. Defaults to true.
*/
if (!isset($collapseable)) {
$collapseable = true;
}
?>
<div class="wf-row">
<div class="wf-col-xs-12">
<div class="wf-block<?php if (!$collapseable) { echo ' wf-always-active'; } else { echo (wfPersistenceController::shared()->isActive($stateKey) ? ' wf-active' : ''); } ?>" data-persistence-key="<?php echo esc_attr($stateKey); ?>">
<div class="wf-block-header">
<div class="wf-block-header-content">
<div class="wf-block-title">
<strong><?php esc_html_e('General Options', 'wordfence'); ?></strong>
</div>
<?php if ($collapseable): ?><div class="wf-block-header-action"><div class="wf-block-header-action-disclosure" role="checkbox" aria-checked="<?php echo (wfPersistenceController::shared()->isActive($stateKey) ? 'true' : 'false'); ?>" tabindex="0"></div></div><?php endif; ?>
</div>
</div>
<div class="wf-block-content">
<ul class="wf-block-list">
<?php
$options = array(
array('key' => 'scansEnabled_checkGSB', 'label' => __('Check if this website is on a domain blocklist', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_CHECK_SITE_BLACKLISTED), 'premium' => true, 'subtitleHTML' => wp_kses(__('<em>Reputation check</em>', 'wordfence'), array('em'=>array()))),
array('key' => 'spamvertizeCheck', 'label' => __('Check if this website is being "Spamvertised"', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_CHECK_SITE_SPAMVERTIZED), 'premium' => true, 'subtitleHTML' => wp_kses(__('<em>Reputation check</em>', 'wordfence'), array('em'=>array()))),
array('key' => 'checkSpamIP', 'label' => __('Check if this website IP is generating spam', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_CHECK_IP_SPAMMING), 'premium' => true, 'subtitleHTML' => wp_kses(__('<em>Reputation check</em>', 'wordfence'), array('em'=>array()))),
array('key' => 'scansEnabled_checkHowGetIPs', 'label' => __('Scan for misconfigured How does Wordfence get IPs', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_CHECK_MISCONFIGURED_HOW_GET_IPS)),
array('key' => 'scansEnabled_checkReadableConfig', 'label' => __('Scan for publicly accessible configuration, backup, or log files', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_PUBLIC_CONFIG)),
array('key' => 'scansEnabled_suspectedFiles', 'label' => __('Scan for publicly accessible quarantined files', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_PUBLIC_QUARANTINED)),
array('key' => 'scansEnabled_core', 'label' => __('Scan core files against repository versions for changes', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_CORE_CHANGES)),
array('key' => 'scansEnabled_themes', 'label' => __('Scan theme files against repository versions for changes', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_THEME_CHANGES)),
array('key' => 'scansEnabled_plugins', 'label' => __('Scan plugin files against repository versions for changes', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_PLUGIN_CHANGES)),
array('key' => 'scansEnabled_coreUnknown', 'label' => __('Scan wp-admin and wp-includes for files not bundled with WordPress', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_UNKNOWN_CORE)),
array('key' => 'scansEnabled_malware', 'label' => __('Scan for signatures of known malicious files', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_MALWARE_HASHES)),
array('key' => 'scansEnabled_fileContents', 'label' => __('Scan file contents for backdoors, trojans and suspicious code', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_MALWARE_SIGNATURES)),
array('key' => 'scansEnabled_fileContentsGSB', 'label' => __('Scan file contents for malicious URLs', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_MALWARE_URLS)),
array('key' => 'scansEnabled_posts', 'label' => __('Scan posts for known dangerous URLs and suspicious content', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_POST_URLS)),
array('key' => 'scansEnabled_comments', 'label' => __('Scan comments for known dangerous URLs and suspicious content', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_COMMENT_URLS)),
array('key' => 'scansEnabled_suspiciousOptions', 'label' => __('Scan WordPress core, plugin, and theme options for known dangerous URLs and suspicious content', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_MALWARE_OPTIONS)),
array('key' => 'scansEnabled_oldVersions', 'label' => __('Scan for out of date, abandoned, and vulnerable plugins, themes, and WordPress versions', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_UPDATES)),
array('key' => 'scansEnabled_suspiciousAdminUsers', 'label' => __('Scan for suspicious admin users created outside of WordPress', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_UNKNOWN_ADMINS)),
array('key' => 'scansEnabled_passwds', 'label' => __('Check the strength of passwords', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_PASSWORD_STRENGTH)),
array('key' => 'scansEnabled_diskSpace', 'label' => __('Monitor disk space', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_DISK_SPACE)),
array('key' => 'scansEnabled_wafStatus', 'label' => __('Monitor Web Application Firewall status', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_WAF_STATUS)),
array('key' => 'other_scanOutside', 'label' => __('Scan files outside your WordPress installation', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_OUTSIDE_WORDPRESS)),
array('key' => 'scansEnabled_scanImages', 'label' => __('Scan images, binary, and other files as if they were executable', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_IMAGES_EXECUTABLE)),
);
foreach ($options as $o):
?>
<li>
<?php
if (isset($o['view'])) {
echo wfView::create($o['view'], array(
'optionName' => $o['key'],
'value' => wfConfig::get($o['key']) ? 1 : 0,
'title' => $o['label'],
'helpLink' => $o['helpLink'],
'premium' => isset($o['premium']) && $o['premium'],
))->render();
}
else {
echo wfView::create('options/option-toggled', array(
'optionName' => $o['key'],
'enabledValue' => 1,
'disabledValue' => 0,
'value' => wfConfig::get($o['key']) ? 1 : 0,
'title' => $o['label'],
'subtitleHTML' => isset($o['subtitleHTML']) ? $o['subtitleHTML'] : null,
'helpLink' => $o['helpLink'],
'premium' => isset($o['premium']) && $o['premium'],
))->render();
}
?>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>
</div>
</div> <!-- end general options -->

View File

@@ -0,0 +1,69 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents the Performance Options group.
*
* Expects $scanner and $stateKey.
*
* @var wfScanner $scanner
* @var string $stateKey The key under which the collapse state is stored.
* @var bool $collapseable If defined, specifies whether or not this grouping can be collapsed. Defaults to true.
*/
if (!isset($collapseable)) {
$collapseable = true;
}
?>
<div class="wf-row">
<div class="wf-col-xs-12">
<div class="wf-block<?php if (!$collapseable) { echo ' wf-always-active'; } else { echo (wfPersistenceController::shared()->isActive($stateKey) ? ' wf-active' : ''); } ?>" data-persistence-key="<?php echo esc_attr($stateKey); ?>">
<div class="wf-block-header">
<div class="wf-block-header-content">
<div class="wf-block-title">
<strong><?php esc_html_e('Performance Options', 'wordfence'); ?></strong>
</div>
<?php if ($collapseable): ?><div class="wf-block-header-action"><div class="wf-block-header-action-disclosure" role="checkbox" aria-checked="<?php echo (wfPersistenceController::shared()->isActive($stateKey) ? 'true' : 'false'); ?>" tabindex="0"></div></div><?php endif; ?>
</div>
</div>
<div class="wf-block-content">
<ul class="wf-block-list">
<?php
$options = array(
array('key' => 'lowResourceScansEnabled', 'label' => __('Use low resource scanning (reduces server load by lengthening the scan duration)', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_LOW_RESOURCE)),
array('key' => 'scan_maxIssues', 'label' => __('Limit the number of issues sent in the scan results email', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_LIMIT_ISSUES), 'view' => 'options/option-text', 'parameters' => array('subtitle' => __('0 or empty means unlimited issues will be sent', 'wordfence'))),
array('key' => 'scan_maxDuration', 'label' => __('Time limit that a scan can run in seconds', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_OVERALL_TIME_LIMIT), 'view' => 'options/option-text', 'parameters' => array('subtitle' => sprintf(/* translators: Time until. */ __('0 or empty means the default of %s will be used', 'wordfence'), wfUtils::makeDuration(WORDFENCE_DEFAULT_MAX_SCAN_TIME)))),
array('key' => 'maxMem', 'label' => __('How much memory should Wordfence request when scanning', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_MEMORY_LIMIT), 'view' => 'options/option-text', 'parameters' => array('subtitle' => __('Memory size in megabytes', 'wordfence'))),
array('key' => 'maxExecutionTime', 'label' => __('Maximum execution time for each scan stage ', 'wordfence'), 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_OPTION_STAGE_TIME_LIMIT), 'view' => 'options/option-text', 'parameters' => array('subtitle' => sprintf(/* translators: PHP max execution time (number). */ __('0 for default. Must be %d or greater and 10-20 or higher is recommended for most servers', 'wordfence'), intval(WORDFENCE_SCAN_MIN_EXECUTION_TIME)))),
);
foreach ($options as $o):
?>
<li>
<?php
if (isset($o['view']) && $o['view'] == 'options/option-text') {
if (!isset($o['parameters'])) { $o['parameters'] = array(); }
echo wfView::create($o['view'], array_merge(array(
'textOptionName' => $o['key'],
'textValue' => wfConfig::get($o['key']),
'title' => $o['label'],
'helpLink' => $o['helpLink'],
), $o['parameters']))->render();
}
else {
echo wfView::create('options/option-toggled', array(
'optionName' => $o['key'],
'enabledValue' => 1,
'disabledValue' => 0,
'value' => wfConfig::get($o['key']) ? 1 : 0,
'title' => $o['label'],
'helpLink' => $o['helpLink'],
'disabled' => isset($o['disabled']) ? $o['disabled'] : false,
))->render();
}
?>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>
</div>
</div> <!-- end performance options -->

View File

@@ -0,0 +1,39 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents the Scan Scheduling group.
*
* Expects $scanner and $stateKey.
*
* @var wfScanner $scanner
* @var string $stateKey The key under which the collapse state is stored.
* @var bool $collapseable If defined, specifies whether or not this grouping can be collapsed. Defaults to true.
*/
if (!isset($collapseable)) {
$collapseable = true;
}
?>
<div class="wf-row">
<div class="wf-col-xs-12">
<div class="wf-block<?php if (!$collapseable) { echo ' wf-always-active'; } else { echo (wfPersistenceController::shared()->isActive($stateKey) ? ' wf-active' : ''); } ?>" data-persistence-key="<?php echo esc_attr($stateKey); ?>">
<div class="wf-block-header">
<div class="wf-block-header-content">
<div class="wf-block-title">
<strong><?php esc_html_e('Scan Scheduling', 'wordfence'); ?></strong>
</div>
<?php if ($collapseable): ?><div class="wf-block-header-action"><div class="wf-block-header-action-disclosure" role="checkbox" aria-checked="<?php echo (wfPersistenceController::shared()->isActive($stateKey) ? 'true' : 'false'); ?>" tabindex="0"></div></div><?php endif; ?>
</div>
</div>
<div class="wf-block-content">
<ul class="wf-block-list">
<?php
echo wfView::create('scanner/scan-scheduling', array(
'scanner' => $scanner,
))->render();
?>
</ul>
</div>
</div>
</div>
</div> <!-- end scan schedule -->

View File

@@ -0,0 +1,33 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents a scan failed error message.
*
* Expects $messageHTML and $buttonTitle.
*
* @var string $messageTitle The title for the message (optional, defaults to 'Scan Failed')
* @var string $messageHTML The message to show.
* @var string $buttonTitle The title of the kill/reset button.
*/
if (!isset($messageTitle))
$messageTitle = __('Scan Failed', 'wordfence');
?>
<ul class="wf-flex-horizontal wf-flex-full-width wf-no-top">
<li>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 116.93 108.46"><path d="M115.82,96.14,65.76,4.37a8.33,8.33,0,0,0-3.06-3.2,8.24,8.24,0,0,0-8.47,0,8.34,8.34,0,0,0-3.07,3.2L1.11,96.14a7.78,7.78,0,0,0,.13,8.21,8.16,8.16,0,0,0,3,3,8.13,8.13,0,0,0,4.14,1.11H108.52a8.36,8.36,0,0,0,7.17-4.11,7.78,7.78,0,0,0,.13-8.21Zm-49-6.52a2.09,2.09,0,0,1-.62,1.53,2,2,0,0,1-1.46.62H52.21a2,2,0,0,1-1.46-.62,2.08,2.08,0,0,1-.62-1.53V77.24a2.08,2.08,0,0,1,.62-1.53,2,2,0,0,1,1.46-.62H64.72a2,2,0,0,1,1.47.62,2.09,2.09,0,0,1,.62,1.53V89.62Zm-.13-24.37A1.45,1.45,0,0,1,66,66.32a2.66,2.66,0,0,1-1.53.42H52.4a2.81,2.81,0,0,1-1.56-.42,1.25,1.25,0,0,1-.65-1.08L49.08,35.46a1.56,1.56,0,0,1,.65-1.37,2.52,2.52,0,0,1,1.56-.72H65.64a2.51,2.51,0,0,1,1.57.72,1.43,1.43,0,0,1,.65,1.24Zm0,0"/></svg>
</li>
<li>
<h4><?php echo esc_html($messageTitle); ?></h4>
<p><?php echo $messageHTML; ?></p>
<?php if (isset($rawErrorHTML) && !empty($rawErrorHTML)): ?>
<p class="wf-add-top"><?php esc_html_e('The error returned was:', 'wordfence'); ?></p>
<pre><?php echo $rawErrorHTML; ?></pre>
<?php endif; ?>
</li>
<li class="wf-right wf-padding-add-left">
<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle" onclick="WFAD.killScan(); return false;" role="button"><?php echo $buttonTitle; ?></a>
</li>
</ul>

View File

@@ -0,0 +1,56 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents the scan activity log and its controls.
*
* Expects $scanner.
*
* @var wfScanner $scanner The scanner state.
*/
?>
<div class="wf-alert wf-alert-danger" id="wf-scan-failed" style="display: none;">
</div>
<ul class="wf-flex-horizontal wf-flex-vertical-xs wf-flex-full-width wf-no-top wf-no-bottom">
<li id="wf-scan-last-status"></li>
<li id="wf-scan-activity-log-controls"><a href="#" id="wf-scan-email-activity-log" role="button"><?php echo wp_kses(/* translators: word order may be altered as long as HTML remains around "activity" */ __('Email<span class="wf-hidden-xs"> activity</span> log', 'wordfence'), array('span'=>array('class'=>array()))); ?></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="<?php echo esc_attr(wfUtils::getSiteBaseURL()); ?>?_wfsf=viewActivityLog&amp;nonce=<?php echo esc_attr(wp_create_nonce('wp-ajax')); ?>" id="wf-scan-full-activity-log" target="_blank"><?php echo wp_kses(/* translators: word order may be altered as long as HTML remains around "full" */ __('View<span class="wf-hidden-xs"> full</span> log', 'wordfence'), array('span'=>array('class'=>array()))); ?></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" id="wf-scan-toggle-activity-log" class="<?php echo (wfPersistenceController::shared()->isActive('wf-scan-activity-log') ? 'wf-active' : '') ?>" role="button"><span class="wf-scan-activity-log-visible"><?php esc_html_e('Hide log', 'wordfence'); ?></span><span class="wf-scan-activity-log-hidden"><?php esc_html_e('Show log', 'wordfence'); ?></span><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a></li>
</ul>
<div id="wf-scan-running-bar" style="<?php if (!$scanner->isRunning()) { echo 'display: none;'; } ?>"><div id="wf-scan-running-bar-pill"></div></div>
<ul id="wf-scan-activity-log" class="<?php echo (wfPersistenceController::shared()->isActive('wf-scan-activity-log') ? ' wf-active' : '') ?>"></ul>
<script type="application/javascript">
(function($) {
$(function() {
$('#wf-scan-email-activity-log').on('click', function(e) {
e.preventDefault();
e.stopPropagation();
WFAD.emailActivityLog();
});
$('#wf-scan-toggle-activity-log').on('click', function(e) {
e.preventDefault();
e.stopPropagation();
var isActive = $('#wf-scan-activity-log').hasClass('wf-active');
if (isActive) {
$('#wf-scan-activity-log').slideUp({
always: function() {
$('#wf-scan-activity-log').removeClass('wf-active');
$('#wf-scan-toggle-activity-log').removeClass('wf-active');
}
});
}
else {
$('#wf-scan-activity-log').slideDown({
always: function() {
$('#wf-scan-activity-log').addClass('wf-active');
$('#wf-scan-toggle-activity-log').addClass('wf-active');
}
});
}
WFAD.ajax('wordfence_saveDisclosureState', {name: 'wf-scan-activity-log', state: !isActive}, function() {});
});
});
})(jQuery);
</script>

View File

@@ -0,0 +1,61 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents an individual element in the scan progress indicator.
*
* Expects $id, $title, and $scanner. $premiumOnly and $status may also be defined.
*
* @var string $id The element ID.
* @var string $title The element title.
* @var wfScanner $scanner The scanner state.
* @var string $status One of the wfScanner::STATUS_ constants.
*/
if (!isset($premiumOnly)) { $premiumOnly = false; }
$class = '';
switch ($status) {
case wfScanner::STATUS_PENDING:
//No class
break;
case wfScanner::STATUS_RUNNING:
case wfScanner::STATUS_RUNNING_WARNING:
$class = 'wf-scan-step-running';
break;
case wfScanner::STATUS_COMPLETE_SUCCESS:
$class = 'wf-scan-step-complete-success';
break;
case wfScanner::STATUS_COMPLETE_WARNING:
$class = 'wf-scan-step-complete-warning';
break;
case wfScanner::STATUS_PREMIUM:
$class = 'wf-scan-step-premium';
break;
case wfScanner::STATUS_DISABLED:
$class = 'wf-scan-step-disabled';
break;
}
?>
<li id="<?php echo esc_attr($id); ?>" class="wf-scan-step<?php if ($class) { echo " {$class}"; } ?>">
<div class="wf-scan-step-icon">
<?php if ($status == wfScanner::STATUS_PREMIUM): ?>
<div class="wf-scan-step-premium"></div>
<?php endif; ?>
<div class="wf-scan-step-pending"></div>
<div class="wf-scan-step-running">
<?php
echo wfView::create('common/indeterminate-progress', array(
'size' => 50,
))->render();
?>
</div>
<div class="wf-scan-step-complete-success"></div>
<div class="wf-scan-step-complete-warning"></div>
<div class="wf-scan-step-disabled"></div>
</div>
<div class="wf-scan-step-title"><?php echo esc_html($title); ?></div>
<?php if ($status == wfScanner::STATUS_PREMIUM): ?>
<div class="wf-scan-step-subtitle"><a href="https://www.wordfence.com/gnl1scanUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer"><?php esc_html_e('Upgrade', 'wordfence'); ?><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a></div>
<?php endif; ?>
</li>

View File

@@ -0,0 +1,92 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents a block list element specifically for the scan progress indicator.
*
* Expects $scanner.
*
* @var wfScanner $scanner The scanner state.
*/
$status = $scanner->stageStatus();
?>
<ul class="wf-scanner-progress">
<?php
echo wfView::create('scanner/scan-progress-element', array(
'scanner' => $scanner,
'id' => 'wf-scan-spamvertising',
'title' => __('Spamvertising Checks', 'wordfence'),
'status' => $status[wfScanner::STAGE_SPAMVERTISING_CHECKS],
))->render();
echo wfView::create('scanner/scan-progress-element', array(
'scanner' => $scanner,
'id' => 'wf-scan-spam',
'title' => __('Spam Check', 'wordfence'),
'status' => $status[wfScanner::STAGE_SPAM_CHECK],
))->render();
echo wfView::create('scanner/scan-progress-element', array(
'scanner' => $scanner,
'id' => 'wf-scan-blacklist',
'title' => __('Blocklist Check', 'wordfence'),
'status' => $status[wfScanner::STAGE_BLACKLIST_CHECK],
))->render();
echo wfView::create('scanner/scan-progress-element', array(
'scanner' => $scanner,
'id' => 'wf-scan-server',
'title' => __('Server State', 'wordfence'),
'status' => $status[wfScanner::STAGE_SERVER_STATE],
))->render();
echo wfView::create('scanner/scan-progress-element', array(
'scanner' => $scanner,
'id' => 'wf-scan-changes',
'title' => __('File Changes', 'wordfence'),
'status' => $status[wfScanner::STAGE_FILE_CHANGES],
))->render();
echo wfView::create('scanner/scan-progress-element', array(
'scanner' => $scanner,
'id' => 'wf-scan-malware',
'title' => __('Malware Scan', 'wordfence'),
'status' => $status[wfScanner::STAGE_MALWARE_SCAN],
))->render();
echo wfView::create('scanner/scan-progress-element', array(
'scanner' => $scanner,
'id' => 'wf-scan-content',
'title' => __('Content Safety', 'wordfence'),
'status' => $status[wfScanner::STAGE_CONTENT_SAFETY],
))->render();
echo wfView::create('scanner/scan-progress-element', array(
'scanner' => $scanner,
'id' => 'wf-scan-public',
'title' => __('Public Files', 'wordfence'),
'status' => $status[wfScanner::STAGE_PUBLIC_FILES],
))->render();
echo wfView::create('scanner/scan-progress-element', array(
'scanner' => $scanner,
'id' => 'wf-scan-password',
'title' => __('Password Strength', 'wordfence'),
'status' => $status[wfScanner::STAGE_PASSWORD_STRENGTH],
))->render();
echo wfView::create('scanner/scan-progress-element', array(
'scanner' => $scanner,
'id' => 'wf-scan-vulnerability',
'title' => __('Vulnerability Scan', 'wordfence'),
'status' => $status[wfScanner::STAGE_VULNERABILITY_SCAN],
))->render();
echo wfView::create('scanner/scan-progress-element', array(
'scanner' => $scanner,
'id' => 'wf-scan-options',
'title' => __('User & Option Audit', 'wordfence'),
'status' => $status[wfScanner::STAGE_OPTIONS_AUDIT],
))->render();
?>
</ul>

View File

@@ -0,0 +1,193 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents the scan results.
*
* Expects $scanner and $issues.
*
* @var wfScanner $scanner The scanner state.
* @var wfIssues $issues The issues state.
*/
$hasDeleteableIssue = !!$issues->getDeleteableIssueCount();
$hasRepairableIssue = !!$issues->getFixableIssueCount();
$tabs = array(
new wfTab('new', 'new', __('Results<span class="wf-hidden-xs"> Found</span>', 'wordfence'), ''),
new wfTab('ignored', 'ignored', __('Ignored<span class="wf-hidden-xs"> Results</span>', 'wordfence'), ''),
)
?>
<ul class="wf-scan-tabs" role="tablist">
<?php foreach ($tabs as $index => $t): ?>
<?php
$a = $t->a;
if (!preg_match('/^https?:\/\//i', $a)) {
$a = '#' . urlencode($a);
}
?>
<li class="wf-tab<?php if ($index == 0) { echo ' wf-active'; } ?>" id="wf-scan-tab-<?php echo esc_attr($t->id); ?>" data-target="<?php echo esc_attr($t->id); ?>" data-tab-title="<?php echo esc_attr($t->tabTitle); ?>"><a href="<?php echo esc_attr($a); ?>" aria-selected="<?php echo json_encode($index == 0) ?>" role="tab"><?php echo $t->tabTitle; ?></a></li>
<?php endforeach; ?>
<li id="wf-scan-bulk-buttons"><span class="wf-hidden-xs"><a href="#" id="wf-scan-bulk-buttons-delete" class="wf-btn wf-btn-default wf-btn-callout-subtle<?php echo ($hasDeleteableIssue ? '' : ' wf-disabled'); ?>" role="button"><?php esc_html_e('Delete All Deletable Files', 'wordfence'); ?></a>&nbsp;&nbsp;&nbsp;<a href="#" id="wf-scan-bulk-buttons-repair" class="wf-btn wf-btn-default wf-btn-callout-subtle<?php echo ($hasRepairableIssue ? '' : ' wf-disabled'); ?>" role="button"><?php esc_html_e('Repair All Repairable Files', 'wordfence'); ?></a></span></li>
</ul>
<ul class="wf-scan-results">
<li class="wf-scan-results-stats">
<div class="wf-block wf-active">
<div class="wf-block-content">
<ul class="wf-block-list wf-block-list-horizontal wf-block-list-horizontal-5 wf-block-list-equal wf-hidden-xs">
<li>
<ul class="wf-flex-horizontal wf-flex-full-width">
<li><?php esc_html_e('Posts, Comments, &amp; Files', 'wordfence'); ?></li>
<li class="wf-scan-results-stats-postscommentsfiles"><?php echo $scanner->getSummaryItem(wfScanner::SUMMARY_SCANNED_POSTS, 0) + $scanner->getSummaryItem(wfScanner::SUMMARY_SCANNED_COMMENTS, 0) + $scanner->getSummaryItem(wfScanner::SUMMARY_SCANNED_FILES, 0); ?></li>
</ul>
</li>
<li>
<ul class="wf-flex-horizontal wf-flex-full-width">
<li><?php esc_html_e('Themes &amp; Plugins', 'wordfence'); ?></li>
<li class="wf-scan-results-stats-themesplugins"><?php echo $scanner->getSummaryItem(wfScanner::SUMMARY_SCANNED_PLUGINS, 0) + $scanner->getSummaryItem(wfScanner::SUMMARY_SCANNED_THEMES, 0); ?></li>
</ul>
</li>
<li>
<ul class="wf-flex-horizontal wf-flex-full-width">
<li><?php esc_html_e('Users Checked', 'wordfence'); ?></li>
<li class="wf-scan-results-stats-users"><?php echo $scanner->getSummaryItem(wfScanner::SUMMARY_SCANNED_USERS, 0); ?></li>
</ul>
</li>
<li>
<ul class="wf-flex-horizontal wf-flex-full-width">
<li><?php esc_html_e('URLs Checked', 'wordfence'); ?></li>
<li class="wf-scan-results-stats-urls"><?php echo $scanner->getSummaryItem(wfScanner::SUMMARY_SCANNED_URLS, 0); ?></li>
</ul>
</li>
<li>
<ul class="wf-flex-horizontal wf-flex-full-width">
<li><?php esc_html_e('Results Found', 'wordfence'); ?></li>
<li class="wf-scan-results-stats-issues"><?php echo $issues->getIssueCount(); ?></li>
</ul>
</li>
</ul>
<ul class="wf-block-list wf-hidden-sm wf-hidden-md wf-hidden-lg">
<li>
<ul class="wf-flex-horizontal wf-flex-full-width">
<li><?php esc_html_e('Posts, Comments, &amp; Files', 'wordfence'); ?></li>
<li class="wf-scan-results-stats-postscommentsfiles"><?php echo $scanner->getSummaryItem(wfScanner::SUMMARY_SCANNED_POSTS, 0) + $scanner->getSummaryItem(wfScanner::SUMMARY_SCANNED_COMMENTS, 0) + $scanner->getSummaryItem(wfScanner::SUMMARY_SCANNED_FILES, 0); ?></li>
</ul>
</li>
<li>
<ul class="wf-flex-horizontal wf-flex-full-width">
<li><?php esc_html_e('Themes &amp; Plugins', 'wordfence'); ?></li>
<li class="wf-scan-results-stats-themesplugins"><?php echo $scanner->getSummaryItem(wfScanner::SUMMARY_SCANNED_PLUGINS, 0) + $scanner->getSummaryItem(wfScanner::SUMMARY_SCANNED_THEMES, 0); ?></li>
</ul>
</li>
<li>
<ul class="wf-flex-horizontal wf-flex-full-width">
<li><?php esc_html_e('Users Checked', 'wordfence'); ?></li>
<li class="wf-scan-results-stats-users"><?php echo $scanner->getSummaryItem(wfScanner::SUMMARY_SCANNED_USERS, 0); ?></li>
</ul>
</li>
<li>
<ul class="wf-flex-horizontal wf-flex-full-width">
<li><?php esc_html_e('URLs Checked', 'wordfence'); ?></li>
<li class="wf-scan-results-stats-urls"><?php echo $scanner->getSummaryItem(wfScanner::SUMMARY_SCANNED_URLS, 0); ?></li>
</ul>
</li>
<li>
<ul class="wf-flex-horizontal wf-flex-full-width">
<li><?php esc_html_e('Results Found', 'wordfence'); ?></li>
<li class="wf-scan-results-stats-issues"><?php echo $issues->getIssueCount(); ?></li>
</ul>
</li>
</ul>
</div>
</li>
<li class="wf-scan-results-issues wf-active" id="wf-scan-results-new" data-issue-type="new"></li>
<li class="wf-scan-results-issues" id="wf-scan-results-ignored" data-issue-type="ignored"></li>
</ul>
<script type="application/javascript">
(function($) {
WFAD.scanIssuesOffset = 0;
var issuesWrapper = $('.wf-scan-results');
var hasScrolled = false;
$(window).on('scroll', function() {
var win = $(this);
// console.log(win.scrollTop() + window.innerHeight, liveTrafficWrapper.outerHeight() + liveTrafficWrapper.offset().top);
var currentScrollBottom = win.scrollTop() + window.innerHeight;
var scrollThreshold = issuesWrapper.outerHeight() + issuesWrapper.offset().top;
if (hasScrolled && !WFAD.loadingIssues && currentScrollBottom >= scrollThreshold) {
// console.log('infinite scroll');
WFAD.loadingIssues = true;
hasScrolled = false;
WFAD.loadMoreIssues(function() {
WFAD.loadingIssues = false;
}, WFAD.scanIssuesOffset, null, WFAD.scanIssuesIgnoredOffset);
}
else if (currentScrollBottom < scrollThreshold) {
hasScrolled = true;
// console.log('no infinite scroll');
}
});
$(function() {
$('.wf-scan-tabs .wf-tab a').on('click', function(e) {
e.preventDefault();
e.stopPropagation();
$('.wf-scan-tabs').find('.wf-tab').removeClass('wf-active').find('a').attr('aria-selected', false);
$('.wf-scan-results-issues').removeClass('wf-active');
var tab = $(this).closest('.wf-tab');
tab.addClass('wf-active');
tab.find('a').attr('aria-selected', 'true');
var content = $('#wf-scan-results-' + tab.data('target'));
content.addClass('wf-active');
});
$('#wf-scan-bulk-buttons-delete').on('click', function(e) {
e.preventDefault();
e.stopPropagation();
var prompt = $('#wfTmpl_scannerDelete').tmpl();
var promptHTML = $("<div />").append(prompt).html();
WFAD.colorboxHTML((WFAD.isSmallScreen ? '300px' : '700px'), promptHTML, {overlayClose: false, closeButton: false, className: 'wf-modal', onComplete: function() {
$('#wf-scanner-prompt-cancel').on('click', function(e) {
e.preventDefault();
e.stopPropagation();
WFAD.colorboxClose();
});
$('#wf-scanner-prompt-confirm').on('click', function(e) {
e.preventDefault();
e.stopPropagation();
WFAD.bulkOperationConfirmed('del');
});
}});
});
$('#wf-scan-bulk-buttons-repair').on('click', function(e) {
e.preventDefault();
e.stopPropagation();
var prompt = $('#wfTmpl_scannerRepair').tmpl();
var promptHTML = $("<div />").append(prompt).html();
WFAD.colorboxHTML((WFAD.isSmallScreen ? '300px' : '700px'), promptHTML, {overlayClose: false, closeButton: false, className: 'wf-modal', onComplete: function() {
$('#wf-scanner-prompt-cancel').on('click', function(e) {
e.preventDefault();
e.stopPropagation();
WFAD.colorboxClose();
});
$('#wf-scanner-prompt-confirm').on('click', function(e) {
e.preventDefault();
e.stopPropagation();
WFAD.bulkOperationConfirmed('repair');
});
}});
});
});
})(jQuery);
</script>

View File

@@ -0,0 +1,339 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Displays the scan scheduling controls.
*/
?>
<li>
<?php
echo wfView::create('options/option-switch', array(
'optionName' => 'scheduledScansEnabled',
'value' => wfConfig::get('scheduledScansEnabled') ? '1': '0',
'title' => __('Schedule Wordfence Scans', 'wordfence'),
'states' => array(
array('value' => '0', 'label' => __('Disabled', 'wordfence')),
array('value' => '1', 'label' => __('Enabled', 'wordfence')),
),
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_SCHEDULING),
))->render();
?>
</li>
<li>
<ul class="wf-scan-scheduling" data-option="schedMode" data-original-value="<?php echo esc_attr($scanner->schedulingMode()); ?>">
<li>
<ul class="wf-option wf-option-scan-schedule-mode<?php if (!$scanner->isEnabled()) { echo ' wf-disabled'; } ?>" data-option-value="<?php echo esc_attr(wfScanner::SCAN_SCHEDULING_MODE_AUTOMATIC); ?>">
<li class="wf-option-radio-container" role="radiogroup">
<input class="wf-option-radio" type="radio" name="wf-scheduling-mode" id="wf-scheduling-mode-automatic" value="<?php echo esc_attr(wfScanner::SCAN_SCHEDULING_MODE_AUTOMATIC); ?>" <?php echo ($scanner->schedulingMode() == wfScanner::SCAN_SCHEDULING_MODE_AUTOMATIC ? ' checked' : ''); ?><?php if (!$scanner->isEnabled()) { echo ' disabled'; } ?> aria-labelledby="wf-scheduling-mode-automatic-label">
<label for="wf-scheduling-mode-automatic"></label>
</li>
<li id="wf-scheduling-mode-automatic-label" class="wf-option-title"><?php esc_html_e('Let Wordfence choose when to scan my site (recommended)', 'wordfence'); ?></li>
</ul>
</li>
<li>
<ul class="wf-option wf-option-scan-schedule-mode<?php if (!wfConfig::p()) { echo ' wf-option-premium'; } ?><?php if (!$scanner->isEnabled()) { echo ' wf-disabled'; } ?>" data-option-value="<?php echo esc_attr(wfScanner::SCAN_SCHEDULING_MODE_MANUAL); ?>" data-show=".wf-scan-scheduling-manual">
<li class="wf-option-radio-container">
<input class="wf-option-radio" type="radio" name="wf-scheduling-mode" id="wf-scheduling-mode-manual" value="<?php echo esc_attr(wfScanner::SCAN_SCHEDULING_MODE_MANUAL); ?>" <?php echo ($scanner->schedulingMode() == wfScanner::SCAN_SCHEDULING_MODE_MANUAL ? ' checked' : ''); ?><?php if (!wfConfig::p() || !$scanner->isEnabled()) { echo ' disabled'; } ?> aria-labelledby="wf-scheduling-mode-manual-label">
<label for="wf-scheduling-mode-manual"></label>
</li>
<li id="wf-scheduling-mode-manual-label" class="wf-option-title"><?php esc_html_e('Manually schedule scans', 'wordfence'); ?><?php if (!wfConfig::p()) { ?>&nbsp;&nbsp;<a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wf-premium-link"><?php esc_html_e('Premium Feature', 'wordfence'); ?><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a><?php } ?></li>
</ul>
<ul class="wf-scan-scheduling-manual<?php echo ($scanner->schedulingMode() == wfScanner::SCAN_SCHEDULING_MODE_MANUAL ? ' wf-active' : ''); ?>">
<li>
<strong class="wf-scan-scheduling-manual-presets-label">Shortcuts</strong>
<ul class="wf-scan-scheduling-manual-presets wf-overflow-x-auto-xs" data-option-name="manualScanType" data-original-value="<?php echo esc_attr(wfConfig::get('manualScanType')); ?>" role="radiogroup">
<li class="wf-nowrap <?php echo ($scanner->manualSchedulingType() == wfScanner::MANUAL_SCHEDULING_ONCE_DAILY ? 'wf-active' : ''); ?>" data-option-value="<?php echo esc_attr(wfScanner::MANUAL_SCHEDULING_ONCE_DAILY); ?>" data-show=".wf-scan-scheduling-manual-preset-options" data-hide=".wf-scan-scheduling-manual-custom-options" role="radio" aria-checked="<?php echo ($scanner->manualSchedulingType() == wfScanner::MANUAL_SCHEDULING_ONCE_DAILY ? 'true' : 'false'); ?>" tabindex="0"><?php esc_html_e('Once Daily', 'wordfence'); ?></li>
<li class="wf-nowrap <?php echo ($scanner->manualSchedulingType() == wfScanner::MANUAL_SCHEDULING_TWICE_DAILY ? 'wf-active' : ''); ?>" data-option-value="<?php echo esc_attr(wfScanner::MANUAL_SCHEDULING_TWICE_DAILY); ?>" data-show=".wf-scan-scheduling-manual-preset-options" data-hide=".wf-scan-scheduling-manual-custom-options" role="radio" aria-checked="<?php echo ($scanner->manualSchedulingType() == wfScanner::MANUAL_SCHEDULING_TWICE_DAILY ? 'true' : 'false'); ?>" tabindex="0"><?php esc_html_e('Twice Daily', 'wordfence'); ?></li>
<li class="wf-nowrap <?php echo ($scanner->manualSchedulingType() == wfScanner::MANUAL_SCHEDULING_EVERY_OTHER_DAY ? 'wf-active' : ''); ?>" data-option-value="<?php echo esc_attr(wfScanner::MANUAL_SCHEDULING_EVERY_OTHER_DAY); ?>" data-show=".wf-scan-scheduling-manual-preset-options" data-hide=".wf-scan-scheduling-manual-custom-options" role="radio" aria-checked="<?php echo ($scanner->manualSchedulingType() == wfScanner::MANUAL_SCHEDULING_EVERY_OTHER_DAY ? 'true' : 'false'); ?>" tabindex="0"><?php esc_html_e('Every Other Day', 'wordfence'); ?></li>
<li class="wf-nowrap <?php echo ($scanner->manualSchedulingType() == wfScanner::MANUAL_SCHEDULING_WEEKDAYS ? 'wf-active' : ''); ?>" data-option-value="<?php echo esc_attr(wfScanner::MANUAL_SCHEDULING_WEEKDAYS); ?>" data-show=".wf-scan-scheduling-manual-preset-options" data-hide=".wf-scan-scheduling-manual-custom-options" role="radio" aria-checked="<?php echo ($scanner->manualSchedulingType() == wfScanner::MANUAL_SCHEDULING_WEEKDAYS ? 'true' : 'false'); ?>" tabindex="0"><?php esc_html_e('Weekdays', 'wordfence'); ?></li>
<li class="wf-nowrap <?php echo ($scanner->manualSchedulingType() == wfScanner::MANUAL_SCHEDULING_WEEKENDS ? 'wf-active' : ''); ?>" data-option-value="<?php echo esc_attr(wfScanner::MANUAL_SCHEDULING_WEEKENDS); ?>" data-show=".wf-scan-scheduling-manual-preset-options" data-hide=".wf-scan-scheduling-manual-custom-options" role="radio" aria-checked="<?php echo ($scanner->manualSchedulingType() == wfScanner::MANUAL_SCHEDULING_WEEKENDS ? 'true' : 'false'); ?>" tabindex="0"><?php esc_html_e('Weekends', 'wordfence'); ?></li>
<li class="wf-nowrap <?php echo ($scanner->manualSchedulingType() == wfScanner::MANUAL_SCHEDULING_ODD_DAYS_WEEKENDS ? 'wf-active' : ''); ?>" data-option-value="<?php echo esc_attr(wfScanner::MANUAL_SCHEDULING_ODD_DAYS_WEEKENDS); ?>" data-show=".wf-scan-scheduling-manual-preset-options" data-hide=".wf-scan-scheduling-manual-custom-options" role="radio" aria-checked="<?php echo ($scanner->manualSchedulingType() == wfScanner::MANUAL_SCHEDULING_ODD_DAYS_WEEKENDS ? 'true' : 'false'); ?>" tabindex="0"><?php esc_html_e('Odd Days & Weekends', 'wordfence'); ?></li>
<li class="wf-nowrap <?php echo ($scanner->manualSchedulingType() == wfScanner::MANUAL_SCHEDULING_CUSTOM ? 'wf-active' : ''); ?>" data-option-value="<?php echo esc_attr(wfScanner::MANUAL_SCHEDULING_CUSTOM); ?>" data-show=".wf-scan-scheduling-manual-custom-options" data-hide=".wf-scan-scheduling-manual-preset-options" role="radio" aria-checked="<?php echo ($scanner->manualSchedulingType() == wfScanner::MANUAL_SCHEDULING_CUSTOM ? 'true' : 'false'); ?>" tabindex="0"><?php esc_html_e('Custom', 'wordfence'); ?></li>
</ul>
<script type="application/javascript">
(function($) {
$(function() {
$('.wf-option-scan-schedule-mode').each(function() {
$(this).find('.wf-option-radio').on('keydown', function(e) {
if (e.keyCode == 32) {
e.preventDefault();
e.stopPropagation();
$(this).trigger('click');
}
});
$(this).find('.wf-option-radio').on('click', function(e) {
var optionElement = $(this).closest('.wf-option');
if (optionElement.hasClass('wf-option-premium') || optionElement.hasClass('wf-disabled')) {
return;
}
var groupElement = $(this).closest('.wf-scan-scheduling');
var option = groupElement.data('option');
var value = false;
var isActive = $(this).is(':checked');
if (isActive) {
groupElement.find('.wf-option-scan-schedule-mode').each(function() {
var toHide = $(this).data('show');
if (toHide) {
$(toHide).removeClass('wf-active');
}
});
value = optionElement.data('optionValue');
var toShow = optionElement.data('show');
if (toShow) {
$(toShow).addClass('wf-active');
}
}
var originalValue = groupElement.data('originalValue');
if (originalValue == value) {
delete WFAD.pendingChanges[option];
}
else {
WFAD.pendingChanges[option] = value;
}
WFAD.updatePendingChanges();
});
});
$('.wf-scan-scheduling-manual-presets > li').each(function(index, element) {
$(element).on('keydown', function(e) {
if (e.keyCode == 32) {
e.preventDefault();
e.stopPropagation();
$(this).trigger('click');
}
});
$(element).on('click', function(e) {
e.preventDefault();
e.stopPropagation();
var control = $(this).closest('ul');
var optionName = control.data('optionName');
var originalValue = control.data('originalValue');
var value = $(this).data('optionValue');
control.find('li').each(function() {
$(this).toggleClass('wf-active', value == $(this).data('optionValue')).attr('aria-checked', value == $(this).data('optionValue') ? 'true' : 'false');
});
var toShow = $(this).data('show');
if (toShow) {
$(toShow).addClass('wf-active');
}
var toHide = $(this).data('hide');
if (toHide) {
$(toHide).removeClass('wf-active');
}
if (originalValue == value) {
delete WFAD.pendingChanges[optionName];
}
else {
WFAD.pendingChanges[optionName] = value;
}
WFAD.updatePendingChanges();
});
});
$('.wf-option[data-option-name="scheduledScansEnabled"]').on('change', function() {
var scheduledScansEnabled = !!$('.wf-option[data-option-name="scheduledScansEnabled"] .wf-switch li.wf-active').data('optionValue');
$('.wf-option-scan-schedule-mode').toggleClass('wf-disabled', !scheduledScansEnabled);
$('.wf-option-scan-schedule-mode .wf-option-radio').prop('disabled', !scheduledScansEnabled);
});
$(window).on('wfOptionsReset', function() {
$('.wf-option-scan-schedule-mode').each(function() {
var groupElement = $(this).closest('.wf-scan-scheduling');
var originalValue = groupElement.data('originalValue');
var option = groupElement.data('option');
var value = $(this).data('optionValue');
$(this).find('.wf-option-radio').prop('checked', value == originalValue);
var toHideShow = $(this).data('show');
if (toHideShow) {
$(toHideShow).toggleClass('wf-active', value == originalValue);
}
});
$('.wf-scan-scheduling-manual-presets').each(function() {
var originalValue = $(this).data('originalValue');
$(this).find('li').each(function() {
$(this).toggleClass('wf-active', originalValue == $(this).data('optionValue')).attr('aria-checked', originalValue == $(this).data('optionValue') ? 'true' : 'false');
if (originalValue == $(this).data('optionValue')) {
var toShow = $(this).data('show');
if (toShow) {
$(toShow).addClass('wf-active');
}
var toHide = $(this).data('hide');
if (toHide) {
$(toHide).removeClass('wf-active');
}
}
});
});
});
});
})(jQuery);
</script>
</li>
<li class="wf-scan-scheduling-manual-preset-options<?php echo ($scanner->manualSchedulingType() != wfScanner::MANUAL_SCHEDULING_CUSTOM ? ' wf-active' : ''); ?>">
<ul class="wf-option wf-option-select" data-select-option="schedStartHour" data-original-select-value="<?php echo esc_attr($scanner->manualSchedulingStartHour()); ?>">
<li class="wf-option-title"><span class="wf-hidden-xs"><?php esc_html_e('Use preferred start time', 'wordfence'); ?></span><span class="wf-visible-xs"><?php esc_html_e('Start time', 'wordfence'); ?></span></li>
<li class="wf-option-select">
<select<?php echo (!(!wfConfig::p() && isset($premium) && $premium) ? '' : ' disabled'); ?> data-preferred-width="100px">
<?php
$selectOptions = array();
for ($i = 1; $i <= 24; $i++) {
$label = $i . ':00 ';
if ($i > 12) {
$label = ($i - 12) . ':00 ';
}
if ($i < 12 || $i > 23) {
$label .= __('AM', 'wordfence');
}
else {
$label .= __('PM', 'wordfence');
}
$selectOptions[] = array('label' => $label, 'value' => $i);
}
foreach ($selectOptions as $o):
?>
<option class="wf-option-select-option" value="<?php echo esc_attr($o['value']); ?>"<?php if ($o['value'] == $scanner->manualSchedulingStartHour()) { echo ' selected'; } ?>><?php echo esc_html($o['label']); ?></option>
<?php endforeach; ?>
</select>
</li>
</ul>
</li>
<li class="wf-scan-scheduling-manual-custom-options wf-overflow-x-auto-xs<?php echo ($scanner->manualSchedulingType() == wfScanner::MANUAL_SCHEDULING_CUSTOM ? ' wf-active' : ''); ?>">
<table class="wf-scan-schedule" data-original-value="<?php echo esc_attr(@json_encode($scanner->customSchedule(), JSON_FORCE_OBJECT)); ?>">
<?php
$daysOfWeek = array(
array(1, __('Monday', 'wordfence')),
array(2, __('Tuesday', 'wordfence')),
array(3, __('Wednesday', 'wordfence')),
array(4, __('Thursday', 'wordfence')),
array(5, __('Friday', 'wordfence')),
array(6, __('Saturday', 'wordfence')),
array(0, __('Sunday', 'wordfence')),
);
$sched = $scanner->customSchedule();
foreach ($daysOfWeek as $d) :
list($dayNumber, $dayName) = $d;
?>
<tr class="wf-visible-xs">
<th><?php echo esc_html($dayName); ?></th>
</tr>
<tr class="wf-schedule-day" data-day="<?php echo $dayNumber; ?>">
<th class="wf-hidden-xs"><?php echo $dayName; ?></th>
<td>
<div class="wf-schedule-times-wrapper">
<div class="wf-schedule-period"><?php esc_html_e('AM', 'wordfence'); ?></div>
<ul class="wf-schedule-times">
<?php
for ($h = 0; $h < 12; $h++) {
$active = (isset($sched[$dayNumber]) && $sched[$dayNumber][$h] ? ' wf-active' : '');
echo '<li class="wf-schedule-time' . $active . '" data-hour="' . $h . '" role="checkbox" aria-checked="' . (empty($active) ? 'false' : 'true') . '" tabindex="0">' . str_pad($h, 2, '0', STR_PAD_LEFT) . '</li>';
}
?>
</ul>
</div>
<div class="wf-schedule-times-wrapper">
<div class="wf-schedule-period"><?php esc_html_e('PM', 'wordfence'); ?></div>
<ul class="wf-schedule-times">
<?php
for ($i = 0; $i < 12; $i++) {
$h = $i;
if ($h == 0) { $h = 12; }
$active = (isset($sched[$dayNumber]) && $sched[$dayNumber][$i + 12] ? ' wf-active' : '');
echo '<li class="wf-schedule-time' . $active . '" data-hour="' . ($i + 12) . '" role="checkbox" aria-checked="' . (empty($active) ? 'false' : 'true') . '" tabindex="0">' . str_pad($h, 2, '0', STR_PAD_LEFT) . '</li>';
}
?>
</ul>
</div>
</td>
</tr>
<?php endforeach; ?>
</table>
<script type="application/javascript">
(function($) {
$(function() {
$('.wf-schedule-time').on('keydown', function(e) {
if (e.keyCode == 32) {
e.preventDefault();
e.stopPropagation();
$(this).trigger('click');
}
});
$('.wf-schedule-time').on('click', function(e) {
e.preventDefault();
e.stopPropagation();
var isActive = $(this).hasClass('wf-active');
$(this).toggleClass('wf-active', !isActive).attr('aria-checked', !isActive ? 'true' : 'false');
var originalValue = $('.wf-scan-schedule').data('originalValue');
var customSchedule = WFAD.pendingChanges['scanSched'];
if (!customSchedule) {
customSchedule = JSON.parse(JSON.stringify(originalValue));
}
var day = $(this).closest('.wf-schedule-day').data('day');
var hour = $(this).data('hour');
customSchedule[day][hour] = isActive ? 0 : 1;
var isOriginal = true;
var dayKeys = Object.keys(originalValue);
scheduleEqualityCheck:
for (var i = 0; i < dayKeys.length; i++) {
var d = dayKeys[i];
var originalDay = originalValue[d];
var currentDay = customSchedule[d];
var hourKeys = Object.keys(originalDay);
for (var n = 0; n < hourKeys.length; n++) {
var h = hourKeys[n];
if (originalDay[h] != currentDay[h]) {
isOriginal = false;
break scheduleEqualityCheck;
}
}
}
if (isOriginal) {
delete WFAD.pendingChanges['scanSched'];
}
else {
WFAD.pendingChanges['scanSched'] = customSchedule;
}
WFAD.updatePendingChanges();
});
$(window).on('wfOptionsReset', function() {
var originalValue = $('.wf-scan-schedule').data('originalValue');
$('.wf-schedule-time').each(function() {
var day = $(this).closest('.wf-schedule-day').data('day');
var hour = $(this).data('hour');
$(this).toggleClass('wf-active', !!originalValue[day][hour]).attr('aria-checked', !!originalValue[day][hour] ? 'true' : 'false');
});
});
});
})(jQuery);
</script>
</li>
</ul>
</li>
</ul>
</li>

View File

@@ -0,0 +1,46 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents a block list element specifically for the start scan button.
*
* Expects $running.
*
* @var bool $running Whether or not the scan is currently running.
*/
?>
<div id="wf-scan-starter" class="wf-block-navigation-option">
<div class="wf-block-navigation-option-content">
<a href="#" class="wf-btn wf-btn-primary wf-btn-callout-subtle wf-scan-starter-idle" style="<?php if ($running) { echo 'display: none;'; } ?>" role="button"><?php esc_html_e('Start New Scan', 'wordfence'); ?></a>
<a href="#" class="wf-btn wf-btn-primary wf-btn-callout-subtle wf-scan-starter-running" style="<?php if (!$running) { echo 'display: none;'; } ?>;" role="button"><?php esc_html_e('Stop Scan', 'wordfence'); ?></a>
</div>
</div>
<script type="application/javascript">
(function($) {
$('#wf-scan-starter a').on('click', function(e) {
e.preventDefault();
e.stopPropagation();
if ($(this).hasClass('wf-scan-starter-idle')) {
WFAD.startScan();
$('#wf-scan-running-bar').show();
}
else {
WFAD.killScan(function(success) {
WFAD.colorboxModal((WFAD.isSmallScreen ? '300px' : '400px'), success ? '<?php esc_attr_e('Scan Stopping', 'wordfence'); ?>' : '<?php esc_attr_e('Stop Failed', 'wordfence'); ?>', success ? '<?php esc_attr_e('A termination request has been sent to stop any running scans.', 'wordfence'); ?>' : '<?php esc_attr_e('We failed to send a termination request.', 'wordfence'); ?>');
});
$('#wf-scan-running-bar').hide();
}
});
$(window).on('wfScanUpdateButtons', function() {
if (WFAD.scanRunning) {
$('.wf-scan-starter-idle').hide();
$('.wf-scan-starter-running').show();
}
else {
$('.wf-scan-starter-idle').show().toggleClass('wf-disabled', WFAD.scanStalled);
$('.wf-scan-starter-running').hide();
}
})
})(jQuery);
</script>

View File

@@ -0,0 +1,172 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Displays the scan type selector and automatic scan toggle.
*/
function _wfAllowOnlyBoolean($value) {
return ($value === false || $value === true);
}
$limitedOptions = array_filter(wfScanner::limitedScanTypeOptions(), '_wfAllowOnlyBoolean');
$standardOptions = array_filter(wfScanner::standardScanTypeOptions(), '_wfAllowOnlyBoolean');
$highSensitivityOptions = array_filter(wfScanner::highSensitivityScanTypeOptions(), '_wfAllowOnlyBoolean');
?>
<ul id="wf-option-scanType" class="wf-scan-type-controls">
<li class="wf-scan-type-selector wf-overflow-x-auto-xs">
<ul class="wf-scan-type" data-option-name="scanType" data-original-value="<?php echo esc_attr($scanner->scanType()); ?>" role="radiogroup">
<li>
<ul class="wf-scan-type-option<?php if ($scanner->scanType() == wfScanner::SCAN_TYPE_LIMITED) { echo ' wf-active'; } ?>" data-option-value="<?php echo esc_attr(wfScanner::SCAN_TYPE_LIMITED); ?>" data-selected-options="<?php echo esc_attr(json_encode($limitedOptions)); ?>">
<li class="wf-scan-type-option-name"><div class="wf-option-checkbox" role="radio" aria-checked="<?php echo ($scanner->scanType() == wfScanner::SCAN_TYPE_LIMITED ? 'true' : 'false'); ?>" tabindex="0"><i class="wf-ion-ios-checkmark-empty" aria-hidden="true"></i></div><span><?php esc_html_e('Limited Scan', 'wordfence'); ?></span></li>
<li class="wf-scan-type-option-description"><?php esc_html_e('For entry-level hosting plans. Provides limited detection capability with very low resource utilization.', 'wordfence'); ?></li>
</ul>
</li>
<li>
<ul class="wf-scan-type-option<?php if ($scanner->scanType() == wfScanner::SCAN_TYPE_STANDARD) { echo ' wf-active'; } ?>" data-option-value="<?php echo esc_attr(wfScanner::SCAN_TYPE_STANDARD); ?>" data-selected-options="<?php echo esc_attr(json_encode($standardOptions)); ?>">
<li class="wf-scan-type-option-name"><div class="wf-option-checkbox" role="radio" aria-checked="<?php echo ($scanner->scanType() == wfScanner::SCAN_TYPE_STANDARD ? 'true' : 'false'); ?>" tabindex="0"><i class="wf-ion-ios-checkmark-empty" aria-hidden="true"></i></div><span><?php esc_html_e('Standard Scan', 'wordfence'); ?></span></li>
<li class="wf-scan-type-option-description"><?php esc_html_e('Our recommendation for all websites. Provides the best detection capability in the industry.', 'wordfence'); ?></li>
</ul>
</li>
<li>
<ul class="wf-scan-type-option<?php if ($scanner->scanType() == wfScanner::SCAN_TYPE_HIGH_SENSITIVITY) { echo ' wf-active'; } ?>" data-option-value="<?php echo esc_attr(wfScanner::SCAN_TYPE_HIGH_SENSITIVITY); ?>" data-selected-options="<?php echo esc_attr(json_encode($highSensitivityOptions)); ?>">
<li class="wf-scan-type-option-name"><div class="wf-option-checkbox" role="radio" aria-checked="<?php echo ($scanner->scanType() == wfScanner::SCAN_TYPE_HIGH_SENSITIVITY? 'true' : 'false'); ?>" tabindex="0"><i class="wf-ion-ios-checkmark-empty" aria-hidden="true"></i></div><span><?php esc_html_e('High Sensitivity', 'wordfence'); ?></span></li>
<li class="wf-scan-type-option-description"><?php esc_html_e('For site owners who think they may have been hacked. More thorough but may produce false positives.', 'wordfence'); ?></li>
</ul>
</li>
<li>
<ul class="wf-scan-type-option wf-scan-type-option-custom<?php if ($scanner->scanType() == wfScanner::SCAN_TYPE_CUSTOM) { echo ' wf-active'; } ?>" data-option-value="<?php echo esc_attr(wfScanner::SCAN_TYPE_CUSTOM); ?>">
<li class="wf-scan-type-option-name"><span><?php esc_html_e('Custom Scan', 'wordfence'); ?></span></li>
<li class="wf-scan-type-option-description"><?php esc_html_e('Selected automatically when General Options have been customized for this website.', 'wordfence'); ?></li>
</ul>
</li>
</ul>
<script type="application/javascript">
(function($) {
$(function() {
//Set initial state
var currentScanType = $('.wf-scan-type-option.wf-active');
if (!currentScanType.hasClass('wf-scan-type-option-custom')) {
var selectedOptions = currentScanType.data('selectedOptions');
var keys = Object.keys(selectedOptions);
for (var i = 0; i < keys.length; i++) {
$('.wf-option.wf-option-toggled[data-option="' + keys[i] + '"]').find('.wf-option-checkbox').toggleClass('wf-checked', selectedOptions[keys[i]]); //Currently all checkboxes
}
}
$('.wf-scan-type-option').each(function(index, element) {
$(element).on('keydown', function(e) {
if (e.keyCode == 32) {
e.preventDefault();
e.stopPropagation();
$(this).trigger('click');
}
});
$(element).on('click', function(e) {
if ($(element).hasClass('wf-scan-type-option-custom')) {
return;
}
e.preventDefault();
e.stopPropagation();
var control = $(this).closest('.wf-scan-type');
var optionName = control.data('optionName');
var originalValue = control.data('originalValue');
var value = $(this).data('optionValue');
control.find('.wf-scan-type-option').each(function() {
$(this).toggleClass('wf-active', value == $(this).data('optionValue')).find('.wf-option-checkbox').attr('aria-checked', value == $(this).data('optionValue') ? 'true' : 'false');
});
if (originalValue == value) {
delete WFAD.pendingChanges[optionName];
}
else {
WFAD.pendingChanges[optionName] = value;
}
var selectedOptions = $(this).data('selectedOptions');
var keys = Object.keys(selectedOptions);
for (var i = 0; i < keys.length; i++) {
var el = $('.wf-option.wf-option-toggled[data-option="' + keys[i] + '"]');
el.find('.wf-option-checkbox').toggleClass('wf-checked', selectedOptions[keys[i]]).attr('aria-checked', selectedOptions[keys[i]] ? 'true' : 'false'); //Currently all checkboxes
originalValue = el.attr('data-original-value');
if (originalValue !== undefined &&
typeof selectedOptions[keys[i]] === 'boolean' &&
originalValue != selectedOptions[keys[i]]
) {
WFAD.pendingChanges[keys[i]] = selectedOptions[keys[i]];
}
}
WFAD.updatePendingChanges();
});
});
$(window).on('wfOptionsReset', function() {
$('.wf-scan-type').each(function() {
var originalValue = $(this).data('originalValue');
$(this).find('.wf-scan-type-option').each(function() {
var isSelected = (originalValue == $(this).data('optionValue'));
$(this).toggleClass('wf-active', isSelected).find('.wf-option-checkbox').attr('aria-checked', isSelected ? 'true' : 'false');
if (!$(this).hasClass('wf-scan-type-option-custom') && isSelected) {
var selectedOptions = $(this).data('selectedOptions');
var keys = Object.keys(selectedOptions);
for (var i = 0; i < keys.length; i++) {
$('.wf-option.wf-option-toggled[data-option="' + keys[i] + '"]').find('.wf-option-checkbox').toggleClass('wf-checked', selectedOptions[keys[i]]).attr('aria-checked', selectedOptions[keys[i]] ? 'true' : 'false'); //Currently all checkboxes
}
}
});
});
});
//Hook up change events on individual checkboxes
var availableOptions = <?php echo json_encode(array_keys($highSensitivityOptions)); ?>;
for (var i = 0; i < availableOptions.length; i++) {
$('.wf-option.wf-option-toggled[data-option="' + availableOptions[i] + '"]').on('change', function(e, isReset) { //Currently all checkboxes
if (isReset) {
return;
}
var currentScanType = $('.wf-scan-type-option.wf-active');
if (!currentScanType.hasClass('wf-scan-type-option-custom')) {
currentScanType.removeClass('wf-active').find('.wf-option-checkbox').attr('aria-checked', 'false');
$('.wf-scan-type-option.wf-scan-type-option-custom').addClass('wf-active');
if ($('.wf-scan-type').data('originalValue') == '<?php echo esc_attr(wfScanner::SCAN_TYPE_CUSTOM); ?>') {
delete WFAD.pendingChanges['scanType'];
}
else {
WFAD.pendingChanges['scanType'] = '<?php echo esc_attr(wfScanner::SCAN_TYPE_CUSTOM); ?>';
}
var selectedOptions = currentScanType.data('selectedOptions');
var keys = Object.keys(selectedOptions);
for (var i = 0; i < keys.length; i++) {
if (keys[i] == $(this).data('option')) {
continue;
}
var option = $('.wf-option.wf-option-toggled[data-option="' + keys[i] + '"]');
option.find('.wf-option-checkbox').toggleClass('wf-checked', selectedOptions[keys[i]]).attr('aria-checked', selectedOptions[keys[i]] ? 'true' : 'false'); //Currently all checkboxes
var value = (selectedOptions[keys[i]] ? option.data('enabledValue') : option.data('disabledValue'));
var originalValue = option.data('originalValue');
if (originalValue == value) {
delete WFAD.pendingChanges[keys[i]];
}
else {
WFAD.pendingChanges[keys[i]] = value;
}
}
WFAD.updatePendingChanges();
}
});
}
});
})(jQuery);
</script>
</li>
</ul>

View File

@@ -0,0 +1,77 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents the scanner status.
*
* Expects $scanner to be defined.
*
* @var wfScanner $scanner The scanner state.
* @var wfDashboard $dashboard Dashboard statistics.
*/
?>
<ul class="wf-block-list wf-block-list-horizontal">
<?php if ($scanner->isEnabled() == 'enabled' && $scanner->signatureMode() == wfScanner::SIGNATURE_MODE_PREMIUM): ?>
<li>
<div class="wf-block-labeled-value wf-scan-status wf-scan-status-full-enabled">
<div class="wf-block-labeled-value-label"><?php
switch (wfLicense::current()->getType()) {
case wfLicense::TYPE_RESPONSE:
esc_html_e('Wordfence Scan &amp; Response License Enabled', 'wordfence');
break;
case wfLicense::TYPE_CARE:
esc_html_e('Wordfence Scan &amp; Care License Enabled', 'wordfence');
break;
default:
esc_html_e('Wordfence Scan &amp; Premium Enabled', 'wordfence');
break;
}
?></div>
</div>
</li>
<?php else: ?>
<li>
<?php if (!$scanner->isEnabled()): ?>
<div class="wf-scan-status-disabled">
<p><h3><?php esc_html_e('Wordfence Scan Deactivated', 'wordfence'); ?></h3></p>
<p><?php esc_html_e('A Wordfence scan examines all files, posts, pages, and comments on your WordPress website looking for malware, known malicious URLs, and known patterns of infections. It also does several other reputation and server checks.', 'wordfence'); ?></p>
<p>
<a class="wf-btn wf-btn-primary wf-btn-callout-subtle" href="#" target="_blank" rel="noopener noreferrer" id="wf-scan-top-enable-scans" role="button"><?php esc_html_e('Enable Automatic Scans', 'wordfence'); ?><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a>
<script type="application/javascript">
(function($) {
$(function() {
$('#wf-scan-top-enable-scans').on('click', function(e) {
e.preventDefault();
e.stopPropagation();
WFAD.setOption('scheduledScansEnabled', 1, function() {
window.location.reload(true);
});
});
});
})(jQuery);
</script>
</p>
</div>
<?php else: ?>
<div class="wf-block-labeled-value wf-scan-status wf-scan-status-enabled">
<div class="wf-block-labeled-value-value"><i class="wf-fa wf-fa-check" aria-hidden="true"></i></div>
<div class="wf-block-labeled-value-label"><?php esc_html_e('Wordfence Scan Enabled', 'wordfence'); ?></div>
</div>
<?php endif; ?>
</li>
<li>
<?php if ($scanner->signatureMode() == wfScanner::SIGNATURE_MODE_COMMUNITY): ?>
<div>
<p><h3><?php esc_html_e('Premium Protection Disabled', 'wordfence'); ?></h3></p>
<p><?php esc_html_e('As a free Wordfence user, you are currently using the Community version of the Threat Defense Feed. Premium users are protected by additional firewall rules and malware signatures as well as the Wordfence real-time IP blocklist. Upgrade to Premium today to improve your protection.', 'wordfence'); ?></p>
<p><a class="wf-btn wf-btn-primary wf-btn-callout-subtle" href="https://www.wordfence.com/gnl1scanUpgrade/wordfence-signup/#premium-order-form" target="_blank" rel="noopener noreferrer"><?php esc_html_e('Upgrade to Premium', 'wordfence'); ?></a>&nbsp;&nbsp;<a class="wf-btn wf-btn-callout-subtle wf-btn-default" href="https://www.wordfence.com/gnl1scanLearn/wordfence-signup/" target="_blank" rel="noopener noreferrer"><?php esc_html_e('Learn More', 'wordfence'); ?><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a></p>
</div>
<?php else: ?>
<div class="wf-block-labeled-value wf-protection-status wf-protection-status-<?php echo esc_attr($scanner->signatureMode()); ?>">
<div class="wf-block-labeled-value-value"><i class="wf-fa wf-fa-check" aria-hidden="true"></i></div>
<div class="wf-block-labeled-value-label"><?php esc_html_e('Premium Protection Enabled', 'wordfence'); ?></div>
</div>
<?php endif; ?>
</li>
<?php endif; ?>
</ul>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,28 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Displays the Site Cleaning lower prompt.
*/
?>
<div id="wf-site-cleaning-bottom" class="wf-block wf-add-top-small wf-active">
<div class="wf-block-content">
<ul class="wf-block-list">
<li>
<div class="wf-flex-vertical">
<h3 class="wf-center"><?php esc_html_e('Need help from the WordPress security experts?', 'wordfence'); ?></h3>
<?php if (wfLicense::current()->isBelowCare()): ?>
<p class="wf-center wf-no-top"><?php esc_html_e('Sign up for Wordfence Care today and get expert help with any security issue. Wordfence Care is for business owners who put a premium on their time. With Wordfence Care, we take care of it, so that you can focus on your customers. Check out Wordfence Response for mission-critical WordPress websites.', 'wordfence'); ?></p>
<?php endif ?>
<p class="wf-center wf-add-bottom">
<?php if (wfLicense::current()->isBelowCare()): ?>
<a class="wf-btn wf-btn-primary wf-btn-callout-subtle" href="https://www.wordfence.com/gnl1scanLowerAd/products/wordfence-care/" target="_blank" rel="noopener noreferrer"><?php esc_html_e('Learn More About Wordfence Care', 'wordfence'); ?><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a>
<a class="wf-btn wf-btn-primary wf-btn-callout-subtle" href="https://www.wordfence.com/gnl1scanLowerAd/products/wordfence-response/" target="_blank" rel="noopener noreferrer"><?php esc_html_e('Learn More About Wordfence Response', 'wordfence'); ?><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a>
<?php else: ?>
<a class="wf-btn wf-btn-primary wf-btn-callout-subtle" href="<?php echo esc_attr(wfLicense::current()->getSupportUrl('scanLowerAd')) ?>" target="_blank" rel="noopener noreferrer"><?php esc_html_e('Get Help', 'wordfence'); ?><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a>
<?php endif ?>
</p>
</div>
</li>
</ul>
</div>
</div>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long