Do you want to display WordPress update notifications to admin users only? While there’s probably a plugin for this, we have created a quick and useful code snippet that you can use to display update notification for admins in WordPress.
Instructions:
All you have to do is add this code to your theme’s functions.php file or in a site-specific plugin:
global $user_login; get_currentuserinfo(); if (!current_user_can('update_plugins')) { add_action( 'init', create_function( '$a', "remove_action( 'init', 'wp_version_check' );" ), 2 ); add_filter( 'pre_option_update_core', create_function( '$a', "return null;" ) ); }
Note: If this is your first time adding code snippets in WordPress, then please refer to our guide on how to properly add code snippets in WordPress, so you don’t accidentally break your site.
If you liked this code snippet, please consider checking out our other articles on the site like: 18 Jetpack alternatives to get the features without bloat and how to add a portfolio to your WordPress site.
[…] tendrían que poder visualizar los mensajes de actualizaciones de WordPress o plugins.Fuente: Display update notification for admins Compartir articulo via → Guardar en Delicious Delicoius Compartir en Facebook Facebook Tweet […]