-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathunmus_update.php
64 lines (51 loc) · 1.35 KB
/
unmus_update.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/**
* WordPress Updates
*
* @package unmus
* @since 0.2
*/
// Security: Stops code execution if WordPress is not loaded
if (!defined('ABSPATH')) { exit; }
/**
* Run WordPress Updates automaticly?
*
* @return bool
*/
function unmus_wordpress_update() {
$unmus_wordpress_update=get_option('unmus_wordpress_update_auto');
return $unmus_wordpress_update;
}
add_filter( 'auto_update_core', 'unmus_wordpress_update' );
/**
* Run Plugin Updates automaticly?
*
* @return bool
*/
function unmus_plugins_update() {
$unmus_plugins_update=get_option('unmus_plugins_update_auto');
return $unmus_plugins_update;
}
add_filter( 'auto_update_plugin', 'unmus_plugins_update' );
/**
* Run Theme Updates automaticly?
*
* @return bool
*/
function unmus_themes_update() {
$unmus_themes_update=get_option('unmus_themes_update_auto');
return $unmus_themes_update;
}
add_filter( 'auto_update_plugin', 'unmus_themes_update' );
/**
* Disable eMail Notification after Update
*
* @since 0.6
*/
// Disable core auto-update email notifications.
add_filter( 'auto_core_update_send_email', '__return_false' );
// Disable plugins auto-update email notifications.
add_filter( 'auto_plugin_update_send_email', '__return_false' );
// Disable themes auto-update email notifications.
add_filter( 'auto_theme_update_send_email', '__return_false' );
?>