WordPress.org

Make WordPress Core

Changeset 5777


Ignore:
Timestamp:
07/04/2007 04:12:37 PM (13 years ago)
Author:
markjaquith
Message:

Update wp-comments-post.php to WP coding conventions. props JeremyVisser. fixes #4573

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-comments-post.php

    r5707 r5777  
    11<?php
    2 if ($_SERVER["REQUEST_METHOD"] != "POST") {
    3     header('Allow: POST');
    4     header("HTTP/1.1 405 Method Not Allowed");
    5     header("Content-Type: text/plain");
    6     exit;
     2if ( 'POST' != $_SERVER['REQUEST_METHOD'] ) {
     3    header('Allow: POST');
     4    header('HTTP/1.1 405 Method Not Allowed');
     5    header('Content-Type: text/plain');
     6    exit;
    77}
    88require( dirname(__FILE__) . '/wp-config.php' );
     
    6464
    6565$comment = get_comment($comment_id);
    66 if ( !$user->ID ) :
     66if ( !$user->ID ) {
    6767    setcookie('comment_author_' . COOKIEHASH, $comment->comment_author, time() + 30000000, COOKIEPATH, COOKIE_DOMAIN);
    6868    setcookie('comment_author_email_' . COOKIEHASH, $comment->comment_author_email, time() + 30000000, COOKIEPATH, COOKIE_DOMAIN);
    6969    setcookie('comment_author_url_' . COOKIEHASH, clean_url($comment->comment_author_url), time() + 30000000, COOKIEPATH, COOKIE_DOMAIN);
    70 endif;
     70}
    7171
    7272$location = ( empty($_POST['redirect_to']) ? get_permalink($comment_post_ID) : $_POST['redirect_to'] ) . '#comment-' . $comment_id;
Note: See TracChangeset for help on using the changeset viewer.