Skip to content

Commit dd34108

Browse files
committed
Change ABSPATH to WP_CLI
1 parent b9a0847 commit dd34108

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

bin/.htaccess

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
deny from all

bin/cache.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?php
22

3-
if ( ! defined( 'ABSPATH' ) ) {
4-
die( "Run this script with WP-CLI: `wp eval-file bin/cache.php` \n" );
3+
if ( ! defined( 'WP_CLI' ) ) {
4+
$script_name = basename( $argv[0] );
5+
die( "Run this script with WP-CLI: `wp eval-file bin/$script_name` \n" );
56
}
67

78
set_time_limit( 0 );

0 commit comments

Comments
 (0)