mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 20:54:29 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@41605 602fd350-edb4-49c9-b593-d223f7449a82
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