use_ssl_preference

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

Description

use_ssl_preference( (object) $user ); 

See the action.

Parameters (1)

0. $user (object)
User data object

Usage

  1. if ( !function_exists( 'use_ssl_preference' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/user.php'; 
  3.  
  4. // User data object 
  5. $user = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = use_ssl_preference($user); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/user.php  
  1. function use_ssl_preference($user) { 
  2. ?> 
  3. <tr class="user-use-ssl-wrap"> 
  4. <th scope="row"><?php _e('Use https')?></th> 
  5. <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> 
  6. </tr> 
  7. <?php