auto_theme_update_send_email
Filters whether to send an email following an automatic background theme update.
Usage
add_filter( 'auto_theme_update_send_email', 'wp_kama_auto_theme_update_send_email_filter', 10, 2 ); /** * Function for `auto_theme_update_send_email` filter-hook. * * @param bool $enabled True if theme update notifications are enabled, false otherwise. * @param array $update_results The results of theme update tasks. * * @return bool */ function wp_kama_auto_theme_update_send_email_filter( $enabled, $update_results ){ // filter... return $enabled; }
- $enabled(true|false)
- True if theme update notifications are enabled, false otherwise.
- $update_results(array)
- The results of theme update tasks.
Changelog
Since 5.5.0 | Introduced. |
Since 5.5.1 | Added the $update_results parameter. |
Where the hook is called
auto_theme_update_send_email
wp-admin/includes/class-wp-automatic-updater.php 1189
$notifications_enabled = apply_filters( 'auto_theme_update_send_email', true, $update_results['theme'] );