Standardise on performing api.WordPress.org requests over SSL when possible, falling back to non-SSL when appropriate.
This also standardises the `User-Agent` used when communicating with WordPress.org, allowing for more consistent version detection. Fixes #42004. Built from https://develop.svn.wordpress.org/trunk@41605 git-svn-id: http://core.svn.wordpress.org/trunk@41440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -301,7 +301,7 @@ function wp_update_plugins( $extra_stats = array() ) {
|
||||
'locale' => wp_json_encode( $locales ),
|
||||
'all' => wp_json_encode( true ),
|
||||
),
|
||||
'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )
|
||||
'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url( '/' )
|
||||
);
|
||||
|
||||
if ( $extra_stats ) {
|
||||
@@ -479,7 +479,7 @@ function wp_update_themes( $extra_stats = array() ) {
|
||||
'translations' => wp_json_encode( $translations ),
|
||||
'locale' => wp_json_encode( $locales ),
|
||||
),
|
||||
'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )
|
||||
'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url( '/' )
|
||||
);
|
||||
|
||||
if ( $extra_stats ) {
|
||||
|
||||
Reference in New Issue
Block a user