WordPress开发者和主题制作者的搜索引擎



use_ssl_preference ›

Since2.7.0
已弃用n/a
use_ssl_preference ( $user )
参数:
  • (object) $user User data object.
    Required: Yes
定义在:
文档:

Optional SSL preference that can be turned on by hooking to the 'personal_options' action.

See the {@see 'personal_options'} action.



源码

function use_ssl_preference( $user ) {
	?>
	<tr class="user-use-ssl-wrap">
		<th scope="row"><?php _e( 'Use https' ); ?></th>
		<td><label for="use_ssl"><input name="use_ssl" type="checkbox" id="use_ssl" value="1" <?php checked( '1', $user->use_ssl ); ?> /> <?php _e( 'Always use https when visiting the admin' ); ?></label></td>
	</tr>
	<?php
}