I have to make sure, that the WordPress cookie set after successful log in, “wordpress_logged_in_[salt-sth]” is set to be available for secure connections only.
It looks like that it´s a filter used in pluggable.php, line 653
$secure_logged_in_cookie = apply_filters(‘secure_logged_in_cookie’, false, $user_id, $secure);
How can I set it to secure, WITHOUT modifiyng the wordpress core files?
If I modify the core (set to true) – it´s not possible to logout anymore…
Thank U!
The advantage of a filter is that you can change a value without modifying core WP files. The filter you list:
Passes in three values. You just need to build a function that accepts those three values and returns
true
(or just returnstrue
by default.This function, for example, merely returns true for whatever value is passed in to that filter: