W3cubDocs

/WordPress

force_ssl_admin( string|bool $force = null )

Whether to force SSL used for the Administration Screens.

Description

Parameters

$force

(string|bool) (Optional) Whether to force SSL in admin screens.

Default value: null

Return

(bool) True if forced, false if not forced.

Source

File: wp-includes/functions.php

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

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

	return $forced;
}

Changelog

Version Description
2.6.0 Introduced.

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