-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
Description
I found myself this week trying to use WP-CLI for some front-end unit-testing, trying to pass a path to the script using the "url" parameter, and inspect the scripts enqueued for that query using my custom command.
I was stuck, though, because the WP_CLI\Runner::before_wp_load() includes the constant definition define( 'WP_ADMIN', true );. Changing that definition to false was enough for my purposes here.
I know that a lot more would need to be built out to actually allow WP_CLI to mock up a front end page load, use the template loader, and so on, but for now, adding a flag to run the current command with WP_ADMIN = false seems like it would be helpful?
Reactions are currently unavailable