first commit

This commit is contained in:
2026-04-09 15:31:08 +02:00
commit f42e416839
8067 changed files with 2816468 additions and 0 deletions

View File

@@ -0,0 +1,352 @@
<?php
/**
* The main plugin file
*
* @package WordPress_Plugins
* @subpackage OS_Disable_WordPress_Updates
*/
/*
Plugin Name: Disable All WordPress Updates
Description: Disables the theme, plugin and core update checking, the related cronjobs and notification system.
Plugin URI: https://wordpress.org/plugins/disable-wordpress-updates/
Version: 1.9.1
Author: Oliver Schlöbe
Author URI: https://www.schloebe.de/
Text Domain: disable-wordpress-updates
Domain Path: /languages
License: GPL2
Copyright 2013-2026 Oliver Schlöbe (email : wordpress@schloebe.de)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* Define the plugin version
*/
const OSDWPUVERSION = "1.9.1";
/**
* The OS_Disable_WordPress_Updates class
*
* @package WordPress_Plugins
* @subpackage OS_Disable_WordPress_Updates
* @since 1.3
* @author wordpress@schloebe.de
*/
class OS_Disable_WordPress_Updates {
/**
* The OS_Disable_WordPress_Updates class constructor
* initializing required stuff for the plugin
*
* PHP 5 Constructor
*
* @since 1.3
* @author wordpress@schloebe.de
*/
public function __construct() {
add_action( 'admin_init', [&$this, 'admin_init'] );
/*
* Disable Theme Updates
* 2.8 to 3.0
*/
add_filter( 'pre_transient_update_themes', [$this, 'last_checked_atm'] );
/*
* 3.0
*/
add_filter( 'pre_site_transient_update_themes', [$this, 'last_checked_atm'] );
/*
* Disable Plugin Updates
* 2.8 to 3.0
*/
add_action( 'pre_transient_update_plugins', [$this, 'last_checked_atm'] );
/*
* 3.0
*/
add_filter( 'pre_site_transient_update_plugins', [$this, 'last_checked_atm'] );
/*
* Disable Core Updates
* 2.8 to 3.0
*/
add_filter( 'pre_transient_update_core', [$this, 'last_checked_atm'] );
/*
* 3.0
*/
add_filter( 'pre_site_transient_update_core', [$this, 'last_checked_atm'] );
/*
* Filter schedule checks
*
* @link https://wordpress.org/support/topic/possible-performance-improvement/#post-8970451
*/
add_action('schedule_event', [$this, 'filter_cron_events']);
add_action( 'pre_set_site_transient_update_plugins', [$this, 'last_checked_atm'], 21, 1 );
add_action( 'pre_set_site_transient_update_themes', [$this, 'last_checked_atm'], 21, 1 );
/*
* Disable All Automatic Updates
* 3.7+
*
* @author sLa NGjI's @ slangji.wordpress.com
*/
add_filter( 'auto_update_translation', '__return_false' );
add_filter( 'automatic_updater_disabled', '__return_true' );
add_filter( 'allow_minor_auto_core_updates', '__return_false' );
add_filter( 'allow_major_auto_core_updates', '__return_false' );
add_filter( 'allow_dev_auto_core_updates', '__return_false' );
add_filter( 'auto_update_core', '__return_false' );
add_filter( 'wp_auto_update_core', '__return_false' );
add_filter( 'auto_core_update_send_email', '__return_false' );
add_filter( 'send_core_update_notification_email', '__return_false' );
add_filter( 'auto_update_plugin', '__return_false' );
add_filter( 'auto_update_theme', '__return_false' );
add_filter( 'automatic_updates_send_debug_email', '__return_false' );
add_filter( 'automatic_updates_is_vcs_checkout', '__return_true' );
remove_action( 'init', 'wp_schedule_update_checks' );
remove_all_filters( 'plugins_api' );
add_filter( 'automatic_updates_send_debug_email ', '__return_false', 1 );
if( !defined( 'AUTOMATIC_UPDATER_DISABLED' ) ) define( 'AUTOMATIC_UPDATER_DISABLED', true );
if( !defined( 'WP_AUTO_UPDATE_CORE') ) define( 'WP_AUTO_UPDATE_CORE', false );
add_filter( 'pre_http_request', [$this, 'block_request'], 10, 3 );
}
/**
* Initialize and load the plugin stuff
*
* @since 1.3
* @author wordpress@schloebe.de
*/
public function admin_init() {
if ( !function_exists("remove_action") ) return;
if ( current_user_can( 'update_core' ) ) {
add_action( 'admin_bar_menu', [$this, 'add_adminbar_items'], 100 );
add_action( 'admin_enqueue_scripts', [$this, 'admin_css_overrides'] );
}
/*
* Remove 'update plugins' option from bulk operations select list
*/
global $current_user;
$current_user->allcaps['update_plugins'] = 0;
/*
* Hide maintenance and update nag
*/
add_filter( 'site_status_tests', [$this, 'site_status_tests'] );
remove_action( 'admin_notices', 'update_nag', 3 );
remove_action( 'network_admin_notices', 'update_nag', 3 );
remove_action( 'admin_notices', 'maintenance_nag' );
remove_action( 'network_admin_notices', 'maintenance_nag' );
/*
* Disable Theme Updates
* 2.8 to 3.0
*/
remove_action( 'load-themes.php', 'wp_update_themes' );
remove_action( 'load-update.php', 'wp_update_themes' );
remove_action( 'admin_init', '_maybe_update_themes' );
remove_action( 'wp_update_themes', 'wp_update_themes' );
wp_clear_scheduled_hook( 'wp_update_themes' );
/*
* 3.0
*/
remove_action( 'load-update-core.php', 'wp_update_themes' );
wp_clear_scheduled_hook( 'wp_update_themes' );
/*
* Disable Plugin Updates
* 2.8 to 3.0
*/
remove_action( 'load-plugins.php', 'wp_update_plugins' );
remove_action( 'load-update.php', 'wp_update_plugins' );
remove_action( 'admin_init', '_maybe_update_plugins' );
remove_action( 'wp_update_plugins', 'wp_update_plugins' );
wp_clear_scheduled_hook( 'wp_update_plugins' );
/*
* 3.0
*/
remove_action( 'load-update-core.php', 'wp_update_plugins' );
wp_clear_scheduled_hook( 'wp_update_plugins' );
/*
* Disable Core Updates
* 2.8 to 3.0
*/
add_filter( 'pre_option_update_core', '__return_null' );
remove_action( 'wp_version_check', 'wp_version_check' );
remove_action( 'admin_init', '_maybe_update_core' );
wp_clear_scheduled_hook( 'wp_version_check' );
/*
* 3.0
*/
wp_clear_scheduled_hook( 'wp_version_check' );
/*
* 3.7+
*/
remove_action( 'wp_maybe_auto_update', 'wp_maybe_auto_update' );
remove_action( 'admin_init', 'wp_maybe_auto_update' );
remove_action( 'admin_init', 'wp_auto_update_core' );
wp_clear_scheduled_hook( 'wp_maybe_auto_update' );
remove_all_filters( 'plugins_api' );
}
/**
* Hide update checks in the Site Health screen
*
* @since 1.6.8
*/
public function site_status_tests($tests) {
unset( $tests['async']['background_updates'] );
unset( $tests['direct']['plugin_theme_auto_updates'] );
return $tests;
}
/**
* Add notice to admin bar when plugin is active
*
* @since 1.7.0
*/
public function add_adminbar_items($admin_bar) {
$plugin_data = get_plugin_data( __FILE__ );
$admin_bar->add_menu([
'id' => 'dwuos-notice',
'title' => '<span class="dashicons dashicons-info" aria-hidden="true"></span>',
'href' => network_admin_url('plugins.php'),
'meta' => [
'class' => 'wp-admin-bar-dwuos-notice',
'title' => sprintf(
/* translators: %s: Name of the plugin */
__('"%s" plugin is enabled!', 'disable-wordpress-updates'),
$plugin_data['Name']
)
],
]);
}
/**
* Apply CSS styles to admin bar notice
*
* @since 1.7.0
*/
public function admin_css_overrides() {
wp_add_inline_style( 'admin-bar', '.wp-admin-bar-dwuos-notice { background-color: rgba(190, 0, 0, 0.4) !important; } .wp-admin-bar-dwuos-notice .dashicons { font-family: dashicons !important; }' );
}
/**
* Check the outgoing request
*
* @since 1.4.4
*/
public function block_request($pre, $args, $url) {
/* Empty url */
if( empty( $url ) ) {
return $pre;
}
/* Invalid host */
if( !$host = parse_url($url, PHP_URL_HOST) ) {
return $pre;
}
$url_data = parse_url( $url );
/* block request */
if( false !== stripos( $host, 'api.wordpress.org' ) &&
isset( $url_data['path'] ) &&
(false !== stripos( $url_data['path'], 'update-check' ) ||
false !== stripos( $url_data['path'], 'version-check' ) ||
false !== stripos( $url_data['path'], 'browse-happy' ) ||
false !== stripos( $url_data['path'], 'serve-happy' )) ) {
return true;
}
return $pre;
}
/**
* Filter cron events
*
* @since 1.5.0
*/
public function filter_cron_events($event) {
switch( $event->hook ) {
case 'wp_version_check':
case 'wp_update_plugins':
case 'wp_update_themes':
case 'wp_maybe_auto_update':
$event = false;
break;
}
return $event;
}
/**
* Override version check info
*
* @since 1.6.0
*/
public function last_checked_atm( $t ) {
include ABSPATH . WPINC . '/version.php';
$current = new stdClass;
$current->updates = [];
$current->version_checked = $wp_version;
$current->last_checked = time();
return $current;
}
}
if ( class_exists('OS_Disable_WordPress_Updates') ) {
$OS_Disable_WordPress_Updates = new OS_Disable_WordPress_Updates();
}

