當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ITSEC_Modules::get_available_modules方法代碼示例

本文整理匯總了PHP中ITSEC_Modules::get_available_modules方法的典型用法代碼示例。如果您正苦於以下問題:PHP ITSEC_Modules::get_available_modules方法的具體用法?PHP ITSEC_Modules::get_available_modules怎麽用?PHP ITSEC_Modules::get_available_modules使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ITSEC_Modules的用法示例。


在下文中一共展示了ITSEC_Modules::get_available_modules方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: render_settings

    protected function render_settings($form)
    {
        $available_modules = ITSEC_Modules::get_available_modules();
        $modules_to_activate = array('ban-users' => __('Banned Users', 'better-wp-security'), 'backup' => __('Database Backups', 'better-wp-security'), 'brute-force' => __('Local Brute Force Protection', 'better-wp-security'), 'malware-scheduling' => __('Malware Scan Scheduling', 'better-wp-security'), 'network-brute-force' => __('Network Brute Force Protection', 'better-wp-security'), 'strong-passwords' => __('Strong Passwords', 'better-wp-security'), 'two-factor' => __('Two-Factor Authentication', 'better-wp-security'), 'user-logging' => __('User Logging', 'better-wp-security'), 'wordpress-tweaks' => __('WordPress Tweaks', 'better-wp-security'));
        foreach ($modules_to_activate as $module => $val) {
            if (!in_array($module, $available_modules)) {
                unset($modules_to_activate[$module]);
            }
        }
        ?>
	<div id="itsec-security-check-details-container">
		<p><?php 
        _e('Some features and settings are recommended for every site to run. This tool will ensure that your site is using these recommendations.', 'better-wp-security');
        ?>
</p>
		<p><?php 
        _e('When the button below is clicked the following modules will be enabled and configured:', 'better-wp-security');
        ?>
</p>
		<ul class="itsec-security-check-list">
			<?php 
        foreach ($modules_to_activate as $name) {
            ?>
				<li><p><?php 
            echo $name;
            ?>
</p></li>
			<?php 
        }
        ?>
		</ul>
	</div>

	<p><?php 
        $form->add_button('secure_site', array('value' => 'Secure Site', 'class' => 'button-primary'));
        ?>
</p>
<?php 
    }
開發者ID:Garth619,項目名稱:Femi9,代碼行數:39,代碼來源:settings-page.php

示例2: run

 public static function run()
 {
     self::$available_modules = ITSEC_Modules::get_available_modules();
     self::enforce_activation('ban-users', __('Banned Users', 'better-wp-security'));
     self::enforce_setting('ban-users', 'enable_ban_lists', true, __('Enabled the Enable Ban Lists setting in Banned Users.', 'better-wp-security'));
     self::enforce_activation('backup', __('Database Backups', 'better-wp-security'));
     self::enforce_activation('brute-force', __('Local Brute Force Protection', 'better-wp-security'));
     self::enforce_activation('malware-scheduling', __('Malware Scan Scheduling', 'better-wp-security'));
     self::enforce_setting('malware-scheduling', 'email_notifications', true, __('Enabled the Email Notifications setting in Malware Scan Scheduling.', 'better-wp-security'));
     self::add_network_brute_force_signup();
     self::enforce_activation('strong-passwords', __('Strong Password Enforcement', 'better-wp-security'));
     self::enforce_activation('two-factor', __('Two-Factor Authentication', 'better-wp-security'));
     self::enable_all_two_factor_providers();
     self::enforce_activation('user-logging', __('User Logging', 'better-wp-security'));
     self::enforce_activation('wordpress-tweaks', __('WordPress Tweaks', 'better-wp-security'));
     self::enforce_setting('wordpress-tweaks', 'file_editor', true, __('Disabled the File Editor in WordPress Tweaks.', 'better-wp-security'));
     self::enforce_setting('wordpress-tweaks', 'allow_xmlrpc_multiauth', false, __('Changed the Multiple Authentication Attempts per XML-RPC Request setting in WordPress Tweaks to "Block".', 'better-wp-security'));
     self::enforce_setting('global', 'write_files', true, __('Enabled the Write to Files setting in Global Settings.', 'better-wp-security'));
     ob_start();
     echo implode("\n", self::$calls_to_action);
     echo implode("\n", self::$actions_taken);
     echo implode("\n", self::$confirmations);
     ITSEC_Response::set_response(ob_get_clean());
 }
開發者ID:Garth619,項目名稱:Femi9,代碼行數:24,代碼來源:scanner.php


注:本文中的ITSEC_Modules::get_available_modules方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。