Ticket #33932: patch.7.diff
File patch.7.diff, 2.1 KB (added by , 8 years ago) |
---|
-
wp-admin/includes/class-wp-upgrader.php
3483 3483 3484 3484 // Plugins, Themes, Translations 3485 3485 foreach ( array( 'plugin', 'theme', 'translation' ) as $type ) { 3486 if ( ! isset( $this->update_results[ $type ] ) ) 3487 continue; 3486 3487 /** 3488 * Filter to disable notification emails on plugins/themes/translation. 3489 * 3490 * By default, administrators are notified when the update offer received 3491 * from WordPress.org sets a particular flag. This allows some discretion 3492 * in if and when to notify. This can be used to disabe automatic 3493 * update notifications. 3494 * 3495 * This filter is only evaluated once per update 3496 *. 3497 * 3498 * @since 4.6.0 3499 * 3500 * @param bool $notify Whether the site administrator is notified. 3501 * @param string $type The type of update (plugin, theme, translation). 3502 * @param object $this WP_Automatic_Updater instance 3503 */ 3504 if ( ! apply_filters( 'send_update_notification_email', true, $type, $this ) ) { 3505 if ( isset( $this->update_results[ $type ] ) ) { 3506 unset( $this->update_results[ $type ] ); 3507 } 3508 } 3509 3510 if ( ! isset( $this->update_results[ $type ] ) ) 3511 continue; 3512 3488 3513 $success_items = wp_list_filter( $this->update_results[ $type ], array( 'result' => true ) ); 3489 3514 if ( $success_items ) { 3490 3515 $messages = array( … … 3517 3542 $body[] = ''; 3518 3543 } 3519 3544 3545 if ( empty( $this->update_results ) ) { 3546 return; 3547 } 3548 3520 3549 $site_title = wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ); 3521 3550 if ( $failures ) { 3522 3551 $body[] = trim( __( … … 3545 3574 foreach ( array( 'core', 'plugin', 'theme', 'translation' ) as $type ) { 3546 3575 if ( ! isset( $this->update_results[ $type ] ) ) 3547 3576 continue; 3577 3548 3578 foreach ( $this->update_results[ $type ] as $update ) { 3549 3579 $body[] = $update->name; 3550 3580 $body[] = str_repeat( '-', strlen( $update->name ) );