Skip to content

Instantly share code, notes, and snippets.

@crstauf
Last active July 30, 2016 07:26
Show Gist options
  • Save crstauf/6391e7355f7c6da456d44bfaf3962580 to your computer and use it in GitHub Desktop.
Save crstauf/6391e7355f7c6da456d44bfaf3962580 to your computer and use it in GitHub Desktop.
mu-plugin used to confirm number of notices Query Monitor receives regarding deprecated function
add_action('init','stop_heartbeat',0);
function stop_heartbeat() {
wp_deregister_script('heartbeat');
}
foreach (array(
'muplugins_loaded',
'registered_taxonomy',
'registered_post_type',
'plugins_loaded',
'setup_theme',
'load_textdomain',
'after_setup_theme',
) as $hook) {
add_action($hook,'check_get_currentuserinfo',0);
}
function check_get_currentuserinfo() {
if (function_exists('get_currentuserinfo'))
add_action(current_action(),'test_get_currentuserinfo',0);
}
function test_get_currentuserinfo() {
echo 'I';
echo '<span style="display: none;">' . print_r(get_currentuserinfo(),true) . '</span>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment