Action switch no longer needed. see #15174

git-svn-id: https://develop.svn.wordpress.org/trunk@16014 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-10-27 16:06:40 +00:00
parent 91d456e319
commit eb4985a24d
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>
require_once( '../admin-header.php' ); <?php if ( isset( $_REQUEST['s'] ) && $_REQUEST['s'] ) {
?>
<div class="wrap">
<?php screen_icon('ms-admin'); ?>
<h2><?php _e('Sites') ?>
<?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 ) ); printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $s ) );
} ?> } ?>
</h2> </h2>
<form action="" method="get" id="ms-search"> <form action="" method="get" id="ms-search">
<p class="search-box"> <p class="search-box">
<input type="hidden" name="action" value="blogs" /> <input type="hidden" name="action" value="blogs" />
<input type="text" name="s" value="<?php echo esc_attr( $s ); ?>" /> <input type="text" name="s" value="<?php echo esc_attr( $s ); ?>" />
<input type="submit" class="button" value="<?php esc_attr_e( 'Search Site by' ) ?>" /> <input type="submit" class="button" value="<?php esc_attr_e( 'Search Site by' ) ?>" />
<select name="searchaction"> <select name="searchaction">
<option value="name" selected="selected"><?php _e( 'Name' ); ?></option> <option value="name" selected="selected"><?php _e( 'Name' ); ?></option>
<option value="id"><?php _e( 'ID' ); ?></option> <option value="id"><?php _e( 'ID' ); ?></option>
<option value="ip"><?php _e( 'IP address' ); ?></option> <option value="ip"><?php _e( 'IP address' ); ?></option>
</select> </select>
</p> </p>
</form> </form>
<form id="form-site-list" action="edit.php?action=allblogs" method="post"> <form id="form-site-list" action="edit.php?action=allblogs" method="post">
<?php $wp_list_table->display(); ?> <?php $wp_list_table->display(); ?>
</form> </form>
</div> </div>
<?php <?php
break;
} // end switch( $action )
require_once( '../admin-footer.php' ); ?> require_once( '../admin-footer.php' ); ?>