apply_filters( 'auto_theme_update_send_email', bool $enabled, array $update_results )
- Since
- 5.5.0, 5.5.1
Filters whether to send an email following an automatic background theme update.
Compatibility
- WordPress
- since 5.5.1
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$enabledbool- True if theme update notifications are enabled, false otherwise.
$update_resultsarray- The results of theme update tasks.
Where this hook fires · 1
wp-admin/includes/class-wp-automatic-updater.php:1200WP_Automatic_Updater::after_plugin_theme_update()
Source code
* @since 5.5.0 * @since 5.5.1 Added the `$update_results` parameter. * * @param bool $enabled True if theme update notifications are enabled, false otherwise. * @param array $update_results The results of theme update tasks. */ $notifications_enabled = apply_filters( 'auto_theme_update_send_email', true, $update_results['theme'] ); if ( $notifications_enabled ) { foreach ( $update_results['theme'] as $update_result ) { if ( true === $update_result->result ) { $successful_updates['theme'][] = $update_result; } else {Changelog
Introduced in 5.5.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
5.5.1
Added the
$update_results parameter.from the docblock5.5.0
Introduced.from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 6.8.8 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.