Title: Add filter for user capability
Last modified: August 21, 2016

---

# Add filter for user capability

 *  Resolved [Ashworth Creative](https://wordpress.org/support/users/ashworthcreative/)
 * (@ashworthcreative)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/add-filter-for-user-capability/)
 * Between lines 187 and 191 of /wp-store-locator/admin/class-admin.php, could you
   please change instances of `manage_options` to `apply_filters( 'wpsl_capability','
   manage_options' )` so that it would be possible to manually set the user capability
   for this plugin via a customizable filter? You would also have to update every
   call to `current_user_can` to take in the filter as its argument.
 * That way I could have a user level below administrator manage stores.
 * I think there’s also a mistake on line 187, you’re passing manage_options into
   the translate function.
 * [https://wordpress.org/plugins/wp-store-locator/](https://wordpress.org/plugins/wp-store-locator/)

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

 *  Plugin Author [Tijmen Smit](https://wordpress.org/support/users/tijmensmit/)
 * (@tijmensmit)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/add-filter-for-user-capability/#post-4719524)
 * I will look into this for the next update, and yeah the manage_options shouldn’t
   be in the translate function. Thanks for pointing it out 🙂
 *  Plugin Author [Tijmen Smit](https://wordpress.org/support/users/tijmensmit/)
 * (@tijmensmit)
 * [12 years ago](https://wordpress.org/support/topic/add-filter-for-user-capability/#post-4719698)
 * Hi, I almost finished coding the next release. I implemented the filters and 
   made some other changes to the code. If you are interested in testing it before
   the public release, can you send me an email at info at tijmensmit.com?
 *  [vinayakpatil](https://wordpress.org/support/users/vinayakpatil/)
 * (@vinayakpatil)
 * [12 years ago](https://wordpress.org/support/topic/add-filter-for-user-capability/#post-4719708)
 * How i can add filter. Want to add category field while adding location and also
   category as a part of search

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

The topic ‘Add filter for user capability’ is closed to new replies.

 * ![](https://ps.w.org/wp-store-locator/assets/icon-256x256.jpg?rev=1007784)
 * [WP Store Locator](https://wordpress.org/plugins/wp-store-locator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-store-locator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-store-locator/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-store-locator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-store-locator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-store-locator/reviews/)

## Tags

 * [capability](https://wordpress.org/support/topic-tag/capability/)
 * [filter](https://wordpress.org/support/topic-tag/filter/)

 * 3 replies
 * 3 participants
 * Last reply from: [vinayakpatil](https://wordpress.org/support/users/vinayakpatil/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/add-filter-for-user-capability/#post-4719708)
 * Status: resolved