Fatal error post.pho heeeelp :(

I would really appreciate any help with my website that crashed and the following error appears
“Fatal error: Call to undefined function is_user_logged_in() in /home1/zesiku/public_html/wp-includes/post.php on line 2160”

I have checked cpanel and see the following. The line that says “if ( ‘readable’ == $perm && is_user_logged_in() ) {” is the 2160. What to do :(((

function _count_posts_cache_key( $type = ‘post’, $perm = ” ) {
$cache_key = ‘posts-‘ . $type;
if ( ‘readable’ == $perm && is_user_logged_in() ) {
$post_type_object = get_post_type_object( $type );
if ( $post_type_object && ! current_user_can( $post_type_object->cap->read_private_posts ) ) {
$cache_key .= ‘‘ . $perm . ‘‘ . get_current_user_id();
}
}
return $cache_key;
}

Read more here: Fatal error post.pho heeeelp 🙁

Leave a Reply

Your email address will not be published. Required fields are marked *