caleb
7/30/2016 - 7:24 AM

mu-plugin used to confirm number of notices Query Monitor receives regarding deprecated function

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>';
}