-
-
Save searchwpgists/3fa9b3565655a75146eb3d4cb989b2dd to your computer and use it in GitHub Desktop.
Restrict viewing Statistics to Administrators in SearchWP
This file contains 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
<?php | |
// Restrict viewing Statistics to Administrators in SearchWP. | |
add_filter( 'searchwp\statistics\capability', function( $capability ) { | |
return 'manage_options'; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment