Make WordPress Core


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

comment_post_redirect and comment_edit_redirect from Mark J. fixes #2590

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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;
Note: See TracChangeset for help on using the changeset viewer.