Make WordPress Core

Ticket #33932: patch.3.diff

File patch.3.diff, 1.2 KB (added by ronalfy, 9 years ago)

One Filter to Rule Them All

  • class-wp-upgrader.php

     
    33573357
    33583358                // Plugins, Themes, Translations
    33593359                foreach ( array( 'plugin', 'theme', 'translation' ) as $type ) {
     3360               
     3361            /**
     3362            * Filter to receive notification emails on plugins/themes/translators.
     3363            *
     3364            * By default, administrators are notified when the update offer received
     3365            * from WordPress.org sets a particular flag. This allows some discretion
     3366            * in if and when to notify.
     3367            *
     3368            * This filter is only evaluated once per plugin update
     3369            *.
     3370            *
     3371            * @since 4.4.0
     3372            *
     3373            * @param bool   $notify Whether the site administrator is notified.
     3374            * @param string $type   The type of update (plugin, theme, translation).
     3375            */
     3376                if ( !apply_filters( 'send_update_notification_email', true, $type ) ) {
     3377                        return;
     3378            }
    33603379                        if ( ! isset( $this->update_results[ $type ] ) )
    33613380                                continue;
    33623381                        $success_items = wp_list_filter( $this->update_results[ $type ], array( 'result' => true ) );