PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-a.7
Jetpack – WP Security, Backup, Speed, & Growth v16.3-a.7
16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 All 506 releases
jetpack / json-endpoints / jetpack / class.jetpack-json-api-core-endpoint.php

class.jetpack-json-api-core-endpoint.php in Jetpack – WP Security, Backup, Speed, & Growth 16.3-a.7, at json-endpoints/jetpack/class.jetpack-json-api-core-endpoint.php

53 lines 926 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
2
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit( 0 );
5 }
6
7 /**
8 * Core endpoint class.
9 *
10 * POST /sites/%s/core
11 * POST /sites/%s/core/update
12 *
13 * @phan-constructor-used-for-side-effects
14 */
15 class Jetpack_JSON_API_Core_Endpoint extends Jetpack_JSON_API_Endpoint {
16
17 /**
18 * Needed capabilities.
19 *
20 * @var string
21 */
22 protected $needed_capabilities = 'manage_options';
23
24 /**
25 * New version.
26 *
27 * @var string
28 */
29 protected $new_version;
30
31 /**
32 * An array of log strings.
33 *
34 * @var array
35 */
36 protected $log;
37
38 /**
39 * Return the result of the wp_version.
40 *
41 * @return array
42 */
43 public function result() {
44 global $wp_version;
45
46 return array(
47 'version' => ( empty( $this->new_version ) ) ? $wp_version : $this->new_version,
48 'autoupdate' => Jetpack_Options::get_option( 'autoupdate_core', false ),
49 'log' => $this->log,
50 );
51 }
52 }
53