From 5b143b69453054487fcf6cf3b86e1a2f5ddfcc6b Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@19323 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 6af111d493..6f4396b728 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 : +?>
+