Skip to content

Instantly share code, notes, and snippets.

@hmowais
Created November 25, 2019 05:38
Show Gist options
  • Save hmowais/e19b4855f3505a1cd8cb321fbcaeff69 to your computer and use it in GitHub Desktop.
Save hmowais/e19b4855f3505a1cd8cb321fbcaeff69 to your computer and use it in GitHub Desktop.
Disable WordPress Updates
add_filter( 'pre_site_transient_update_core', create_function( '$a', "return null;" ) );
# Disable WP>3.0 plugin updates
remove_action( 'load-update-core.php', 'wp_update_plugins' );
add_filter( 'pre_site_transient_update_plugins', create_function( '$a', "return null;" ) );
# Disable WP>3.0 theme updates
remove_action( 'load-update-core.php', 'wp_update_themes' );
add_filter( 'pre_site_transient_update_themes', create_function( '$a', "return null;" ) );
# disable core updates:
add_filter( 'pre_site_transient_update_core', create_function( '$a', "return null;" ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment