secure_auth_cookie

過濾鉤子
apply_filters( 'secure_auth_cookie', $secure, $user_id )
引數
  • (bool) $secure Whether the cookie should only be sent over HTTPS.
    Required:
  • (int) $user_id User ID.
    Required:
定義位置
相關勾子
set_auth_cookieclear_auth_cookiesend_auth_cookiesauth_cookiesecure_signon_cookie
相關方法
wp_set_auth_cookiewp_clear_auth_cookiewp_parse_auth_cookiewp_generate_auth_cookiewp_validate_auth_cookiewp_setcookie
引入
3.1.0
棄用
-

secure_auth_cookie: 這是WordPress中的一個過濾鉤子,允許開發者修改用於安全認證的認證cookie。secure_auth_cookie鉤子傳遞預設的認證cookie作為引數,鉤子函式可以返回一個修改的cookie來代替使用。這對於改變cookie的內容或向cookie中新增自定義資料很有用。

過濾認證cookie是否應只通過HTTPS傳送。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$secure = apply_filters( 'secure_auth_cookie', $secure, $user_id );
$secure = apply_filters( 'secure_auth_cookie', $secure, $user_id );
$secure = apply_filters( 'secure_auth_cookie', $secure, $user_id );

常見問題

FAQs
檢視更多 >