Make WordPress Core


Ignore:
Timestamp:
03/13/2009 05:24:35 AM (16 years ago)
Author:
ryan
Message:

Remember page when redirecting after tag edit. Props Viper007Bond. fixes #9220 for 2.7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.7/wp-admin/edit-tags.php

    r10150 r10776  
    4444    wp_delete_term( $tag_ID, 'post_tag');
    4545
    46     wp_redirect('edit-tags.php?message=2');
     46    $location = 'edit-tags.php';
     47    if ( $referer = wp_get_referer() ) {
     48        if ( false !== strpos($referer, 'edit-tags.php') )
     49            $location = $referer;
     50    }
     51
     52    $location = add_query_arg('message', 2, $location);
     53    wp_redirect($location);
    4754    exit;
    4855
     
    261268    <label for="name"><?php _e('Tag name') ?></label>
    262269    <input name="name" id="name" type="text" value="" size="40" aria-required="true" />
    263     <p><?php _e('The name is how the tag appears on your site.'); ?></p>
     270    <p><?php _e('The name is how the tag appears on your site.'); ?></p>
    264271</div>
    265272
     
    267274    <label for="slug"><?php _e('Tag slug') ?></label>
    268275    <input name="slug" id="slug" type="text" value="" size="40" />
    269     <p><?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p>
     276    <p><?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p>
    270277</div>
    271278
Note: See TracChangeset for help on using the changeset viewer.