最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to make a customize role and view a specific plugins base on that role?

programmeradmin1浏览0评论

is there anyone can suggested or give me an idea. i created a customize WordPress plugin. it was called "Spark 3cx client"

First when i login using "admin" account. I can view or access the admin dashboard. Then what i wanted is to access the same page of admin to get the same GUI but only the specific plugin will appear on sidebar, using the customize role/user credential when logged in?

is there anyone can suggested or give me an idea. i created a customize WordPress plugin. it was called "Spark 3cx client"

First when i login using "admin" account. I can view or access the admin dashboard. Then what i wanted is to access the same page of admin to get the same GUI but only the specific plugin will appear on sidebar, using the customize role/user credential when logged in?

Share Improve this question edited Aug 13, 2020 at 6:16 Rhalp Darren Cabrera asked Mar 26, 2020 at 0:39 Rhalp Darren CabreraRhalp Darren Cabrera 1131 silver badge6 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

You can a custom admin page with add_menu_page function.

The function has a argument $capability which you can set the which users will be able to view and access the page

add_menu_page

https://developer.wordpress/reference/functions/add_menu_page/

Roles and capabilities

https://wordpress/support/article/roles-and-capabilities/

发布评论

评论列表(0)

  1. 暂无评论