I need to have users land on a specific admin page based on user role in WP 3.0 multi-site enabled. I found this
function fb_redirect_2() {
if ( preg_match('#wp-admin/?(index.php)?$#', $_SERVER['REQUEST_URI']) ) {
if ( function_exists('admin_url') ) {
wp_redirect( admin_url('edit-comments.php') );
} else {
wp_redirect( get_option('siteurl') . '/wp-admin/' . 'edit-comments.php' );
}
}
}
if ( is_admin() )
add_action( 'admin_menu', 'fb_redirect_2' );
And changed
if ( is admin() )
to
if ( current_user_can('edit_posts') )
but this isn't working...
Any Suggestions?