Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: auto_plugin_update_send_email

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
924                /**
925                 * Filters whether to send an email following an automatic background plugin update.
926                 *
927                 * @since 5.5.0
928                 * @since 5.5.1 Added the `$update_results` parameter.
929                 *
930                 * @param bool  $enabled        True if plugin update notifications are enabled, false otherwise.
931                 * @param array $update_results The results of plugins update tasks.
932                 */
933                $notifications_enabled = apply_filters( 'auto_plugin_update_send_email', true, $update_results['plugin'] );
934
935                if ( $notifications_enabled ) {
936                     foreach ( $update_results['plugin'] as $update_result ) {
937                          if ( true === $update_result->result ) {
938                               $successful_updates['plugin'][] = $update_result;
939                          } else {
940                               $failed_updates['plugin'][] = $update_result;
941                          }
942                     }