SearchWP

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:

<?php
function my_searchwp_statistics_cap( $capability ) {
return 'manage_options'; // only Administrators
}
add_filter( 'searchwp_statistics_cap', 'my_searchwp_statistics_cap' );
view raw gistfile1.php hosted with ❤ by GitHub

Parameters

Parameter Type Description
$capability String

The capability necessary to have access to statistics (default is publish_posts)