Changeset 42343 for trunk/src/wp-admin/includes/credits.php
- Timestamp:
- 11/30/2017 11:09:33 PM (8 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/includes/credits.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/credits.php
r41688 r42343 27 27 || ( isset( $results['data']['version'] ) && strpos( $wp_version, $results['data']['version'] ) !== 0 ) 28 28 ) { 29 $url = "http://api.wordpress.org/core/credits/1.1/?version={$wp_version}&locale={$locale}";29 $url = "http://api.wordpress.org/core/credits/1.1/?version={$wp_version}&locale={$locale}"; 30 30 $options = array( 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url( '/' ) ); 31 31 … … 36 36 $response = wp_remote_get( $url, $options ); 37 37 38 if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) 38 if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) { 39 39 return false; 40 } 40 41 41 42 $results = json_decode( wp_remote_retrieve_body( $response ), true ); 42 43 43 if ( ! is_array( $results ) ) 44 if ( ! is_array( $results ) ) { 44 45 return false; 46 } 45 47 46 48 set_site_transient( 'wordpress_credits_' . $locale, $results, DAY_IN_SECONDS );
Note: See TracChangeset
for help on using the changeset viewer.