diff --git a/wp-admin/includes/network.php b/wp-admin/includes/network.php
index fb3d8d2786..8a58657bd0 100644
a
|
b
|
define( 'BLOG_ID_CURRENT_SITE', 1 ); |
554 | 554 | |
555 | 555 | if ( ! empty( $keys_salts ) ) { |
556 | 556 | $keys_salts_str = ''; |
557 | | $from_api = wp_remote_get( 'https://api.wordpress.org/secret-key/1.1/salt/' ); |
| 557 | $from_api = wp_remote_get( WP_UPDATE_API_BASE . '/secret-key/1.1/salt/' ); |
558 | 558 | if ( is_wp_error( $from_api ) ) { |
559 | 559 | foreach ( $keys_salts as $c => $v ) { |
560 | 560 | $keys_salts_str .= "\ndefine( '$c', '" . wp_generate_password( 64, true, true ) . "' );"; |
diff --git a/wp-admin/includes/plugin-install.php b/wp-admin/includes/plugin-install.php
index 04287736bc..3b8204ade4 100644
a
|
b
|
function plugins_api( $action, $args = array() ) { |
146 | 146 | |
147 | 147 | if ( false === $res ) { |
148 | 148 | |
149 | | $url = 'http://api.wordpress.org/plugins/info/1.2/'; |
| 149 | $url = WP_UPDATE_API_BASE . '/plugins/info/1.2/'; |
150 | 150 | $url = add_query_arg( |
151 | 151 | array( |
152 | 152 | 'action' => $action, |
diff --git a/wp-admin/includes/theme.php b/wp-admin/includes/theme.php
index 8fc9c00f14..3caf1edf40 100644
a
|
b
|
function themes_api( $action, $args = array() ) { |
542 | 542 | $res = apply_filters( 'themes_api', false, $action, $args ); |
543 | 543 | |
544 | 544 | if ( ! $res ) { |
545 | | $url = 'http://api.wordpress.org/themes/info/1.2/'; |
| 545 | $url = WP_UPDATE_API_BASE . '/themes/info/1.2/'; |
546 | 546 | $url = add_query_arg( |
547 | 547 | array( |
548 | 548 | 'action' => $action, |
diff --git a/wp-admin/includes/update.php b/wp-admin/includes/update.php
index 629c1be1cc..137968130a 100644
a
|
b
|
function find_core_auto_update() { |
129 | 129 | * @return array|false An array of checksums on success, false on failure. |
130 | 130 | */ |
131 | 131 | function get_core_checksums( $version, $locale ) { |
132 | | $http_url = 'http://api.wordpress.org/core/checksums/1.0/?' . http_build_query( compact( 'version', 'locale' ), '', '&' ); |
| 132 | $http_url = WP_UPDATE_API_BASE . '/core/checksums/1.0/?' . http_build_query( compact( 'version', 'locale' ), '', '&' ); |
133 | 133 | $url = $http_url; |
134 | 134 | |
135 | 135 | $ssl = wp_http_supports( array( 'ssl' ) ); |
diff --git a/wp-includes/default-constants.php b/wp-includes/default-constants.php
index acfc878fb7..ba0041cdf9 100644
a
|
b
|
function wp_initial_constants() { |
114 | 114 | define( 'WP_CACHE', false ); |
115 | 115 | } |
116 | 116 | |
| 117 | if ( ! defined( 'WP_UPDATE_API_BASE' ) ) { |
| 118 | define( 'WP_UPDATE_API_BASE', 'https://api.wordpress.org' ); |
| 119 | } |
| 120 | |
117 | 121 | /* |
118 | 122 | * Add define( 'SCRIPT_DEBUG', true ); to wp-config.php to enable loading of non-minified, |
119 | 123 | * non-concatenated scripts and stylesheets. |
diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php
index 3345ea0aa1..109a98192d 100644
a
|
b
|
class WP_REST_Pattern_Directory_Controller extends WP_REST_Controller { |
114 | 114 | $raw_patterns = get_site_transient( $transient_key ); |
115 | 115 | |
116 | 116 | if ( ! $raw_patterns ) { |
117 | | $api_url = 'http://api.wordpress.org/patterns/1.0/?' . build_query( $query_args ); |
| 117 | $api_url = WP_UPDATE_API_BASE . '/patterns/1.0/?' . build_query( $query_args ); |
118 | 118 | if ( wp_http_supports( array( 'ssl' ) ) ) { |
119 | 119 | $api_url = set_url_scheme( $api_url, 'https' ); |
120 | 120 | } |
diff --git a/wp-includes/update.php b/wp-includes/update.php
index 572f7ee4c6..0df19447fd 100644
a
|
b
|
function wp_version_check( $extra_stats = array(), $force_check = false ) { |
181 | 181 | $query['channel'] = WP_AUTO_UPDATE_CORE; |
182 | 182 | } |
183 | 183 | |
184 | | $url = 'http://api.wordpress.org/core/version-check/1.7/?' . http_build_query( $query, '', '&' ); |
| 184 | $url = WP_UPDATE_API_BASE . '/core/version-check/1.7/?' . http_build_query( $query, '', '&' ); |
185 | 185 | $http_url = $url; |
186 | 186 | $ssl = wp_http_supports( array( 'ssl' ) ); |
187 | 187 | |
… |
… |
function wp_update_plugins( $extra_stats = array() ) { |
429 | 429 | $options['body']['update_stats'] = wp_json_encode( $extra_stats ); |
430 | 430 | } |
431 | 431 | |
432 | | $url = 'http://api.wordpress.org/plugins/update-check/1.1/'; |
| 432 | $url = WP_UPDATE_API_BASE . '/plugins/update-check/1.1/'; |
433 | 433 | $http_url = $url; |
434 | 434 | $ssl = wp_http_supports( array( 'ssl' ) ); |
435 | 435 | |
… |
… |
function wp_update_themes( $extra_stats = array() ) { |
708 | 708 | $options['body']['update_stats'] = wp_json_encode( $extra_stats ); |
709 | 709 | } |
710 | 710 | |
711 | | $url = 'http://api.wordpress.org/themes/update-check/1.1/'; |
| 711 | $url = WP_UPDATE_API_BASE . '/themes/update-check/1.1/'; |
712 | 712 | $http_url = $url; |
713 | 713 | $ssl = wp_http_supports( array( 'ssl' ) ); |
714 | 714 | |