title: WordPress is_user_logged_in()
body: <p>I'm trying to see if the user is logged in on WordPress by using the intended function: <code>is_user_logged_in()</code>.</p>
  
  <p>Weird is, when I log out, it still returns true. What am I doing wrong?</p>
  
  <pre><code>function test() {
      if(is_user_logged_in()) {
        ...
      }
  }
  add_action( 'init', 'test' );
  </code></pre>