summaryrefslogtreecommitdiffstats
path: root/wp-admin/includes/update.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-admin/includes/update.php')
-rw-r--r--wp-admin/includes/update.php49
1 files changed, 8 insertions, 41 deletions
diff --git a/wp-admin/includes/update.php b/wp-admin/includes/update.php
index ba27ddd..312289f 100644
--- a/wp-admin/includes/update.php
+++ b/wp-admin/includes/update.php
@@ -145,7 +145,8 @@ function get_core_checksums( $version, $locale ) {
$response = wp_remote_get( $url, $options );
if ( $ssl && is_wp_error( $response ) ) {
- trigger_error(
+ wp_trigger_error(
+ __FUNCTION__,
sprintf(
/* translators: %s: Support forums URL. */
__( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ),
@@ -923,48 +924,14 @@ function wp_print_admin_notice_templates() {
<div <# if ( data.id ) { #>id="{{ data.id }}"<# } #> class="notice {{ data.className }}"><p>{{{ data.message }}}</p></div>
</script>
<script id="tmpl-wp-bulk-updates-admin-notice" type="text/html">
- <div id="{{ data.id }}" class="{{ data.className }} notice <# if ( data.errors ) { #>notice-error<# } else { #>notice-success<# } #>">
+ <div id="{{ data.id }}" class="{{ data.className }} notice <# if ( data.errorMessage ) { #>notice-error<# } else { #>notice-success<# } #>">
<p>
- <# if ( data.successes ) { #>
- <# if ( 1 === data.successes ) { #>
- <# if ( 'plugin' === data.type ) { #>
- <?php
- /* translators: %s: Number of plugins. */
- printf( __( '%s plugin successfully updated.' ), '{{ data.successes }}' );
- ?>
- <# } else { #>
- <?php
- /* translators: %s: Number of themes. */
- printf( __( '%s theme successfully updated.' ), '{{ data.successes }}' );
- ?>
- <# } #>
- <# } else { #>
- <# if ( 'plugin' === data.type ) { #>
- <?php
- /* translators: %s: Number of plugins. */
- printf( __( '%s plugins successfully updated.' ), '{{ data.successes }}' );
- ?>
- <# } else { #>
- <?php
- /* translators: %s: Number of themes. */
- printf( __( '%s themes successfully updated.' ), '{{ data.successes }}' );
- ?>
- <# } #>
- <# } #>
+ <# if ( data.successMessage ) { #>
+ {{{ data.successMessage }}}
<# } #>
- <# if ( data.errors ) { #>
+ <# if ( data.errorMessage ) { #>
<button class="button-link bulk-action-errors-collapsed" aria-expanded="false">
- <# if ( 1 === data.errors ) { #>
- <?php
- /* translators: %s: Number of failed updates. */
- printf( __( '%s update failed.' ), '{{ data.errors }}' );
- ?>
- <# } else { #>
- <?php
- /* translators: %s: Number of failed updates. */
- printf( __( '%s updates failed.' ), '{{ data.errors }}' );
- ?>
- <# } #>
+ {{{ data.errorMessage }}}
<span class="screen-reader-text">
<?php
/* translators: Hidden accessibility text. */
@@ -975,7 +942,7 @@ function wp_print_admin_notice_templates() {
</button>
<# } #>
</p>
- <# if ( data.errors ) { #>
+ <# if ( data.errorMessages ) { #>
<ul class="bulk-action-errors hidden">
<# _.each( data.errorMessages, function( errorMessage ) { #>
<li>{{ errorMessage }}</li>