summaryrefslogtreecommitdiffstats
path: root/wp-admin/edit-tags.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-admin/edit-tags.php')
-rw-r--r--wp-admin/edit-tags.php42
1 files changed, 28 insertions, 14 deletions
diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php
index fe6b89f..b50269b 100644
--- a/wp-admin/edit-tags.php
+++ b/wp-admin/edit-tags.php
@@ -52,7 +52,14 @@ case 'bulk-delete':
wp_delete_term( $tag_ID, 'post_tag');
}
- wp_redirect('edit-tags.php?message=6');
+ $location = 'edit-tags.php';
+ if ( $referer = wp_get_referer() ) {
+ if ( false !== strpos($referer, 'edit-tags.php') )
+ $location = $referer;
+ }
+
+ $location = add_query_arg('message', 6, $location);
+ wp_redirect($location);
exit;
break;
@@ -75,11 +82,19 @@ case 'editedtag':
wp_die(__('Cheatin’ uh?'));
$ret = wp_update_term($tag_ID, 'post_tag', $_POST);
- if( $ret && !is_wp_error( $ret ) ) {
- wp_redirect('edit-tags.php?message=3');
- } else {
- wp_redirect('edit-tags.php?message=5');
+
+ $location = 'edit-tags.php';
+ if ( $referer = wp_get_original_referer() ) {
+ if ( false !== strpos($referer, 'edit-tags.php') )
+ $location = $referer;
}
+
+ if ( $ret && !is_wp_error( $ret ) )
+ $location = add_query_arg('message', 3, $location);
+ else
+ $location = add_query_arg('message', 5, $location);
+
+ wp_redirect($location);
exit;
break;
@@ -122,7 +137,7 @@ endif; ?>
<input type="submit" value="<?php _e( 'Search Tags' ); ?>" class="button" />
</p>
-<br style="clear:both;" />
+<br class="clear" />
<div class="tablenav">
@@ -144,22 +159,22 @@ if ( $page_links )
echo "<div class='tablenav-pages'>$page_links</div>";
?>
-<div style="float: left">
+<div class="alignleft">
<input type="submit" value="<?php _e('Delete'); ?>" name="deleteit" class="button-secondary delete" />
<?php wp_nonce_field('bulk-tags'); ?>
</div>
-<br style="clear:both;" />
+<br class="clear" />
</div>
-<br style="clear:both;" />
+<br class="clear" />
<table class="widefat">
<thead>
<tr>
- <th scope="col" class="check-column"><input type="checkbox" onclick="checkAll(document.getElementById('posts-filter'));" /></th>
+ <th scope="col" class="check-column"><input type="checkbox" onclick="checkAll(document.getElementById('posts-filter'));" /></th>
<th scope="col"><?php _e('Name') ?></th>
- <th scope="col" style="width: 90px"><?php _e('Posts') ?></th>
+ <th scope="col" class="num" style="width: 90px"><?php _e('Posts') ?></th>
</tr>
</thead>
<tbody id="the-list" class="list:tag">
@@ -173,16 +188,15 @@ $count = tag_rows( $pagenum, $tagsperpage, $searchterms );
</table>
</form>
-<br style="clear:both;" />
-
<div class="tablenav">
<?php
if ( $page_links )
echo "<div class='tablenav-pages'>$page_links</div>";
?>
-<br style="clear:both;" />
+<br class="clear" />
</div>
+<br class="clear" />
</div>