Permalink
Browse files

Use !defined('ABSPATH') to detect if the comments.php is being called…

… directly
  • Loading branch information...
1 parent da003f6 commit 06a0bcce44ac8b823898f78220a6c63e661d858b @jayj committed Jan 7, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 comments.php
View
@@ -10,8 +10,7 @@
*/
/* Kill the page if trying to access this template directly. */
-if ( 'comments.php' == basename( $_SERVER['SCRIPT_FILENAME'] ) )
- die( __( 'Please do not load this page directly. Thanks!', 'cakifo' ) );
+if ( !defined('ABSPATH') ) die;
/* If a post password is required or no comments are given and comments/pings are closed, return */
if ( post_password_required() || ( ! have_comments() && ! comments_open() && ! pings_open() ) )

0 comments on commit 06a0bcc

Please sign in to comment.