WordPress - 允许编辑者管理主题小部件
是否可以授予编辑者管理主题小部件的能力?默认情况下,只有管理员可以执行此操作。
谢谢, 乔恩
Is it possible to grant Editors the ability to manage theme widgets? By default, only Administrators can do so.
Thanks,
Jon
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
如果您不想使用插件,您也可以将其添加到您的functions.php或类似的地方。
If you don't want to use a plugin, you can also add this to your functions.php or somewhere similar.
恐怕您将需要使用插件来实现此目的,因为更改小部件是 switch_themes编辑者无法使用此功能。您需要一个可以更改角色和功能的插件(例如功能管理器)。在 Wordpress 论坛中查看有关此问题的类似主题。
I'm afraid you're going to need to use a plugin to achieve this, since changing Widgets is a switch_themes capability not available to Editors. You need a plugin that changes roles and capabilities (like Capability Manager). Check a similiar topic about this issue in Wordpress Forums.
在 WordPress 3.2.1 中,该功能为
edit_theme_options
。switch_themes
只会让您激活与可用主题不同的主题。In WordPress 3.2.1 the capability is
edit_theme_options
.switch_themes
will do nothing more than allow you to activate a different theme from the available ones.是的,有几种方法可以做到这一点。如果您不想弄乱代码,您可以使用名为管理菜单编辑器的插件,该插件将为编辑器角色提供对小部件和主题选项的访问权限。对我来说不幸的是 wp 将对小部件的访问与对主题选项的访问捆绑在一起。为了解决这个问题,您可以安装另一个名为 Adminize 的插件,它将为您提供隐藏菜单中内容的选项。
第二种解决方案是使用functions.php 中的代码
,然后安装Adminize 来隐藏诸如主题选项之类的内容(如果您只想为管理员创建小部件访问权限)。
Yes there are several ways to this. If you don't want to mess with the code you can use a plugin called admin menu editor which will give Editor role access to the widgets and theme options. The unfortunate part for me is the wp bundled up access to widgets with access to theme options. To solve this you install another plugin called Adminize which will give you options to hide stuff from the menu.
The second solution is to use the code in the functions.php
and then install Adminize to hide stuff like theme-options if you only want to create widget access for your admin.