{
  "name": "bricks/auth/custom_redirect_url",
  "kind": "filter",
  "url": "https://academy.bricksbuilder.io/developer/hooks/filters/filter-bricks-auth-custom_redirect_url/",
  "scraped_at": "2026-08-29",
  "hook_name": "bricks/auth/custom_redirect_url",
  "description": {
    "en": "This filter is distinct from other authentication-related filters in that it provides a broad scope for customizing redirections during authentication processes. Unlike specific filters for login , registration , lost password , or reset password pages , this filter applies to any authentication-related URL. Functionality: This filter allows overriding the default redirect URL based on custom conditions across various authentication scenarios. It offers flexibility to redirect users to different pages depending on the context or specific requirements of the authentication process. In this example, the redirection URL changes based on the current URL path, allowing for a dynamic and contextual redirection strategy. Parameters: Return:",
    "zh": "此筛选器与其它身份验证相关的筛选器不同，因为它提供了在身份验证过程中自定义重定向的广泛范围。与针对 login、registration、lost password 或 reset password 页面的特定筛选器不同，此筛选器适用于任何与身份验证相关的 URL。功能：此筛选器允许根据不同身份验证场景下的自定义条件覆盖默认的重定向 URL。它提供了根据身份验证流程的上下文或特定要求将用户重定向到不同页面的灵活性。在下面的示例中，重定向 URL 根据当前 URL 路径变化，从而实现动态、上下文相关的重定向策略。参数：返回值："
  },
  "example_usage": "add_filter( 'bricks/auth/custom_redirect_url', function( $custom_redirect_url, $current_url_path ) {\n    if ( /* custom condition based on $current_url_path */ ) {\n        return 'https://example.com/custom-redirect';\n    }\n    return $custom_redirect_url;\n}, 10, 2 );"
}