Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (7 years ago)
Author:
pento
Message:

Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.

File:
1 edited

Legend:

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

    r42201 r42343  
    1212    }
    1313
    14     header('Allow: POST');
    15     header("$protocol 405 Method Not Allowed");
    16     header('Content-Type: text/plain');
     14    header( 'Allow: POST' );
     15    header( "$protocol 405 Method Not Allowed" );
     16    header( 'Content-Type: text/plain' );
    1717    exit;
    1818}
    1919
    2020/** Sets up the WordPress Environment. */
    21 require( dirname(__FILE__) . '/wp-load.php' );
     21require( dirname( __FILE__ ) . '/wp-load.php' );
    2222
    2323nocache_headers();
     
    2727    $data = intval( $comment->get_error_data() );
    2828    if ( ! empty( $data ) ) {
    29         wp_die( '<p>' . $comment->get_error_message() . '</p>', __( 'Comment Submission Failure' ), array( 'response' => $data, 'back_link' => true ) );
     29        wp_die(
     30            '<p>' . $comment->get_error_message() . '</p>', __( 'Comment Submission Failure' ), array(
     31                'response'  => $data,
     32                'back_link' => true,
     33            )
     34        );
    3035    } else {
    3136        exit;
Note: See TracChangeset for help on using the changeset viewer.