WordPress at Your Fingertips
function is not described

force_ssl_admin() WP 2.6.0

Whether to force SSL used for the Administration Screens.

No Hooks.


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


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


Since 2.6.0 Introduced.

Code of force_ssl_admin() WP 5.8.2

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

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

	return $forced;