Giving access to non-admin roles

Anyone in the Administrators role can view any locked post. Is it possible to configure the plugin so that users in the Author, Editor, or Contributor roles can view locked posts?

Currently there isnt a way to easily do that via options. You could do it through code modifications.

I started adding some code to my own plugin to accomplish this. I looked through the source and I saw the “ptrn/bypass_filtering” filter. Is this what I should be hooking into? Do you have any samples of how to use this?

My attempt so far is this (with pseudocode):

function patreon_bypass_filtering( $filter ) 
    if ( !$filter )
        if ( <User is Author> )
            return true;

    return $filter;
add_filter( "ptrn/bypass_filtering", "patreon_bypass_filtering", 10, 1 );
1 Like

Thats a good way of doing it…

Hi, We’ve been trying to accomplish the same thing. So glad we stumbled on your post. Did this hook eventually work? Also was this injected through some php snippet plugin?