Make WordPress Core

Changeset 4261


Ignore:
Timestamp:
09/28/2006 07:16:44 PM (18 years ago)
Author:
ryan
Message:

comment_post_redirect and comment_edit_redirect from Mark J. fixes #2590

Location:
branches/2.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/wp-admin/post.php

    r4249 r4261  
    336336    edit_comment();
    337337
    338     $referredby = $_POST['referredby'];
    339     if (!empty($referredby)) {
    340         wp_redirect($referredby);
    341     } else {
    342         wp_redirect("edit.php?p=$comment_post_ID&c=1#comments");
    343     }
     338    $location = ( empty($_POST['referredby']) ? "edit.php?p=$comment_post_ID&c=1" : $_POST['referredby'] ) . '#comment-' . $comment_ID;
     339    $location = apply_filters('comment_edit_redirect', $location, $comment_ID);
     340    wp_redirect($location);
    344341
    345342    break;
  • branches/2.0/wp-comments-post.php

    r3771 r4261  
    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?>
Note: See TracChangeset for help on using the changeset viewer.