secure_auth_redirect

secure_auth_redirect

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.8

apply_filters('secure_auth_redirect') is found 1 times:

  • /wp-includes/pluggable.php line 1205
    1201
    1202
    1203
    1204
    1205
    1206
    1207
    1208
    1209
    1210
    1211
    * @since 3.1.0
     *
     * @param bool $secure Whether to use a secure authentication redirect. Default false.
     */
    $secure = apply_filters( 'secure_auth_redirect', $secure );
     
    // If https is required and request is http, redirect.
    if ( $secure && ! is_ssl() && str_contains( $_SERVER['REQUEST_URI'], 'wp-admin' ) ) {
        if ( str_starts_with( $_SERVER['REQUEST_URI'], 'http' ) ) {
            wp_redirect( set_url_scheme( $_SERVER['REQUEST_URI'], 'https' ) );
            exit;