W3cubDocs

/WordPress

use_ssl_preference( WP_User $user )

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

Description

See the ‘personal_options’ action.

Parameters

$user

(WP_User) (Required) User data object.

Source

File: wp-admin/includes/user.php

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
}

Changelog

Version Description
2.7.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/use_ssl_preference