secure_signon_cookie

過濾鉤子
apply_filters( 'secure_signon_cookie', $secure_cookie, $credentials )
引數
  • (bool) $secure_cookie Whether to use a secure sign-on cookie.
    Required:
  • (array) $credentials { Array of entered sign-on data. @type string $user_login Username. @type string $user_password Password entered. @type bool $remember Whether to 'remember' the user. Increases the time that the cookie will be kept. Default false. }
    Required:
定義位置
相關勾子
secure_auth_cookiesecure_logged_in_cookieset_comment_cookiesset_logged_in_cookieset_auth_cookie
相關方法
sanitize_comment_cookiesget_url_in_contentset_current_screenwp_set_comment_cookiesscreen_iconwp_create_nonce
引入
3.1.0
棄用
-

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

過濾是否使用安全登入cookie。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$secure_cookie = apply_filters( 'secure_signon_cookie', $secure_cookie, $credentials );
$secure_cookie = apply_filters( 'secure_signon_cookie', $secure_cookie, $credentials );
$secure_cookie = apply_filters( 'secure_signon_cookie', $secure_cookie, $credentials );

常見問題

FAQs
檢視更多 >