Created
December 10, 2013 09:56
-
-
Save yratof/7888269 to your computer and use it in GitHub Desktop.
Remove update references from wordpress website
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This function is designed to remove all mentions that updates are available. | |
// Mostly because whereever there is a message, there is an update button allowing | |
// you to update with a touch of a button. This might break the website completely! | |
// Remove normall message | |
add_action('admin_menu','wphidenag'); | |
function wphidenag() { | |
remove_action( 'admin_notices', 'update_nag', 3 ); | |
} | |
// Hide Button on widgets | |
function remove_upgrade_nag() { | |
echo '<style type="text/css"> | |
#wp-version-message .button {display: none} | |
</style>'; | |
} | |
add_action('admin_head', 'remove_upgrade_nag'); | |
//hide plugin updates notification in the dashboard | |
function hide_plugin_update_indicator(){ | |
global $menu,$submenu; | |
$menu[65][0] = 'Plugins'; | |
$submenu['index.php'][10][0] = 'Updates'; | |
} | |
add_action('admin_menu', 'hide_plugin_update_indicator'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment