disable-core-update.php 1.35 KB
Newer Older
1
2
<?php
/*
3
4
5
6
Plugin Name:  Disable WordPress Core Updates
Description:  Disables WordPress core update checks and notifications.
Plugin URI:   https://lud.icro.us/disable-wordpress-core-update/
Version:      1.5
7
Author:       John Blackbourn
8
9
10
Author URI:   https://johnblackbourn.com/
License:      GPL v2 or later
Network:      true
11

12
Props: Matt Mullenweg, _ck_, miqrogroove
13

14
15
16
17
18
19
20
21
22
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.
23
24
25
26
27
28
29

*/

# 2.3 to 2.7:
add_action( 'init', create_function( '$a', "remove_action( 'init', 'wp_version_check' );" ), 2 );
add_filter( 'pre_option_update_core', create_function( '$a', "return null;" ) );

30
# 2.8+:
31
32
33
34
remove_action( 'wp_version_check', 'wp_version_check' );
remove_action( 'admin_init', '_maybe_update_core' );
add_filter( 'pre_transient_update_core', create_function( '$a', "return null;" ) );

35
# 3.0+:
36
add_filter( 'pre_site_transient_update_core', create_function( '$a', "return null;" ) );