View File

@@ -0,0 +1,45 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Disable All WordPress Updates\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-11 16:31+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: \n"
"Language: \n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Loco https://localise.biz/\n"
"X-Loco-Version: 2.5.3; wp-5.8\n"
"X-Domain: disable-wordpress-updates"
#. %s: Name of the plugin
#: disable-updates.php:264
#, php-format
msgid "\"%s\" plugin is enabled!"
msgstr ""
#. Name of the plugin
msgid "Disable All WordPress Updates"
msgstr ""
#. Description of the plugin
msgid ""
"Disables the theme, plugin and core update checking, the related cronjobs "
"and notification system."
msgstr ""
#. URI of the plugin
msgid "https://wordpress.org/plugins/disable-wordpress-updates/"
msgstr ""
#. Author URI of the plugin
msgid "https://www.schloebe.de/"
msgstr ""
#. Author of the plugin
msgid "Oliver Schlöbe"
msgstr ""

View File

@@ -0,0 +1,46 @@
msgid ""
msgstr ""
"Project-Id-Version: Disable All WordPress Updates\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-11 15:32+0000\n"
"PO-Revision-Date: 2021-11-11 16:32+0000\n"
"Last-Translator: \n"
"Language-Team: German\n"
"Language: de_DE\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Loco https://localise.biz/\n"
"X-Loco-Version: 2.5.3; wp-5.8\n"
"X-Domain: disable-wordpress-updates"
#. %s: Name of the plugin
#: disable-updates.php:264
#, php-format
msgid "\"%s\" plugin is enabled!"
msgstr "Das \"%s\"-Plugin ist akiviert!"
#. Name of the plugin
msgid "Disable All WordPress Updates"
msgstr "Disable All WordPress Updates"
#. Description of the plugin
msgid ""
"Disables the theme, plugin and core update checking, the related cronjobs "
"and notification system."
msgstr ""
"Deaktiviert die Theme-, Plugin- und Core-Updates, die zugehörigen Cronjobs "
"und das Benachrichtigungssystem."
#. URI of the plugin
msgid "https://wordpress.org/plugins/disable-wordpress-updates/"
msgstr "https://de.wordpress.org/plugins/disable-wordpress-updates/"
#. Author URI of the plugin
msgid "https://www.schloebe.de/"
msgstr "https://www.schloebe.de/"
#. Author of the plugin
msgid "Oliver Schlöbe"
msgstr "Oliver Schlöbe"

View File

@@ -0,0 +1,46 @@
msgid ""
msgstr ""
"Project-Id-Version: Disable All WordPress Updates\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-11 15:32+0000\n"
"PO-Revision-Date: 2021-11-11 16:35+0000\n"
"Last-Translator: \n"
"Language-Team: French (France)\n"
"Language: fr_FR\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Loco https://localise.biz/\n"
"X-Loco-Version: 2.5.3; wp-5.8\n"
"X-Domain: disable-wordpress-updates"
#. %s: Name of the plugin
#: disable-updates.php:264
#, php-format
msgid "\"%s\" plugin is enabled!"
msgstr "\"%s\" est activé!"
#. Name of the plugin
msgid "Disable All WordPress Updates"
msgstr "Disable All WordPress Updates"
#. Description of the plugin
msgid ""
"Disables the theme, plugin and core update checking, the related cronjobs "
"and notification system."
msgstr ""
"Désactive la vérification des mises à jour du thème, des plugins et du noyau,"
" les cronjobs associés et le système de notification."
#. URI of the plugin
msgid "https://wordpress.org/plugins/disable-wordpress-updates/"
msgstr "https://fr.wordpress.org/plugins/disable-wordpress-updates/"
#. Author URI of the plugin
msgid "https://www.schloebe.de/"
msgstr "https://www.schloebe.de/"
#. Author of the plugin
msgid "Oliver Schlöbe"
msgstr "Oliver Schlöbe"

