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
← All changes | json-endpoints/jetpack/class.jetpack-json-api-themes-modify-endpoint.php +8 -1 12.0.3 → 16.3-a.7 View file →
@@ -1,10 +1,16 @@
1 1 <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
2 2
3 +if ( ! defined( 'ABSPATH' ) ) {
4 + exit( 0 );
5 +}
6 +
3 7 /**
4 8 * Themes modify endpoint class.
5 9 * POST /sites/%s/themes/%s
6 10 * POST /sites/%s/themes
11 + *
12 + * @phan-constructor-used-for-side-effects
7 13 */
8 14 class Jetpack_JSON_API_Themes_Modify_Endpoint extends Jetpack_JSON_API_Themes_Endpoint {
9 15
10 16 /**
@@ -99,8 +105,9 @@
99 105
100 106 // Clear the cache.
101 107 wp_update_themes();
102 108
109 + $result = null;
103 110 foreach ( $this->themes as $theme ) {
104 111 /**
105 112 * Pre-upgrade action
106 113 *
@@ -141,8 +148,9 @@
141 148 if ( ! isset( $available_themes_updates->translations ) || empty( $available_themes_updates->translations ) ) {
142 149 return new WP_Error( 'nothing_to_translate' );
143 150 }
144 151
152 + $result = null;
145 153 foreach ( $available_themes_updates->translations as $translation ) {
146 154 $theme = $translation['slug'];
147 155 if ( ! in_array( $translation['slug'], $this->themes, true ) ) {
148 156 $this->log[ $theme ][] = __( 'No update needed', 'jetpack' );
@@ -172,6 +180,5 @@
172 180 }
173 181
174 182 return true;
175 183 }
176 -
177 184 }