SearchWP

This Documentation is for SearchWP Version 3

Available since: 2.4.5

searchwp_dashboard_widget_cap

If you would like more control over who can see the SearchWP Dashboard Widget you can use this filter to modify the capability required to view it.

To change the capability required to view the SearchWP Dashboard Widget, add something like the following to your theme’s functions.php:

<?php
function my_searchwp_dashboard_widget_cap( $capability ) {
return 'edit_posts'; // Editors and up should be able to see the stats
}
add_filter( 'searchwp_dashboard_widget_cap', 'my_searchwp_dashboard_widget_cap' );
view raw gistfile1.php hosted with ❤ by GitHub