searchwp\statistics\capability
Since: 4.0.0
Table of Contents
Control the Capability necessary to view SearchWP’s Statistics.
Parameters
Type | Parameter | Default | Since |
---|---|---|---|
String | $capability |
'edit_others_posts' |
4.0.0 |
Examples
All hooks should be added to your custom SearchWP Customizations Plugin.
Restrict viewing Statistics to Administrators
<?php | |
// Restrict viewing Statistics to Administrators in SearchWP. | |
add_filter( 'searchwp\statistics\capability', function( $capability ) { | |
return 'manage_options'; | |
} ); |