mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 16:21:26 +01:00
Fix E_STRICT notice in wp_get_popular_importers(). see #24356.
git-svn-id: http://core.svn.wordpress.org/trunk@24378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4b13a1ffa4
commit
b13b659365
@ -110,7 +110,8 @@ function wp_get_popular_importers() {
|
|||||||
if ( ! $popular_importers ) {
|
if ( ! $popular_importers ) {
|
||||||
$url = add_query_arg( 'locale', get_locale(), 'http://api.wordpress.org/core/importers/1.0/' );
|
$url = add_query_arg( 'locale', get_locale(), 'http://api.wordpress.org/core/importers/1.0/' );
|
||||||
$options = array( 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url() );
|
$options = array( 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url() );
|
||||||
$popular_importers = maybe_unserialize( wp_remote_retrieve_body( wp_remote_get( $url, $options ) ) );
|
$response = wp_remote_get( $url, $options );
|
||||||
|
$popular_importers = maybe_unserialize( wp_remote_retrieve_body( $response ) );
|
||||||
|
|
||||||
if ( is_array( $popular_importers ) )
|
if ( is_array( $popular_importers ) )
|
||||||
set_site_transient( 'popular_importers_' . $locale, $popular_importers, 2 * DAY_IN_SECONDS );
|
set_site_transient( 'popular_importers_' . $locale, $popular_importers, 2 * DAY_IN_SECONDS );
|
||||||
|
Loading…
Reference in New Issue
Block a user