Completed
Push — update/remove-disconnect-link ( 4b6a2c )
by
unknown
73:18 queued 63:47
created

Jetpack_JSON_API_Translations_Endpoint::result()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
// Translations
4
class Jetpack_JSON_API_Translations_Endpoint extends Jetpack_JSON_API_Endpoint {
5
	// GET /sites/%s/translations
6
	// POST /sites/%s/translations
7
	// POST /sites/%s/translations/update
8
	protected $needed_capabilities = array( 'update_core', 'update_plugins', 'update_themes' );
9
	protected $log;
10
	protected $success;
11
12
	public function result() {
13
		return array(
14
			'translations'  => wp_get_translation_updates(),
15
			'autoupdate'    => Jetpack_Options::get_option( 'autoupdate_translations', false ),
16
			'log'           => $this->log,
17
			'success'       => $this->success,
18
		);
19
	}
20
}
21