钩子文档

auth_redirect_scheme

💡 云策文档标注

概述

auth_redirect_scheme 是一个 WordPress 过滤器钩子,用于修改身份验证重定向方案。它允许开发者在用户未登录时自定义重定向到登录页面的方案。

关键要点

  • 这是一个过滤器钩子,用于过滤身份验证重定向方案。
  • 参数 $scheme 是一个字符串,表示身份验证重定向方案,默认为空。
  • 在 auth_redirect() 函数中使用,该函数检查用户是否登录,未登录则重定向到登录页面。
  • 自 WordPress 2.9.0 版本引入。

📄 原文内容

Filters the authentication redirect scheme.

Parameters

$schemestring
Authentication redirect scheme. Default empty.

Source

$scheme = apply_filters( 'auth_redirect_scheme', '' );

Changelog

Version Description
2.9.0 Introduced.