【发布时间】:2019-11-22 11:34:00
【问题描述】:
在 WordPress 中,我给一些用户一个特定的角色(管理员、编辑等)。默认情况下,这些用户无法访问Site Kit by Google 插件。你知道如何打开它吗?
可能是functions.php 中的代码?而且我不想添加像用户角色这样的新插件。
【问题讨论】:
在 WordPress 中,我给一些用户一个特定的角色(管理员、编辑等)。默认情况下,这些用户无法访问Site Kit by Google 插件。你知道如何打开它吗?
可能是functions.php 中的代码?而且我不想添加像用户角色这样的新插件。
【问题讨论】:
编辑 permissions.php , plugins->google-site-kit->inlucdes->core->permissions->permissions.php
$this->primitive_to_core = array(
// By default, only allow administrators to authenticate.
//self::AUTHENTICATE => 'manage_options',
self::AUTHENTICATE => 'edit_others_posts',
// Allow contributors and up to view their own post's insights.
self::VIEW_POSTS_INSIGHTS => 'edit_posts',
// Allow editors and up to view the dashboard and module details.
self::VIEW_DASHBOARD => 'edit_others_posts',
self::VIEW_MODULE_DETAILS => 'edit_others_posts',
// Allow administrators and up to manage options and set up the plugin.
//self::MANAGE_OPTIONS => 'manage_options',
//self::SETUP => 'manage_options',
self::MANAGE_OPTIONS => 'edit_others_posts',
self::SETUP => 'edit_others_posts',
// Allow to differentiate between authors and contributors.
self::PUBLISH_POSTS => 'publish_posts',
);
【讨论】: