Skip to content

Commit cebb132

Browse files
authored
Merge pull request #82 from circuscode/develop
Exclude Auto Update
2 parents d548a6e + c6f9881 commit cebb132

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ Following standard features of the WordPress Core are manipulated or extended.
101101
* Run WordPress Updates automaticly
102102
* Run Plugin Updates automaticly
103103
* Run Theme Updates automaticly
104+
* Exclude specific plugins from Auto Update
104105

105106
###
106107

@@ -230,6 +231,7 @@ Release pending.
230231
* Added: Caching of ActivityPub Endpoints in WP REST API
231232
* Added: Fade out WB REST CACHE Icon @ Admin Bar
232233
* Added: Disable UpdraftPlus @ Admin Bar
234+
* Added: Exclude specific plugins from Auto Update
233235
* Fixed: Content Type Return @ WP REST CACHE
234236
* Fixed: Force CPTs in Tag Archives
235237
* Changed: Remove Mastodon Account @ Federated Comment extended with Mentions

unmus_update.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,27 @@ function unmus_themes_update() {
4646
}
4747
add_filter( 'auto_update_plugin', 'unmus_themes_update' );
4848

49+
/**
50+
* Exclude specific plugins from Auto Update
51+
*
52+
* @since 0.9
53+
*/
54+
55+
function unmus_exclude_from_auto_update( $update, $item ) {
56+
57+
$exclude = array(
58+
'podlove-podcasting-plugin-for-wordpress/podlove.php',
59+
// add further plugins
60+
);
61+
62+
if ( in_array( $item->plugin, $exclude, true ) ) {
63+
return false;
64+
}
65+
66+
return $update;
67+
}
68+
add_filter( 'auto_update_plugin', 'exclude_from_auto_update', 10, 2 );
69+
4970
/**
5071
* Disable eMail Notification after Update
5172
*

0 commit comments

Comments
 (0)