HEX
Server: nginx
System: Linux pool195-106-36.bur.atomicsites.net 6.12.57+deb12-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.57-1~bpo12+1 (2025-11-17) x86_64
User: (0)
PHP: 8.3.32
Disabled: pcntl_fork
Upload Files
File: /wordpress/plugins/jetpack/latest/json-endpoints/jetpack/class.jetpack-json-api-core-endpoint.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName

if ( ! defined( 'ABSPATH' ) ) {
	exit( 0 );
}

/**
 * Core endpoint class.
 *
 * POST /sites/%s/core
 * POST /sites/%s/core/update
 *
 * @phan-constructor-used-for-side-effects
 */
class Jetpack_JSON_API_Core_Endpoint extends Jetpack_JSON_API_Endpoint {

	/**
	 * Needed capabilities.
	 *
	 * @var string
	 */
	protected $needed_capabilities = 'manage_options';

	/**
	 * New version.
	 *
	 * @var string
	 */
	protected $new_version;

	/**
	 *  An array of log strings.
	 *
	 * @var array
	 */
	protected $log;

	/**
	 * Return the result of the wp_version.
	 *
	 * @return array
	 */
	public function result() {
		global $wp_version;

		return array(
			'version'    => ( empty( $this->new_version ) ) ? $wp_version : $this->new_version,
			'autoupdate' => Jetpack_Options::get_option( 'autoupdate_core', false ),
			'log'        => $this->log,
		);
	}
}