| Server IP : 104.26.2.156 / Your IP : 216.73.216.185 Web Server : nginx/1.27.1 System : Linux us-1 5.15.0-131-generic #141-Ubuntu SMP Fri Jan 10 21:18:28 UTC 2025 x86_64 User : vinodai ( 3134) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /storage/v1396/woofsite3/public_html/wp-content/plugins/jetpack/sal/ |
Upload File : |
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* SAL_Platform class which defines a token to later be associated with a Jetpack site
*
* @package automattic/jetpack
*/
if ( ! defined( 'ABSPATH' ) ) {
exit( 0 );
}
require_once __DIR__ . '/class.json-api-token.php';
/**
* Base class for SAL_Platform
*/
abstract class SAL_Platform {
/**
* A token that will represent a SAL_Token instance, default is empty.
*
* @var SAL_Token
*/
public $token;
/**
* Contructs the SAL_Platform instance
*
* @param SAL_Token $token The variable which will store the SAL_Token instance.
*/
public function __construct( $token ) {
if ( is_array( $token ) ) {
$token = SAL_Token::from_rest_token( $token );
} else {
$token = SAL_Token::for_anonymous_user();
}
$this->token = $token;
}
/**
* This is the get_site function declaration, initially not implemented.
*
* @param int $blog_id The sites Jetpack blog ID.
* @see class.json-api-platform-jetpack.php for the implementation of this function.
*/
abstract public function get_site( $blog_id );
}
if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
require_once dirname( WP_CONTENT_DIR ) . '/public.api/rest/sal/class.json-api-platform-wpcom.php';
} else {
require_once __DIR__ . '/class.json-api-platform-jetpack.php';
}