| @@ -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 ) { |