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


PHP ITSEC_Lib::get_ssl方法代碼示例

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


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

示例1: plugin_init

 /**
  * Calls lib function to determine whether ssl is available.
  *
  * @since 4.0
  *
  * @return void
  */
 public function plugin_init()
 {
     if (isset(get_current_screen()->id) && strpos(get_current_screen()->id, 'security_page_toplevel_page_itsec_settings') !== false) {
         $this->has_ssl = ITSEC_Lib::get_ssl();
     }
 }
開發者ID:Telemedellin,項目名稱:feriadelasfloresmedellin,代碼行數:13,代碼來源:class-itsec-ssl-admin.php

示例2: render_settings

    protected function render_settings($form)
    {
        $has_ssl = ITSEC_Lib::get_ssl();
        $frontend_modes = array(0 => __('Off', 'better-wp-security'), 1 => __('Per Content', 'better-wp-security'), 2 => __('Whole Site', 'better-wp-security'));
        ?>
	<p><?php 
        _e('Note: While this plugin does give you the option of encrypting everything, SSL may not be for you. SSL does add overhead to your site which will increase download times slightly. Therefore we recommend you enable SSL at a minimum on the login page, then on the whole admin section and finally on individual pages or posts with forms that require sensitive information.', 'better-wp-security');
        ?>
</p>
	
	<?php 
        if ($has_ssl) {
            ?>
		<div class="itsec-warning-message"><?php 
            _e('<strong>WARNING:</strong> Your server does appear to support SSL. Using these features without SSL support on your server or host will cause some or all of your site to become unavailable.', 'better-wp-security');
            ?>
</div>
	<?php 
        } else {
            ?>
		<div class="itsec-warning-message"><?php 
            _e('<strong>WARNING:</strong> Your server does not appear to support SSL. Your server MUST support SSL to use these features. Using these features without SSL support on your server or host will cause some or all of your site to become unavailable.', 'better-wp-security');
            ?>
</div>
	<?php 
        }
        ?>
	
	<p><?php 
        _e('Note: When turning SSL on you will be logged out and you will have to log back in. This is to prevent possible cookie conflicts that could make it more difficult to get in otherwise.', 'better-wp-security');
        ?>
</p>
	
	<table class="form-table itsec-settings-section">
		<tr>
			<th scope="row"><label for="itsec-ssl-frontend"><?php 
        _e('Front End SSL Mode', 'better-wp-security');
        ?>
</label></th>
			<td>
				<?php 
        $form->add_select('frontend', $frontend_modes);
        ?>
				<br />
				<label for="itsec-ssl-frontend"><?php 
        _e('Front End SSL Mode', 'better-wp-security');
        ?>
</label>
				<p class="description"><?php 
        _e('Enables secure SSL connection for the front-end (public parts of your site). Turning this off will disable front-end SSL control, turning this on "Per Content" will place a checkbox on the edit page for all posts and pages (near the publish settings) allowing you to turn on SSL for selected pages or posts. Selecting "Whole Site" will force the whole site to use SSL.', 'better-wp-security');
        ?>
</p>
			</td>
		</tr>
		<tr>
			<th scope="row"><label for="itsec-ssl-admin"><?php 
        _e('SSL for Dashboard', 'better-wp-security');
        ?>
</label></th>
			<td>
				<?php 
        $form->add_checkbox('admin');
        ?>
				<label for="itsec-ssl-admin"><?php 
        _e('Force SSL for Dashboard', 'better-wp-security');
        ?>
</label>
				<p class="description"><?php 
        _e('Forces all dashboard access to be served only over an SSL connection.', 'better-wp-security');
        ?>
</p>
			</td>
		</tr>
	</table>
<?php 
    }
開發者ID:Garth619,項目名稱:Femi9,代碼行數:76,代碼來源:settings-page.php


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