本文整理汇总了PHP中wordfence::requestFilesystemCredentials方法的典型用法代码示例。如果您正苦于以下问题:PHP wordfence::requestFilesystemCredentials方法的具体用法?PHP wordfence::requestFilesystemCredentials怎么用?PHP wordfence::requestFilesystemCredentials使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wordfence
的用法示例。
在下文中一共展示了wordfence::requestFilesystemCredentials方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: filter_input
<?php
$sigUpdateTime = wfConfig::get('signatureUpdateTime');
?>
<div class="wordfenceModeElem" id="wordfenceMode_scan"></div>
<div class="wrap wordfence">
<?php
$nonce = filter_input(INPUT_GET, 'nonce', FILTER_SANITIZE_STRING);
if (!empty($promptForCredentials) && !empty($wpFilesystemActionCallback) && is_callable($wpFilesystemActionCallback)) {
if (wp_verify_nonce($nonce, 'wp-ajax')) {
$relaxedOwnership = true;
$homePath = get_home_path();
if (!wordfence::requestFilesystemCredentials($filesystemCredentialsAdminURL, $homePath, $relaxedOwnership, true)) {
echo '</div>';
return;
}
call_user_func_array($wpFilesystemActionCallback, !empty($wpFilesystemActionCallbackArgs) && is_array($wpFilesystemActionCallbackArgs) ? $wpFilesystemActionCallbackArgs : array());
} else {
printf("Security token has expired. Click <a href='%s'>here</a> to return to the scan page.", esc_url(network_admin_url('admin.php?page=Wordfence')));
}
?>
<?php
} else {
?>
<?php
require 'menuHeader.php';
?>
<?php