Don't echo the updated div on sites.php before the admin header.

git-svn-id: http://svn.automattic.com/wordpress/trunk@15673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-09-28 18:21:46 +00:00
parent af5d4ba206
commit e83068064f
1 changed files with 43 additions and 44 deletions

View File

@ -48,51 +48,48 @@ if ( isset( $_REQUEST['action'] ) && 'editblog' == $_REQUEST['action'] ) {
$id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0; $id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
$msg = '';
if ( isset( $_REQUEST['updated'] ) && $_REQUEST['updated'] == 'true' && ! empty( $_REQUEST['action'] ) ) { if ( isset( $_REQUEST['updated'] ) && $_REQUEST['updated'] == 'true' && ! empty( $_REQUEST['action'] ) ) {
?>
<div id="message" class="updated"><p>
<?php
switch ( $_REQUEST['action'] ) { switch ( $_REQUEST['action'] ) {
case 'all_notspam': case 'all_notspam':
_e( 'Sites removed from spam.' ); $msg = __( 'Sites removed from spam.' );
break; break;
case 'all_spam': case 'all_spam':
_e( 'Sites marked as spam.' ); $msg = __( 'Sites marked as spam.' );
break; break;
case 'all_delete': case 'all_delete':
_e( 'Sites deleted.' ); $msg = __( 'Sites deleted.' );
break; break;
case 'delete': case 'delete':
_e( 'Site deleted.' ); $msg = __( 'Site deleted.' );
break; break;
case 'add-blog': case 'add-blog':
_e( 'Site added.' ); $msg = __( 'Site added.' );
break; break;
case 'archive': case 'archive':
_e( 'Site archived.' ); $msg = __( 'Site archived.' );
break; break;
case 'unarchive': case 'unarchive':
_e( 'Site unarchived.' ); $msg = __( 'Site unarchived.' );
break; break;
case 'activate': case 'activate':
_e( 'Site activated.' ); $msg = __( 'Site activated.' );
break; break;
case 'deactivate': case 'deactivate':
_e( 'Site deactivated.' ); $msg = __( 'Site deactivated.' );
break; break;
case 'unspam': case 'unspam':
_e( 'Site removed from spam.' ); $msg = __( 'Site removed from spam.' );
break; break;
case 'spam': case 'spam':
_e( 'Site marked as spam.' ); $msg = __( 'Site marked as spam.' );
break; break;
default: default:
_e( 'Settings saved.' ); $msg = __( 'Settings saved.' );
break; break;
} }
?> if ( $msg )
</p></div> $msg = '<div class="updated" id="message"><p>' . $msg . '</p></div>';
<?php
} }
$action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : 'list'; $action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : 'list';
@ -114,6 +111,7 @@ switch ( $action ) {
<div class="wrap"> <div class="wrap">
<?php screen_icon(); ?> <?php screen_icon(); ?>
<h2><?php _e( 'Edit Site' ); ?> - <a href="<?php echo esc_url( get_home_url( $id ) ); ?>"><?php echo esc_url( get_home_url( $id ) ); ?></a></h2> <h2><?php _e( 'Edit Site' ); ?> - <a href="<?php echo esc_url( get_home_url( $id ) ); ?>"><?php echo esc_url( get_home_url( $id ) ); ?></a></h2>
<?php echo $msg; ?>
<form method="post" action="edit.php?action=updateblog"> <form method="post" action="edit.php?action=updateblog">
<?php wp_nonce_field( 'editblog' ); ?> <?php wp_nonce_field( 'editblog' ); ?>
<input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" /> <input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" />
@ -351,6 +349,7 @@ switch ( $action ) {
<div class="wrap"> <div class="wrap">
<?php screen_icon(); ?> <?php screen_icon(); ?>
<h2><?php _e('Sites') ?> <h2><?php _e('Sites') ?>
<?php echo $msg; ?>
<a href="#form-add-site" class="button add-new-h2"><?php echo esc_html_x( 'Add New', 'sites' ); ?></a> <a href="#form-add-site" class="button add-new-h2"><?php echo esc_html_x( 'Add New', 'sites' ); ?></a>
<?php if ( isset( $_REQUEST['s'] ) && $_REQUEST['s'] ) { <?php if ( isset( $_REQUEST['s'] ) && $_REQUEST['s'] ) {
printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $s ) ); printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $s ) );