Ticket #2590: comment_redirect_hooks_BRANCHES_2.0.diff
File comment_redirect_hooks_BRANCHES_2.0.diff, 1.3 KB (added by , 18 years ago) |
---|
-
wp-comments-post.php
57 57 setcookie('comment_author_url_' . COOKIEHASH, clean_url($comment->comment_author_url), time() + 30000000, COOKIEPATH, COOKIE_DOMAIN); 58 58 endif; 59 59 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); 61 62 62 wp_redirect( $location);63 wp_redirect($location); 63 64 64 65 ?> -
wp-admin/post.php
335 335 336 336 edit_comment(); 337 337 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); 344 341 345 342 break; 346 343