Last active
February 27, 2020 00:28
-
-
Save csaborio001/319b070dfcd74379431f6755b1682fda to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'pms_submenu_page_capability', 'pmsc_allow_editors_to_view_pages', 20, 2 ); | |
function pmsc_allow_editors_to_view_pages( $capability, $menu_slug ){ | |
if( $menu_slug == 'pms-payments-page' || $menu_slug == 'pms-members-page' || $menu_slug === 'pms-reports-page' || $menu_slug === 'pms-export-page' ) | |
return 'pms_edit_capability'; | |
return $capability; | |
} | |
add_filter( 'pms_export_capability', 'pmsc_change_export_capability'); | |
function pmsc_change_export_capability(){ | |
return current_user_can( 'delete_others_pages' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment