title: php - WordPress - serving images if customer is logged in
body: <p>I have a magazine to serve online to those who bought it. I need some kind of <code>serve-image.php?img=page1.jpg</code> to use in <code>&lt;img src="..."&gt;</code>, which would pull the images from a directory not accessible to the public. This part is solved. What isn't figured out is how do I check from this <code>serve-image.php</code> file if the user is logged into WordPress (and bought the thing.) Do I have to create some simple API for that? Is there something I am not thinking of? </p>
  
  <p>Thank you for any answers!</p>