You can configure who can see the log by using some filters.
For example:
/**
* Change capability required to view main simple history page.
* Default capability is "edit_pages". Change to for example "manage options"
* to only allow admins to view the history log.
*/
add_filter('simple_history/view_history_capability', function( $capability ) {
$capability = 'manage_options';
return $capability;
});
or
// Allow only the users specified in $allowed_users to show the history page, the history widget on the dashboard, or the history settings page
add_filter( 'simple_history/show_dashboard_page', 'function_show_history_dashboard_or_page' );
add_filter( 'simple_history/show_dashboard_widget', 'function_show_history_dashboard_or_page' );
add_filter( 'simple_history/show_settings_page', 'function_show_history_dashboard_or_page' );
function function_show_history_dashboard_or_page( $show ) {
$allowed_users = array(
'[email protected]',
'[email protected]',
);
$user = wp_get_current_user();
if ( ! in_array( $user->user_email, $allowed_users ) ) {
$show = false;
}
return $show;
}
Check the examples file, it may contain even more examples:
https://github.com/bonny/WordPress-Simple-History/blob/master/examples/examples.php