• Resolved Ashworth Creative

    (@ashworthcreative)


    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/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    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

    (@tijmensmit)

    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

    (@vinayakpatil)

    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.