Skip to content

Instantly share code, notes, and snippets.

@greenhornet79
Created December 16, 2021 15:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greenhornet79/0177124ad86f20444a93ceb1ca9e0efa to your computer and use it in GitHub Desktop.
Save greenhornet79/0177124ad86f20444a93ceb1ca9e0efa to your computer and use it in GitHub Desktop.
<?php
// adjust who can edit and manage the Leaky Paywall settings menu
// use WordPress capabilities https://wordpress.org/support/article/roles-and-capabilities/
add_filter( 'manage_leaky_paywall_settings', 'zeen101_adjust_lp_setting_management' );
function zeen101_adjust_lp_setting_management( $cap ) {
// allow editors
return 'delete_others_posts';
// allow editors and authors
return 'edit_posts';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment