Action switch no longer needed. see #15174

git-svn-id: http://svn.automattic.com/wordpress/trunk@16014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-10-27 16:06:40 +00:00
parent 2f7035c68d
commit 9c143d5c52
1 changed files with 29 additions and 42 deletions

View File

@ -80,51 +80,38 @@ if ( isset( $_REQUEST['updated'] ) && $_REQUEST['updated'] == 'true' && ! empty(
$msg = '<div class="updated" id="message"><p>' . $msg . '</p></div>'; $msg = '<div class="updated" id="message"><p>' . $msg . '</p></div>';
} }
$action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : 'list'; $wp_list_table->prepare_items();
switch ( $action ) { require_once( '../admin-header.php' );
// Edit site ?>
case 'editblog':
// No longer used.
break;
// List sites <div class="wrap">
case 'list': <?php screen_icon('ms-admin'); ?>
default: <h2><?php _e('Sites') ?>
$wp_list_table->prepare_items(); <?php echo $msg; ?>
<a href="<?php echo network_admin_url('site-new.php'); ?>" class="button add-new-h2"><?php echo esc_html_x( 'Add New', 'sites' ); ?></a>
<?php if ( isset( $_REQUEST['s'] ) && $_REQUEST['s'] ) {
printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $s ) );
} ?>
</h2>
require_once( '../admin-header.php' ); <form action="" method="get" id="ms-search">
?> <p class="search-box">
<input type="hidden" name="action" value="blogs" />
<input type="text" name="s" value="<?php echo esc_attr( $s ); ?>" />
<input type="submit" class="button" value="<?php esc_attr_e( 'Search Site by' ) ?>" />
<select name="searchaction">
<option value="name" selected="selected"><?php _e( 'Name' ); ?></option>
<option value="id"><?php _e( 'ID' ); ?></option>
<option value="ip"><?php _e( 'IP address' ); ?></option>
</select>
</p>
</form>
<div class="wrap"> <form id="form-site-list" action="edit.php?action=allblogs" method="post">
<?php screen_icon('ms-admin'); ?> <?php $wp_list_table->display(); ?>
<h2><?php _e('Sites') ?> </form>
<?php echo $msg; ?> </div>
<a href="<?php echo network_admin_url('site-new.php'); ?>" class="button add-new-h2"><?php echo esc_html_x( 'Add New', 'sites' ); ?></a> <?php
<?php if ( isset( $_REQUEST['s'] ) && $_REQUEST['s'] ) {
printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $s ) );
} ?>
</h2>
<form action="" method="get" id="ms-search">
<p class="search-box">
<input type="hidden" name="action" value="blogs" />
<input type="text" name="s" value="<?php echo esc_attr( $s ); ?>" />
<input type="submit" class="button" value="<?php esc_attr_e( 'Search Site by' ) ?>" />
<select name="searchaction">
<option value="name" selected="selected"><?php _e( 'Name' ); ?></option>
<option value="id"><?php _e( 'ID' ); ?></option>
<option value="ip"><?php _e( 'IP address' ); ?></option>
</select>
</p>
</form>
<form id="form-site-list" action="edit.php?action=allblogs" method="post">
<?php $wp_list_table->display(); ?>
</form>
</div>
<?php
break;
} // end switch( $action )
require_once( '../admin-footer.php' ); ?> require_once( '../admin-footer.php' ); ?>