Skip to content

Instantly share code, notes, and snippets.

View MahdiY's full-sized avatar
🎯
Focusing

Mahdi Yousefi MahdiY

🎯
Focusing
View GitHub Profile
@MahdiY
MahdiY / disable-updates.php
Created March 1, 2019 15:03 — forked from willmot/disable-updates.php
Disable core, theme and plugin update checks and notices and remove the update page from nav
<?php
// Don't disable on dev
if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) {
// Disable core update checking
add_filter( 'pre_site_transient_update_core', create_function( '$a', "return null;" ) );
remove_action( 'admin_init', '_maybe_update_core' );
remove_action( 'wp_version_check', 'wp_version_check' );