admin管理员组文章数量:1332339
In my application, i have one form. Now if user is in front end i want to display the title but if he is in back end i do not want to display it.
I do not want to check it based on user role.
In my application, i have one form. Now if user is in front end i want to display the title but if he is in back end i do not want to display it.
I do not want to check it based on user role.
Share Improve this question asked Mar 13, 2012 at 5:27 Ajay PatelAjay Patel 6584 gold badges16 silver badges27 bronze badges 1- This answer seems to address your question: wordpress.stackexchange/a/343592/43252 – MastaBaba Commented Mar 5, 2023 at 18:03
2 Answers
Reset to default 36Use is_admin()
. It checks if you're viewing an Admin page, means the backend.
Use is_admin()
to check if the the current page is an administration page. Despite its name this is not a user role check. It returns always FALSE
on front end, no matter what role the user has.
本文标签: pluginsHow to check if user is in back end
版权声明:本文标题:plugins - How to check if user is in back end? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742333200a2455105.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论