PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 12.3.2
Jetpack – WP Security, Backup, Speed, & Growth v12.3.2
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-translations-endpoint.php

class.jetpack-json-api-translations-endpoint.php in Jetpack – WP Security, Backup, Speed, & Growth 12.3.2, at json-endpoints/jetpack/class.jetpack-json-api-translations-endpoint.php

46 lines 886 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 /**
4 * Translations endpoint class.
5 *
6 * GET /sites/%s/translations
7 * POST /sites/%s/translations
8 * POST /sites/%s/translations/update
9 */
10 class Jetpack_JSON_API_Translations_Endpoint extends Jetpack_JSON_API_Endpoint {
11 /**
12 * Needed capabilities.
13 *
14 * @var array
15 */
16 protected $needed_capabilities = array( 'update_core', 'update_plugins', 'update_themes' );
17
18 /**
19 * The log.
20 *
21 * @var array
22 */
23 protected $log;
24
25 /**
26 * If we're successful.
27 *
28 * @var bool
29 */
30 protected $success;
31
32 /**
33 * API Endpoint.
34 *
35 * @return array
36 */
37 public function result() {
38 return array(
39 'translations' => wp_get_translation_updates(),
40 'autoupdate' => Jetpack_Options::get_option( 'autoupdate_translations', false ),
41 'log' => $this->log,
42 'success' => $this->success,
43 );
44 }
45 }
46