Undefined Function is_user_logged_in
-
Hi,
I’ve got a problem on a site I manage: I just updated “Broken Link Checker” to the newest version (1.11.13) and encountered a 500 Error on the Site.
The error states a undefined methodis_user_logged_in
in the accesspress-anonymous-post plugin. But since this error only occurs when updating Broken Link Checker – so I digged into it.
is_user_logged_in
is a pluggable function which is not available very early and get’s called in a pre_get_posts hook by the accesspress-anonymous-post plugin. Until now this wasn’t a problem because the resynch method of blcPostTypeOverlord used a custom SQL query to get posts, but now it uses get_posts which uses WP_Query and calls all those hooks – appearently beforeis_user_logged_in
is available.I’ve opened an issue with their plugin as well – but maybe you could do a check if
function_exists
or if it’s even the correct query (media query,…) in therestrict_media_library
function. Check if the function exists probably is the safest way because it’s a pluggable function and not ensured to be available (see documentation.
- The topic ‘Undefined Function is_user_logged_in’ is closed to new replies.