auto_theme_update_send_email
Filters whether to send an email following an automatic background theme update.
Использование
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(массив)
- The results of theme update tasks.
Список изменений
С версии 5.5.0 | Введена. |
С версии 5.5.1 | Added the $update_results parameter. |
Где вызывается хук
auto_theme_update_send_email
wp-admin/includes/class-wp-automatic-updater.php 1024
$notifications_enabled = apply_filters( 'auto_theme_update_send_email', true, $update_results['theme'] );