Page MenuHomeDevCentral

Configure automatic updates for Wordpress

Authored By
dereckson
Feb 6 2017, 12:07
Size
1 KB
Referenced Files
None
Subscribers
None

Configure automatic updates for Wordpress

<?php
/**
* Plugin Name: Extra settings for dereckson.be
* Description: Adds extra settings to this WordPress installation
* Version: 0.1
* Author: Dereckson
* Author URI: https://www.dereckson.be/
* License: PD
*/
add_filter('automatic_updates_send_debug_email', '__return_false');
add_filter('auto_core_update_send_email', 'auto_core_update_send_email_callback');
add_filter('automatic_updates_is_vcs_checkout', '__return_false', 1);
/**
* Determines when to send en e-mail fore core update (only on failure)
*
* @param bool $send Whether to send the email. Default true.
* @param string $type The type of email to send.
* Can be one of 'success', 'fail', 'critical'.
* @param object $core_update The update offer that was attempted.
* @param mixed $result The result for the core update. Can be WP_Error.
*
* @return bool true if a mail should be sent; otherwise, false.
*/
function auto_core_update_send_email_callback ($send, $type, $core_update, $result) {
return $send && ($type !== 'success');
}

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
79889
Default Alt Text
Configure automatic updates for Wordpress (1 KB)

Event Timeline