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

Jetpack_JSON_API_Translations_Endpoint   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 17
rs 10
c 0
b 0
f 0
wmc 1
lcom 1
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A result() 0 8 1
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