Jetpack_JSON_API_Plugins_Endpoint::validate_network_wide PHP Méthode

validate_network_wide() protected méthode

protected validate_network_wide ( )
    protected function validate_network_wide()
    {
        $args = $this->input();
        if (isset($args['network_wide']) && $args['network_wide']) {
            $this->network_wide = true;
        }
        if ($this->network_wide && !current_user_can('manage_network_plugins')) {
            return new WP_Error('unauthorized', __('This user is not authorized to manage plugins network wide.', 'jetpack'), 403);
        }
        return true;
    }