Changeset 3857 for trunk/wp-admin/user-edit.php
- Timestamp:
- 06/08/2006 06:36:05 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/user-edit.php
r3846 r3857 3 3 4 4 $title = __('Edit User'); 5 $parent_file = 'profile.php'; 5 if ( current_user_can('edit_users') ) 6 $parent_file = 'users.php'; 7 else 8 $parent_file = 'profile.php'; 6 9 $submenu_file = 'users.php'; 7 10 8 $wpvarstoreset = array('action', 'redirect', 'profile', 'user_id' );11 $wpvarstoreset = array('action', 'redirect', 'profile', 'user_id', 'wp_http_referer'); 9 12 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 10 13 $wpvar = $wpvarstoreset[$i]; … … 22 25 } 23 26 27 $wp_http_referer = remove_query_arg(array('update', 'delete_count'), stripslashes($wp_http_referer)); 28 24 29 switch ($action) { 25 30 case 'switchposts': … … 41 46 42 47 if( !is_wp_error( $errors ) ) { 43 header("Location: user-edit.php?user_id=$user_id&updated=true"); 48 $redirect = "user-edit.php?user_id=$user_id&updated=true"; 49 $redirect = add_query_arg('wp_http_referer', urlencode($wp_http_referer), $redirect); 50 header("Location: $redirect"); 44 51 exit; 45 52 } … … 58 65 <div id="message" class="updated fade"> 59 66 <p><strong><?php _e('User updated.') ?></strong></p> 67 <?php if ( $wp_http_referer ) : ?> 68 <p><a href="<?php echo wp_specialchars($wp_http_referer); ?>"><?php _e('« Back to Authors and Users'); ?></a></p> 69 <?php endif; ?> 60 70 </div> 61 71 <?php endif; ?> … … 76 86 <form name="profile" id="your-profile" action="user-edit.php" method="post"> 77 87 <?php wp_nonce_field('update-user_' . $user_id) ?> 88 <?php if ( $wp_http_referer ) : ?> 89 <input type="hidden" name="wp_http_referer" value="<?php echo wp_specialchars($wp_http_referer); ?>" /> 90 <?php endif; ?> 78 91 <p> 79 92 <input type="hidden" name="from" value="profile" />
Note: See TracChangeset
for help on using the changeset viewer.