Changeset 2984
- Timestamp:
- 11/05/2005 10:08:56 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-comments-post.php
r2837 r2984 1 1 <?php 2 2 require( dirname(__FILE__) . '/wp-config.php' ); 3 4 nocache_headers(); 3 5 4 6 $comment_post_ID = (int) $_POST['comment_post_ID']; … … 47 49 $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'user_ID'); 48 50 49 wp_new_comment( $commentdata);51 wp_new_comment( $commentdata ); 50 52 51 53 if ( !$user_ID ) : … … 55 57 endif; 56 58 57 nocache_headers(); 59 $location = ( empty( $_POST['redirect_to'] ) ) ? get_permalink( $comment_post_ID ) : $_POST['redirect_to']; 58 60 59 $location = (empty($_POST['redirect_to'])) ? $_SERVER["HTTP_REFERER"] : $_POST['redirect_to']; 61 wp_redirect( $location ); 60 62 61 wp_redirect($location);62 63 ?>
Note: See TracChangeset
for help on using the changeset viewer.