Changeset 4260

Show
Ignore:
Timestamp:
09/28/06 19:16:15 (2 years ago)
Author:
ryan
Message:

comment_post_redirect and comment_edit_redirect from Mark J. fixes #2590

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/comment.php

    r4210 r4260  
    178178    edit_comment(); 
    179179 
    180     $referredby = $_POST['referredby']; 
    181     if (!empty($referredby)) { 
    182         wp_redirect($referredby); 
    183     } else { 
    184         wp_redirect("edit.php?p=$comment_post_ID&c=1#comments"); 
    185     } 
     180    $location = ( empty($_POST['referredby']) ? "edit.php?p=$comment_post_ID&c=1" : $_POST['referredby'] ) . '#comment-' . $comment_ID; 
     181    $location = apply_filters('comment_edit_redirect', $location, $comment_ID); 
     182    wp_redirect($location); 
    186183 
    187184    break; 
  • trunk/wp-comments-post.php

    r4144 r4260  
    5858endif; 
    5959 
    60 $location = ( empty( $_POST['redirect_to'] ) ) ? get_permalink( $comment_post_ID ) : $_POST['redirect_to'];  
     60$location = ( empty($_POST['redirect_to']) ? get_permalink($comment_post_ID) : $_POST['redirect_to'] ) . '#comment-' . $comment_id; 
     61$location = apply_filters('comment_post_redirect', $location, $comment); 
    6162 
    62 wp_redirect( $location ); 
     63wp_redirect($location); 
    6364 
    6465?>