From c6f9881ef7578d5b05b2e62176d6a1ea24be16b1 Mon Sep 17 00:00:00 2001 From: Marco Hitschler Date: Tue, 14 Oct 2025 20:21:03 +0200 Subject: [PATCH] Exclude Auto Update --- readme.md | 2 ++ unmus_update.php | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/readme.md b/readme.md index 02826d1..5d0fe22 100644 --- a/readme.md +++ b/readme.md @@ -101,6 +101,7 @@ Following standard features of the WordPress Core are manipulated or extended. * Run WordPress Updates automaticly * Run Plugin Updates automaticly * Run Theme Updates automaticly +* Exclude specific plugins from Auto Update ### @@ -230,6 +231,7 @@ Release pending. * Added: Caching of ActivityPub Endpoints in WP REST API * Added: Fade out WB REST CACHE Icon @ Admin Bar * Added: Disable UpdraftPlus @ Admin Bar +* Added: Exclude specific plugins from Auto Update * Fixed: Content Type Return @ WP REST CACHE * Fixed: Force CPTs in Tag Archives * Changed: Remove Mastodon Account @ Federated Comment extended with Mentions diff --git a/unmus_update.php b/unmus_update.php index 222faf8..c2d819a 100644 --- a/unmus_update.php +++ b/unmus_update.php @@ -46,6 +46,27 @@ function unmus_themes_update() { } add_filter( 'auto_update_plugin', 'unmus_themes_update' ); +/** + * Exclude specific plugins from Auto Update + * + * @since 0.9 + */ + +function unmus_exclude_from_auto_update( $update, $item ) { + + $exclude = array( + 'podlove-podcasting-plugin-for-wordpress/podlove.php', + // add further plugins + ); + + if ( in_array( $item->plugin, $exclude, true ) ) { + return false; + } + + return $update; +} +add_filter( 'auto_update_plugin', 'exclude_from_auto_update', 10, 2 ); + /** * Disable eMail Notification after Update *