updated plugin Jetpack Protect
version 4.0.0
This commit is contained in:
@ -20,7 +20,7 @@ class ExPlat {
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const PACKAGE_VERSION = '0.1.7';
|
||||
const PACKAGE_VERSION = '0.2.13';
|
||||
|
||||
/**
|
||||
* Initializer.
|
||||
|
@ -11,6 +11,8 @@ namespace Automattic\Jetpack\ExPlat;
|
||||
use Automattic\Jetpack\Connection\Client;
|
||||
use Automattic\Jetpack\Connection\Manager as Jetpack_Connection;
|
||||
use WP_Error;
|
||||
use WP_REST_Request;
|
||||
use WP_REST_Response;
|
||||
use WP_REST_Server;
|
||||
|
||||
/**
|
||||
@ -71,7 +73,7 @@ class REST_Controller {
|
||||
* Get the assignments for a given experiment and anon_id
|
||||
*
|
||||
* @param WP_REST_Request $request The REST request object.
|
||||
* @return WP_REST_Response
|
||||
* @return WP_REST_Response|WP_Error
|
||||
*/
|
||||
public function get_assignments( $request ) {
|
||||
$response = null;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import cookie from 'cookie';
|
||||
import { parse as cookieParse } from 'cookie';
|
||||
|
||||
let initializeAnonIdPromise: Promise< string | null > | null = null;
|
||||
const anonIdPollingIntervalMilliseconds = 50;
|
||||
@ -13,7 +13,7 @@ const anonIdPollingIntervalMaxAttempts = 100; // 50 * 100 = 5000 = 5 seconds
|
||||
* @return {?string} The anonymous cookie value, or null if it doesn't exist
|
||||
*/
|
||||
export const readAnonCookie = (): string | null => {
|
||||
return cookie.parse( document.cookie ).tk_ai || null;
|
||||
return cookieParse( document.cookie ).tk_ai || null;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user