• Resolved Shrik

    (@saowp)


    Hullo, very nice plugin! How can I restrict the viewing of the History to Administrator role? Presently it is viewable by any role.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author P?r Thernstr?m

    (@eskapism)

    There is a filter available to modify this: simple_history/view_history_capability.

    It can be used liked this (example from the examples file):

    
    /**
     * 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;
    });
    
    Thread Starter Shrik

    (@saowp)

    Thanks @eskapism , that worked!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Restrict history view by role’ is closed to new replies.