本文整理匯總了PHP中ITSEC_Core::get_security_check_page_url方法的典型用法代碼示例。如果您正苦於以下問題:PHP ITSEC_Core::get_security_check_page_url方法的具體用法?PHP ITSEC_Core::get_security_check_page_url怎麽用?PHP ITSEC_Core::get_security_check_page_url使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ITSEC_Core
的用法示例。
在下文中一共展示了ITSEC_Core::get_security_check_page_url方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: wp_redirect
<?php
wp_redirect(ITSEC_Core::get_security_check_page_url());
exit;
示例2: send_daily_digest
/**
* Send the daily digest email.
*
* @since 2.6.0
*
* @return
*/
public function send_daily_digest()
{
global $itsec_lockout;
$send_email = false;
require_once ITSEC_Core::get_core_dir() . 'lib/class-itsec-mailer.php';
$mail = new ITSEC_Mail();
$mail->add_header(esc_html__('Daily Security Digest', 'better-wp-security'), sprintf(wp_kses(__('Your Daily Security Digest for <b>%s</b>', 'better-wp-security'), array('b' => array())), date_i18n(get_option('date_format'))));
$mail->add_info_box(sprintf(wp_kses(__('The following is a summary of security related activity on your site: <b>%s</b>', 'better-wp-security'), array('b' => array())), get_option('siteurl')));
$mail->add_section_heading(esc_html__('Lockouts', 'better-wp-security'), 'lock');
$user_count = sizeof($itsec_lockout->get_lockouts('user', true));
$host_count = sizeof($itsec_lockout->get_lockouts('host', true));
if ($host_count > 0 || $user_count > 0) {
$mail->add_lockouts_summary($user_count, $host_count);
$send_email = true;
} else {
$mail->add_text(esc_html__('No lockouts since the last email check.', 'better-wp-security'));
}
if (is_array($this->queue) && !empty($this->queue['messages']) && is_array($this->queue['messages'])) {
if (in_array('file-change', $this->queue['messages'])) {
$mail->add_section_heading(esc_html__('File Changes', 'better-wp-security'), 'folder');
$mail->add_text(esc_html__('File changes detected on the site.', 'better-wp-security'));
$send_email = true;
}
$messages = array();
foreach ($this->queue['messages'] as $message) {
if ('file-change' === $message) {
continue;
}
$messages[] = $message;
}
if (!empty($messages)) {
$mail->add_section_heading(esc_html__('Messages', 'better-wp-security'), 'message');
foreach ($messages as $message) {
$mail->add_text($message);
}
$send_email = true;
}
}
if (!$send_email) {
return;
}
$mail->add_details_box(sprintf(wp_kses(__('For more details, <a href="%s"><b>visit your security logs</b></a>', 'better-wp-security'), array('a' => array('href' => array()), 'b' => array())), ITSEC_Core::get_logs_page_url()));
$mail->add_divider();
$mail->add_large_text(esc_html__('Is your site as secure as it could be?', 'better-wp-security'));
$mail->add_text(esc_html__('Ensure your site is using recommended settings and features with a security check.', 'better-wp-security'));
$mail->add_button(esc_html__('Run a Security Check ✓', 'better-wp-security'), ITSEC_Core::get_security_check_page_url());
if (defined('ITSEC_DEBUG') && true === ITSEC_DEBUG) {
$mail->add_text(sprintf(esc_html__('Debug info (source page): %s', 'better-wp-security'), esc_url($_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"])));
}
$mail->add_footer();
$raw_recipients = ITSEC_Modules::get_setting('global', 'notification_email');
$recipients = array();
foreach ($raw_recipients as $recipient) {
$recipient = trim($recipient);
if (is_email($recipient)) {
$recipients[] = $recipient;
}
}
$this->queue = array('last_sent' => ITSEC_Core::get_current_time_gmt(), 'messages' => array());
update_site_option('itsec_message_queue', $this->queue);
$subject = sprintf(esc_html__('[%s] Daily Security Digest', 'better-wp-security'), esc_url(get_option('siteurl')));
return $mail->send($recipients, $subject);
}