force_ssl_admin( string|bool $force = null )
Whether to force SSL used for the Administration Screens.
Parameters
- $force
-
(string|bool) (Optional) Whether to force SSL in admin screens.
Default value: null
Return
(bool) True if forced, false if not forced.
More Information
Determine whether the administration panel should be viewed over SSL. This function relies on the FORCE_SSL_ADMIN constant that is set in the wp-config.php file if you’re using your site over SSL.
The force parameter will change the return value of this function until it is reset.
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; }
Expand full source code Collapse full source code View on Trac View on GitHub
Changelog
Version | Description |
---|---|
2.6.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.
Default Usage
Changing the Return Value
Expand full source codeCollapse full source code
Resetting the Return Value