WordPress,在管理编辑屏幕中过滤页面
是否可以“过滤”页面“编辑”屏幕中显示的页面(http://cl.ly/6nLC )在 WordPress 中?我查看了 WordPress 的动作/挂钩部分的插件开发人员,但我找不到任何内容。
我想要实现的是某些用户可以编辑某些页面(和子页面),而其他人无法编辑这些页面,但可能能够编辑其他页面。
我已经编写了一个插件,可以将不同的用户放入不同的组中,现在只需要具有不同的权限,哪个用户是哪个组的成员存储在 user_meta 表中。
但是,如果有“任何”过滤器挂钩/方法,有人可以指出这一点,我想我将能够从那里走得更远。
亲切的问候。
Is it possible to 'filter' which pages are shown in the 'edit' screen for pages ( http://cl.ly/6nLC ) in Wordpress? I have looked in the action / hook section of Wordpress for plugin developers but I could not find any.
What I am trying to accomplish is is that certain users can edit certain pages (and child pages) and other persons cannot edit those pages but might be able to edit other pages.
I have allready written a plugin which makes it possible to put different users in differtent groups, which now just needs to have different rights, which user is member of which group is stored in the user_meta table.
However if there is 'any' filter hook / method for this, can someone point this out, I think I will be able to go further from there.
Kind regards.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用
posts_where
过滤器向SQL查询过滤掉一些页面。load-{filename}
操作可用于确保仅在管理页面时应用过滤器。You can use a
posts_where
filter to add a condition to the SQL query to filter out some pages. Aload-{filename}
action can be used to ensure the filter is only applied when managing pages.