View File

@@ -0,0 +1,145 @@
=== Disable All WordPress Updates ===
Contributors: Alphawolf
Donate link: https://www.schloebe.de/donate/
Tags: disable updates, update, theme, update control
Requires at least: 3.8
Tested up to: 6.9.99
Requires PHP: 7.4
Stable tag: trunk
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Disables the theme, plugin and core update checking, the related cronjobs, plugin/theme update health checks and notification system.
== Description ==
This plugin completely disables the theme, plugin and core update checking system in WordPress. The plugin prevents WordPress from
checking for updates including cronjobs, and prevents any notifications from being displayed.
It's *very* important that you keep your WordPress theme, core and plugins up to date! If you don't, your blog or website could
be **susceptible to security vulnerabilities** or performance issues.
If you use this plugin, make sure you keep yourself up to date with new releases of your active WordPress version, plugins
and themes and update them as new versions are released (simply by deactivating this plugin for a short time).
[Developer on X](https://x.com/wpseek "Developer on X") [Developer on Bluesky](https://bsky.app/profile/cyberblitzbirne.bsky.social "Developer on Bluesky")
**Looking for more WordPress plugins? Visit [www.schloebe.de/portfolio/](https://www.schloebe.de/portfolio/)**
== Frequently Asked Questions ==
= What can I do to be up to date with new releases of my WordPress version, plugins and themes? =
Simply deativate the plugin for a short time. In case new versions are available you see the WordPress notifications.
== Installation ==
1. Download the plugin and unzip it.
2. Upload the folder disable-wordpress-updates/ to your /wp-content/plugins/ folder.
3. Activate the plugin from your WordPress admin panel.
4. Installation finished.
With activating the plugin all theme, core and plugin update checkings are disabled. If you want to have a quick look if new versions
are existing, simply deactive this plugin for a short time.
== Screenshots ==
None. :)
== Changelog ==
= 1.9.0 =
* WordPress 6.9 compatibility
= 1.8.0 =
* WordPress 6.7 compatibility
= 1.7.1 =
* Fixed PHP warnings (thanks TetsuyaXD!)
= 1.7.0 =
* Added admin bar notice when plugin is enabled to remember admins that WordPress updates are disabled (thanks zimisun!)
= 1.6.8 =
* Disable plugin/theme update site health checks (thanks lucha!)
= 1.6.7 =
* Improved WordPress HTTP API level blocking of outgoing wordpress.org API checks (thanks luizkill!)
= 1.6.6 =
* WordPress 5.3 compatibility
= 1.6.5 =
* Improved WordPress HTTP API level blocking of outgoing wordpress.org API checks (thanks tiennoub!)
= 1.6.3 =
* PHP 7.2 compatibility (Thanks catmaniax!)
= 1.6.2 =
* Performance improvements (Thanks again jneto81!)
= 1.6.1 =
* Remove 'update plugins' option from bulk operations select list (Thanks goruha!)
= 1.6.0 =
* Performance improvements (Thanks again jneto81!)
= 1.5.0 =
* Performance improvements (Thanks jneto81!)
= 1.4.9 =
* Performance improvements (Thanks dominicp!)
= 1.4.8 =
* WordPress 4.7 compatibility
* PHP 7 compatibility
= 1.4.7 =
* Fixed a PHP notice
= 1.4.6 =
* Hide maintenance and update nags
= 1.4.5 =
* Check for already defined constants (Thanks Andreas Ek!)
= 1.4.4 =
* WordPress HTTP API level blocking of outgoing wordpress.org API checks
= 1.4.3 =
* Improved blocking of outgoing wordpress.org API checks which caused slow speed on local environments (Thanks Makapaka!)
= 1.4.2 =
* Update indicator not showing in the front-end toolbar anymore (Thanks flixflix!)
= 1.4.1 =
* Fixed an issue that still allowed WordPress to update minor (security and maintenance) versions
= 1.4.0 =
* Disable all automatic background updates (thanks sLa NGjI's)
= 1.3.1.1 =
* Fixed a PHP notice on dev environments (thanks dejernet)
= 1.3.1 =
* Significant performance improvements when disabling updates (props flynsarmy)
= 1.3.0.1 =
* Minor updates
= 1.3 =
* New plugin maintainer. Hello. :) Name's Oliver.
* Code rewrite and cleanup
= 1.2 =
* Name and URL Update (German plugin description updated)
= 1.1 =
* URL Update because of permalink changes
= 1.0 =
* Initial release