json-endpoints/jetpack/class.jetpack-json-api-themes-endpoint.php 1 location
|
@@ 31-41 (lines=11) @@
|
| 28 |
|
'autoupdate_translation' => '(bool) Whether the theme is automatically updating translations', |
| 29 |
|
); |
| 30 |
|
|
| 31 |
|
protected function result() { |
| 32 |
|
|
| 33 |
|
$themes = $this->get_themes(); |
| 34 |
|
|
| 35 |
|
if ( ! $this->bulk && ! empty( $themes ) ) { |
| 36 |
|
return array_pop( $themes ); |
| 37 |
|
} |
| 38 |
|
|
| 39 |
|
return array( 'themes' => $themes ); |
| 40 |
|
|
| 41 |
|
} |
| 42 |
|
|
| 43 |
|
/** |
| 44 |
|
* Walks through either the submitted theme or list of themes and creates the global array |
json-endpoints/jetpack/class.jetpack-json-api-plugins-endpoint.php 1 location
|
@@ 54-64 (lines=11) @@
|
| 51 |
|
'log' => '(array:safehtml) An array of update log strings.', |
| 52 |
|
); |
| 53 |
|
|
| 54 |
|
protected function result() { |
| 55 |
|
|
| 56 |
|
$plugins = $this->get_plugins(); |
| 57 |
|
|
| 58 |
|
if ( ! $this->bulk && ! empty( $plugins ) ) { |
| 59 |
|
return array_pop( $plugins ); |
| 60 |
|
} |
| 61 |
|
|
| 62 |
|
return array( 'plugins' => $plugins ); |
| 63 |
|
|
| 64 |
|
} |
| 65 |
|
|
| 66 |
|
protected function validate_input( $plugin ) { |
| 67 |
|
|