This is quite straightforward with user_roles() and array_search(). Below is a function which will return the role ID if there is a role matching the name and FALSE otherwise.
jQuery 遍历 - parent() 方法
定义和用法
parent() 获得当前匹配元素集合中每个元素的父元素,使用选择器进行筛选是可选的。
欢迎各位兄弟 发布技术文章
这里的技术是共享的