Skip to content

Instantly share code, notes, and snippets.

@mauriciogofas
Last active August 29, 2015 14:14
Show Gist options
  • Save mauriciogofas/b997b310179e6a784686 to your computer and use it in GitHub Desktop.
Save mauriciogofas/b997b310179e6a784686 to your computer and use it in GitHub Desktop.
Oculta notificações de updates do wp-admin
<?php
// Remove notificação de Update
function remove_core_updates(){
global $wp_version;return(object) array('last_checked'=> time(),'version_checked'=> $wp_version,);
}
add_filter('pre_site_transient_update_core','remove_core_updates');
add_filter('pre_site_transient_update_plugins','remove_core_updates');
add_filter('pre_site_transient_update_themes','remove_core_updates');
function hideUpdateNag() {
remove_action( 'admin_notices', 'update_nag', 3 );
}
if ( !current_user_can('activate_plugins') ) {
add_action('admin_menu','hideUpdateNag');
}
// Fim Remove notificação de Update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment