Update WP and plugins
This commit is contained in:
parent
10a4713229
commit
1fb77fc4ff
864 changed files with 101724 additions and 78262 deletions
|
@ -26,7 +26,7 @@ function wp_credits() {
|
|||
|| false !== strpos( $wp_version, '-' )
|
||||
|| ( isset( $results['data']['version'] ) && strpos( $wp_version, $results['data']['version'] ) !== 0 )
|
||||
) {
|
||||
$url = "http://api.wordpress.org/core/credits/1.1/?version={$wp_version}&locale={$locale}";
|
||||
$url = "http://api.wordpress.org/core/credits/1.1/?version={$wp_version}&locale={$locale}";
|
||||
$options = array( 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url( '/' ) );
|
||||
|
||||
if ( wp_http_supports( array( 'ssl' ) ) ) {
|
||||
|
@ -35,13 +35,15 @@ function wp_credits() {
|
|||
|
||||
$response = wp_remote_get( $url, $options );
|
||||
|
||||
if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) )
|
||||
if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$results = json_decode( wp_remote_retrieve_body( $response ), true );
|
||||
|
||||
if ( ! is_array( $results ) )
|
||||
if ( ! is_array( $results ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
set_site_transient( 'wordpress_credits_' . $locale, $results, DAY_IN_SECONDS );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue