Change WordPress user roles and capabilities › Forums › How to or FAQ › php code to check if user have permissions on a post › Reply To: php code to check if user have permissions on a post
04/05/2017 at 00:24
#3673
Vladimir
Keymaster
Hi,
There is a special public method, which you can call to check if user can view a post or not:
URE_Content_View_Restrictions::current_user_can_view($post_id)
Unfortunately, it works incorrectly for some restriction settings, as discovered recently. I work on a fix. It will be available next week.