From 1dda3e01ddbd180e6c7ced4e7187e375617defab Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 17 Nov 2011 18:52:58 +0000 Subject: [PATCH] Don't die in my-sites.php if the user has no sites. Intead, display message within admin chrome. Props trepmal. fixes #18935 git-svn-id: http://svn.automattic.com/wordpress/trunk@19323 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/my-sites.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/wp-admin/my-sites.php b/wp-admin/my-sites.php index 6af111d49..6f4396b72 100644 --- a/wp-admin/my-sites.php +++ b/wp-admin/my-sites.php @@ -19,9 +19,6 @@ $action = isset( $_POST['action'] ) ? $_POST['action'] : 'splash'; $blogs = get_blogs_of_user( $current_user->ID ); -if ( empty( $blogs ) ) - wp_die( __( 'You must be a member of at least one site to use this page.' ) ); - $updated = false; if ( 'updateblogsettings' == $action && isset( $_POST['primary_blog'] ) ) { check_admin_referer( 'update-my-sites' ); @@ -58,6 +55,13 @@ if ( $updated ) { ?>

+'; + _e( 'You must be a member of at least one site to use this page.' ); + echo '

'; +else : +?>
+