WordPress at a glance
function is not described

force_ssl_admin() WP 2.6.0

Whether to force SSL used for the Administration Screens.

  • Static. true/false. $forced

No Hooks.


true/false. True if forced, false if not forced.


force_ssl_admin( $force );
Whether to force SSL in admin screens.
Default: null

Code of force ssl admin: wp-includes/functions.php WP 5.2.2

function force_ssl_admin( $force = null ) {
	static $forced = false;

	if ( ! is_null( $force ) ) {
		$old_forced = $forced;
		$forced     = $force;
		return $old_forced;

	return $forced;