X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/b22765f41bf0b2021b9beb9120ee0ac91fa89292..e3ff8f35458a959c1879c0a4976701ed8dcfe651:/wp-includes/update.php
diff --git a/wp-includes/update.php b/wp-includes/update.php
index 59b618c3..f0b999a4 100644
--- a/wp-includes/update.php
+++ b/wp-includes/update.php
@@ -120,7 +120,14 @@ function wp_version_check( $extra_stats = array(), $force_check = false ) {
$response = wp_remote_post( $url, $options );
if ( $ssl && is_wp_error( $response ) ) {
- trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE );
+ trigger_error(
+ sprintf(
+ /* translators: %s: support forums URL */
+ __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ),
+ __( 'https://wordpress.org/support/' )
+ ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ),
+ headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE
+ );
$response = wp_remote_post( $http_url, $options );
}
@@ -303,7 +310,14 @@ function wp_update_plugins( $extra_stats = array() ) {
$raw_response = wp_remote_post( $url, $options );
if ( $ssl && is_wp_error( $raw_response ) ) {
- trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE );
+ trigger_error(
+ sprintf(
+ /* translators: %s: support forums URL */
+ __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ),
+ __( 'https://wordpress.org/support/' )
+ ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ),
+ headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE
+ );
$raw_response = wp_remote_post( $http_url, $options );
}
@@ -476,7 +490,14 @@ function wp_update_themes( $extra_stats = array() ) {
$raw_response = wp_remote_post( $url, $options );
if ( $ssl && is_wp_error( $raw_response ) ) {
- trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE );
+ trigger_error(
+ sprintf(
+ /* translators: %s: support forums URL */
+ __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ),
+ __( 'https://wordpress.org/support/' )
+ ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ),
+ headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE
+ );
$raw_response = wp_remote_post( $http_url, $options );
}
@@ -566,14 +587,21 @@ function wp_get_update_data() {
$counts['total'] = $counts['plugins'] + $counts['themes'] + $counts['wordpress'] + $counts['translations'];
$titles = array();
- if ( $counts['wordpress'] )
+ if ( $counts['wordpress'] ) {
+ /* translators: 1: Number of updates available to WordPress */
$titles['wordpress'] = sprintf( __( '%d WordPress Update'), $counts['wordpress'] );
- if ( $counts['plugins'] )
+ }
+ if ( $counts['plugins'] ) {
+ /* translators: 1: Number of updates available to plugins */
$titles['plugins'] = sprintf( _n( '%d Plugin Update', '%d Plugin Updates', $counts['plugins'] ), $counts['plugins'] );
- if ( $counts['themes'] )
+ }
+ if ( $counts['themes'] ) {
+ /* translators: 1: Number of updates available to themes */
$titles['themes'] = sprintf( _n( '%d Theme Update', '%d Theme Updates', $counts['themes'] ), $counts['themes'] );
- if ( $counts['translations'] )
+ }
+ if ( $counts['translations'] ) {
$titles['translations'] = __( 'Translation Updates' );
+ }
$update_title = $titles ? esc_attr( implode( ', ', $titles ) ) : '';
@@ -678,7 +706,7 @@ function wp_clean_update_cache() {
delete_site_transient( 'update_core' );
}
-if ( ( ! is_main_site() && ! is_network_admin() ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
+if ( ( ! is_main_site() && ! is_network_admin() ) || wp_doing_ajax() ) {
return;
}