Changeset 25514
- Timestamp:
- 09/20/2013 05:54:41 AM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/update.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/update.php
r25466 r25514 197 197 set_site_transient( 'update_plugins', $current ); 198 198 199 $to_send = (object) compact('plugins', 'active');199 $to_send = compact( 'plugins', 'active' ); 200 200 201 201 $options = array( 202 202 'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3), 203 'body' => array( 'plugins' => serialize( $to_send ) ),203 'body' => array( 'plugins' => json_encode( $to_send ) ), 204 204 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) 205 205 ); … … 217 217 218 218 if ( is_object( $response ) ) 219 $new_option->response = (array) $response ;219 $new_option->response = (array) $response->plugins; 220 220 else 221 221 $new_option->response = array(); … … 248 248 $last_update = new stdClass; 249 249 250 $themes = array(); 251 $checked = array(); 250 $themes = $checked = $request = array(); 252 251 253 252 // Put slug of current theme into request. 254 $ themes['current_theme'] = get_option( 'stylesheet' );253 $request['active'] = get_option( 'stylesheet' ); 255 254 256 255 foreach ( $installed_themes as $theme ) { … … 308 307 set_site_transient( 'update_themes', $last_update ); 309 308 309 $request['themes'] = $themes; 310 310 311 $options = array( 311 312 'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3), 312 'body' => array( 'themes' => serialize( $themes) ),313 'body' => array( 'themes' => json_encode( $request ) ), 313 314 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) 314 315 ); … … 328 329 329 330 $response = json_decode( wp_remote_retrieve_body( $raw_response ), true ); 331 330 332 if ( is_array( $response ) ) 331 $new_update->response = $response ;333 $new_update->response = $response['themes']; 332 334 333 335 set_site_transient( 'update_themes', $new_update );
Note: See TracChangeset
for help on using the changeset viewer.