Open bobbingwide opened 8 years ago
Re-opening to cater for WP-cli being run as a phar.
Test for the WP_CLI
constant before testing for top level file.
We might not need to check for the top level file.
This is now implemented, though the detection of PHP CLI is not protected against the problem documented in #19.
When the
oik-wp
plugin is activated and the main plugin file is loaded underWP-cli
then it needs better detection of the invoking file.In my original
wp.bat
file, WP-cli was being invoked using:In order to be able to run
WP-cli
against different installations I've changed this to specify the fully qualified file name.oik-wp
needs to be able to detect thatboot-fs.php
is only part of theargv[0]
paramater.Change
if ( $_SERVER['argv'][0] == "boot-fs.php" ) {
toif ( basename( $_SERVER['argv'][0] ) == "boot-fs.php" ) {
As this moment in time we don't expect to try running WP-cli under PHPUnit.