Jetpack_Protect_Module::check_api_key PHP Méthode

check_api_key() public méthode

public check_api_key ( )
    public function check_api_key()
    {
        $response = $this->protect_call('check_key');
        if (isset($response['ckval'])) {
            return true;
        }
        if (isset($response['error'])) {
            if ($response['error'] == 'Invalid API Key') {
                $this->api_key_error = __('Your API key is invalid', 'jetpack');
            }
            if ($response['error'] == 'API Key Required') {
                $this->api_key_error = __('No API key', 'jetpack');
            }
        }
        $this->api_key_error = __('There was an error contacting Jetpack servers.', 'jetpack');
        return false;
    }