Title: Filter $menu_capability
Last modified: August 31, 2016

---

# Filter $menu_capability

 *  [mafsdisseny](https://wordpress.org/support/users/capiedge/)
 * (@capiedge)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/filter-menu_capability/)
 * Hi all,
    First, thanks for the great plugin!
 * Is there a way to filter the `$menu_capability` variable, declared in class_aal_admin_ui.
   php?
 * In some cases, I want to restrict the log access to a different user than the
   one with the declared capability `edit_pages`. For example `manage_options`.
 * Any ideas?
    Thanks
 * [https://wordpress.org/plugins/aryo-activity-log/](https://wordpress.org/plugins/aryo-activity-log/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Yakir Sitbon](https://wordpress.org/support/users/kingyes/)
 * (@kingyes)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/filter-menu_capability/#post-6964916)
 * User with capability `edit_pages` cannot see what user with capability `manage_options`
   doing.. so I think you don’t need filter for that.
 * If you need that filter, please open new issue in our [Github repo](https://github.com/KingYes/wordpress-aryo-activity-log).
 *  Thread Starter [mafsdisseny](https://wordpress.org/support/users/capiedge/)
 * (@capiedge)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/filter-menu_capability/#post-6964923)
 * Thanks for your quick reply, I think that I did not explain my doubt well.
 * What I try to do, is decide, through a filter, which role can see the log (and
   therefore which role can see the “activity log” in the backend menu).
 * In my case, I need to change “edit_pages” with “manage_options” because I have
   declared two different administrator levels through custom roles, and the capability“
   manage_options” is one of the differences between both.
 * Thanks!
 *  Plugin Author [Yakir Sitbon](https://wordpress.org/support/users/kingyes/)
 * (@kingyes)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/filter-menu_capability/#post-6964924)
 * Please open new issue in our Github for that.
 *  Plugin Contributor [Maor Chasen](https://wordpress.org/support/users/maor/)
 * (@maor)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/filter-menu_capability/#post-6965066)
 * Hi capiedge,
 * What you can very easily do is add the capability `view_all_aryo_activity_log`(
   [view in code](https://github.com/KingYes/wordpress-aryo-activity-log/blob/48b8a10d1a1a35bedb29caddd843b31dbbeb5ae6/classes/class-aal-admin-ui.php#L14))
   to any user that you’d like to have the Activity Log dashboard visible for.
 * You can do that programmatically or even faster, using a dedicated plugin like
   [Members](https://wordpress.org/plugins/members/) (which is a **must** anyway.)
 * I hope this makes sense to you. Anyway this is how I’ve done so for my clients(
   which are not given the Administrator role by default, rather I create a custom
   role with specific, hand-picked capabilities. One of them is `view_all_aryo_activity_log`.)
 * Let us know if you’ve done it otherwise or have a better way to suggest!
 *  Thread Starter [mafsdisseny](https://wordpress.org/support/users/capiedge/)
 * (@capiedge)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/filter-menu_capability/#post-6965095)
 * Thank you Maor!
    I think that a filter to change the capability (now “edit_pages”)
   would be a good way to complete the customization possibilities.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Filter $menu_capability’ is closed to new replies.

 * ![](https://ps.w.org/aryo-activity-log/assets/icon-256x256.png?rev=1944199)
 * [Activity Log - Monitor & Record User Changes](https://wordpress.org/plugins/aryo-activity-log/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/aryo-activity-log/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/aryo-activity-log/)
 * [Active Topics](https://wordpress.org/support/plugin/aryo-activity-log/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/aryo-activity-log/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/aryo-activity-log/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [mafsdisseny](https://wordpress.org/support/users/capiedge/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/filter-menu_capability/#post-6965095)
 * Status: not resolved