Ticket #2590: comment_post-edit_redirect.HOOKS.fragments.diff
| File comment_post-edit_redirect.HOOKS.fragments.diff, 1.4 kB (added by Libertus, 2 years ago) |
|---|
-
wp-comments-post.php
old new 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'];61 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); 62 62 wp_redirect( $location ); 63 63 64 64 ?> -
wp-admin/comment.php
old new 192 192 193 193 edit_comment(); 194 194 195 $referredby = $_POST['referredby']; 196 if (!empty($referredby)) { 197 header('Location: ' . $referredby); 198 } else { 199 header ("Location: edit.php?p=$comment_post_ID&c=1#comments"); 200 } 195 $location = ( empty( $_POST['referredby'] ) ? "edit.php?p=$comment_post_ID&c=1#comments" : $_POST['referredby'] ) . '#comment-' . $comment_ID; 196 $location = apply_filters( 'comment_edit_redirect', $location, $comment_ID ); 197 wp_redirect( $location ); 201 198 202 199 break; 203 200 default:
