【问题标题】:How do i give a Wordpress editor access to the Site Kit by Google plugin?如何让 Wordpress 编辑器访问 Google 插件的 Site Kit?
【发布时间】:2019-11-22 11:34:00
【问题描述】:

在 WordPress 中,我给一些用户一个特定的角色(管理员、编辑等)。默认情况下,这些用户无法访问Site Kit by Google 插件。你知道如何打开它吗?

可能是functions.php 中的代码?而且我不想添加像用户角色这样的新插件。

【问题讨论】:

    标签: php wordpress plugins


    【解决方案1】:

    编辑 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',
            );
    

    【讨论】:

      猜你喜欢
      • 2023-02-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-07-29
      • 1970-01-01
      • 1970-01-01
      • 2019-06-11
      相关资源
      最近更新 更多