auto_plugin_update_send_email
Filters whether to send an email following an automatic background plugin update.
Использование
add_filter( 'auto_plugin_update_send_email', 'wp_kama_auto_plugin_update_send_email_filter', 10, 2 ); /** * Function for `auto_plugin_update_send_email` filter-hook. * * @param bool $enabled True if plugin update notifications are enabled, false otherwise. * @param array $update_results The results of plugins update tasks. * * @return bool */ function wp_kama_auto_plugin_update_send_email_filter( $enabled, $update_results ){ // filter... return $enabled; }
- $enabled(true|false)
- True if plugin update notifications are enabled, false otherwise.
- $update_results(массив)
- The results of plugins update tasks.
Список изменений
С версии 5.5.0 | Введена. |
С версии 5.5.1 | Added the $update_results parameter. |
Где вызывается хук
auto_plugin_update_send_email
wp-admin/includes/class-wp-automatic-updater.php 1001
$notifications_enabled = apply_filters( 'auto_plugin_update_send_email', true, $update_results['plugin'] );