Available since: 2.0.2
searchwp_statistics_cap
View Parameters »In order to access search statistics provided by SearchWP, users will need a capability of publish_posts by default. If you would like to change which capability is used for this restriction, add something like the following to your theme’s functions.php
:
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 | |
function my_searchwp_statistics_cap( $capability ) { | |
return 'manage_options'; // only Administrators | |
} | |
add_filter( 'searchwp_statistics_cap', 'my_searchwp_statistics_cap' ); |
Parameters
Parameter | Type | Description |
---|---|---|
$capability |
String |
The capability necessary to have access to statistics (default is |