This repository has been archived on 2023-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
Omphaloskepsis/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-core-endpoint.php
2018-03-21 18:19:20 +00:00

20 lines
502 B
PHP

<?php
class Jetpack_JSON_API_Core_Endpoint extends Jetpack_JSON_API_Endpoint {
// POST /sites/%s/core
// POST /sites/%s/core/update
protected $needed_capabilities = 'manage_options';
protected $new_version;
protected $log;
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,
);
}
}