Answer the question
In order to leave comments, you need to log in
How to display real cookies?
Some wrong cookies are displayed, you can look at the screenshot:
How to display real cookies?
var_dump($_COOKIE); outputs:
array(3) { ["wordpress_test_cookie"]=> string(15) "WP Cookie check" ["wordpress_logged_in_6db1d63adbfd940870bdcece524b53b5"]=> string(49) "admin|1448819999|97ebc784204cf4131e6e5cbba0759665" ["wtimep-set-s-1 "]=> string(10) "1448647200" }
and alert( document.cookie ); :
wordpress_test_cookie=WP+Cookie+check; wp-settings-time-1=1448647200
Answer the question
In order to leave comments, you need to log in
Both of your functions (both php and js) output the same cookies, only PHP as an array, and JS as a single line separated by a semicolon.
In addition, the wordpress_logged_in_ cookie is not visible in JS - because it was most likely marked as http_only when exposed and not accessible from JavaScript on the page.
What's not to like about removed cookies?
What did you do and what did you want to achieve?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question