WordPress.org

Make WordPress Core

Changeset 25542


Ignore:
Timestamp:
09/21/2013 06:59:25 AM (5 years ago)
Author:
dd32
Message:

WordPress Core Automatic Updates: Add a filter as to whether or not to send the site administrator a summary of executed updates. Props JustinSainton. See #22704

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-upgrader.php

    r25540 r25542  
    15091509        wp_update_plugins(); // Check for Plugin updates
    15101510
    1511         self::send_email();
     1511        /**
     1512         * Filter whether to email an update summary to the site administrator.
     1513         *
     1514         * @since 3.7.0
     1515         *
     1516         * @param bool                        Whether or not email should be sent to administrator. Default true.
     1517         * @param bool|array $core_update     An array of core update data, false otherwise.
     1518         * @param object     $theme_updates   Object containing theme update properties.
     1519         * @param object     $plugin_updates  Object containing plugin update properties.
     1520         * @param array      $upgrade_results An array of the upgrade results keyed by upgrade type, and plugin/theme slug
     1521         */
     1522        if ( apply_filters( 'enable_auto_upgrade_email', true, $core_update, $theme_updates, $plugin_updates, self::$upgrade_results ) )
     1523            self::send_email();
    15121524
    15131525        // Clear the lock
     
    15911603            get_site_option( 'admin_email' ),
    15921604            $subject,
    1593             implode( "\n", $body ) 
     1605            implode( "\n", $body )
    15941606        );
    15951607    }
Note: See TracChangeset for help on using the changeset viewer.