Skip to content

Instantly share code, notes, and snippets.

@greenhornet79
Last active January 2, 2017 17:33
Show Gist options
  • Save greenhornet79/220fcc5a5deddcd2796c to your computer and use it in GitHub Desktop.
Save greenhornet79/220fcc5a5deddcd2796c to your computer and use it in GitHub Desktop.
<?php
add_filter( 'leaky_paywall_current_user_can_view_all_content', 'zeen101_allow_access_leaky_paywall_content_by_cap' );
function zeen101_allow_access_leaky_paywall_content_by_cap( $capability ) {
// for contributors
$capability = 'delete_posts';
// for authors
// $capability = 'publish_posts';
// for editors
// $capability = 'delete_others_posts';
return $capability;
}
@moyen03
Copy link

moyen03 commented Jan 2, 2017

Hi,
Where should I add this filter or the file in my project?
Actually I want to give access one of the 'Editor' for the Leaky Paywall subscribers list so that he can do what ever admin can do with this list such as edit the information and update.

Thanks
Moyen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment