force_ssl_content( bool|null $force = null ): bool

In this article

Determines whether to force SSL on content.

Parameters

$forcebool|nulloptional
Whether to force SSL in admin screens.

Default:null

Return

bool True if forced, false if not forced.

Source

function force_ssl_content( $force = null ) {
	static $forced_content = false;

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

	return $forced_content;
}

Changelog

VersionDescription
2.8.5Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.