Q:

Redirect from the dashboard to edit.php if wp_is_mobile() is true

Looking for a way to redirect the user from the dashboard straight to edit.php if wp_is_mobile() is true.  
This is what I've tried:
function redirect_if_mobile() {
    $screen = get_current_screen();
    if($screen->base == 'dashboard') {
        if ( wp_is_mobile() ) {
            $url = admin_url( 'edit.php' );
            wp_redirect( $url );
        }
    }
}
add_action( 'admin_menu', 'redirect_if_mobile');

The problem is that get_current_screen() isn't defined in either admin_init or admin_menu (if you hook onto admin_head instead it's too late and headers have already been sent).  
Ideas? 

A:

The action you're looking for is auth_redirect, which is before the headers but still recognizes $pagenow to tell which page you're on:
add_action('auth_redirect', 'the_mobile_boot');
function the_mobile_boot() {
    global $pagenow;

    if ( $pagenow == 'index.php' && wp_is_mobile() ) {
        header( 'Location: ' .  get_admin_url(null, 'edit.php') );
        exit;
    }

}

