PluginProbe
FlyWP Helper – Page Cache, Page Optimization, Emails for FlyWP Server Control Panel / 1.8.0
FlyWP Helper – Page Cache, Page Optimization, Emails for FlyWP Server Control Panel v1.8.0
1.8.0 1.7.1 1.7.0 1.6.0 1.5.2 trunk 0.1 0.2.0 0.2.1 0.3 0.3.1 0.3.2 0.3.3 0.3.4 0.4 0.4.1 0.4.2 0.4.3 1.0 1.1 1.2 1.3.1 1.4.0 1.4.1 1.5.0 All 27 releases
← All changes | includes/Api/Themes.php +6 -1 0.3.2 → 1.8.0 View file →
@@ -18,8 +18,13 @@
18 18 */
19 19 public function respond( $args ) {
20 20 $response = [];
21 21
22 + // Update the update cache if requested.
23 + if ( isset( $args['force'] ) && $args['force'] === 'true' ) {
24 + wp_update_themes();
25 + }
26 +
22 27 $themes = wp_get_themes();
23 28 $updates = get_site_transient( 'update_themes' );
24 29
25 30 foreach ( $themes as $key => $theme ) {
@@ -33,9 +38,9 @@
33 38 'author' => $theme->get( 'Author' ),
34 39 'author_uri' => $theme->get( 'AuthorURI' ),
35 40 'status' => $this->get_status( $theme ),
36 41 'update_available' => $update ? true : false,
37 - 'new_version' => $update ? $update['new_version'] : null,
42 + 'new_version' => $update && isset( $update['new_version'] ) ? $update['new_version'] : null,
38 43 ];
39 44 }
40 45
41 46 wp_send_json( $response );