PHP 클래스 Jetpack_Client, jetpack

파일 보기 프로젝트 열기: automattic/jetpack 1 사용 예제들

공개 메소드들

메소드 설명
_stringify_data ( array | mixed $data ) : array | string Takes an array or similar structure and recursively turns all values into strings. This is used to make sure that body hashes are made ith the string version, which is what will be seen after a server pulls up the data in the $_POST array.
_wp_remote_request ( $url, $args, $set_fallback = false ) : array | WP_Error Wrapper for wp_remote_request(). Turns off SSL verification for certain SSL errors.
remote_request ( $args, $body = null ) : array | WP_Error Makes an authorized remote request using Jetpack_Signature
set_time_diff ( &$response, $force_set = false )
wpcom_json_api_request_as_blog ( string $path, string $version = self::WPCOM_JSON_API_VERSION, array $args = [], string $body = null ) : array | WP_Error Query the WordPress.com REST API using the blog token

메소드 상세

_stringify_data() 공개 정적인 메소드

Takes an array or similar structure and recursively turns all values into strings. This is used to make sure that body hashes are made ith the string version, which is what will be seen after a server pulls up the data in the $_POST array.
public static _stringify_data ( array | mixed $data ) : array | string
$data array | mixed
리턴 array | string

_wp_remote_request() 공개 정적인 메소드

This is lame, but many, many, many hosts have misconfigured SSL. When Jetpack is registered, the jetpack_fallback_no_verify_ssl_certs option is set to the current time if: 1. a certificate error is found AND 2. not verifying the certificate works around the problem. The option is checked on each request.
또한 보기: Jetpack::fix_url_for_bad_hosts()
public static _wp_remote_request ( $url, $args, $set_fallback = false ) : array | WP_Error
리턴 array | WP_Error WP HTTP response on success

remote_request() 공개 정적인 메소드

Makes an authorized remote request using Jetpack_Signature
public static remote_request ( $args, $body = null ) : array | WP_Error
리턴 array | WP_Error WP HTTP response on success

set_time_diff() 공개 정적인 메소드

public static set_time_diff ( &$response, $force_set = false )

wpcom_json_api_request_as_blog() 정적인 공개 메소드

Query the WordPress.com REST API using the blog token
static public wpcom_json_api_request_as_blog ( string $path, string $version = self::WPCOM_JSON_API_VERSION, array $args = [], string $body = null ) : array | WP_Error
$path string
$version string
$args array
$body string
리턴 array | WP_Error $response Data.