Where does WordPress perform the check as to whether or not a user is logged in when aaccessing admin? i.e. When I access /wp-admin/edit.php, if I am not logged in I am redirected to the login page - where (which file) is that process taking place?
It begins on this line in the admin.php
file, which is a part of all admin-related backend pages in WordPress. That line calls upon the auth_redirect
function, which handles the redirection.