Alecaddd / WordPressPlugin101

Official repository of the series of tutorial on How to Create a WordPress Plugin from scratch: https://www.youtube.com/playlist?list=PLriKzYyLb28kR_CPMz8uierDWC2y3znI2
MIT License
408 stars 369 forks source link

Role Restriction / Capability / Permission #17

Closed kennethenglisch closed 4 years ago

kennethenglisch commented 4 years ago

Hey Alecad, how is it possible to add user role capability to the plugin? I want only specific roles to have access to my plugin. How can Ido this? I've read about the add_cap() method, but how and where do I have to implement it?

King regards, Kenneth