In wp-admin/includes/update-core.php
we find the following line:
add_action( '_core_updated_successfully', '_redirect_to_about_wordpress' );
I want to remove this action, so I created a mu plugin with the following content:
<?php # -*- coding: utf-8 -*-
add_action( '_core_updated_successfully', 't5_no_redirect_after_update', 0 );
function t5_no_redirect_after_update()
{
remove_action( '_core_updated_successfully', '_redirect_to_about_wordpress' );
}
It does … nothing. I am still redirected. Tested with single site and multi site installations.
I guess I miss something obvious, as usual. :)
How to do it better?
Update
Based on Brady’s answer I build a very minimal version:
<?php # -*- coding: utf-8 -*-
/* Plugin Name: T5 No redirect after core upgrade. */
add_action( '_core_updated_successfully', 't5_no_redirect_after_update', 0 );
function t5_no_redirect_after_update()
{
show_message( __('WordPress updated successfully') );
// Include admin-footer.php and exit
include(ABSPATH . 'wp-admin/admin-footer.php');
exit;
}
Now we see the success message and no other action is called. You can download the plugin on GitHub. Use it as regular plugin or as MU plugin.
_core_updated_successfully
mentioned by @Brady action seems missing from 3.8.* ( >3.7 ?? ). Any ideas of a a replacement ?/wp-admin/includes/update-core.php
at the end of the file.