Skip to content

Commit 78d0455

Browse files
Check WP_CLI truthiness
Co-authored-by: Weston Ruter <[email protected]>
1 parent 662e4a9 commit 78d0455

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

includes/amp-helper-functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ function amp_is_available() {
410410
global $pagenow, $wp_query;
411411

412412
// Short-circuit for cron, CLI, admin requests or requests to non-frontend pages.
413-
if ( wp_doing_cron() || defined( 'WP_CLI' ) || is_admin() || in_array( $pagenow, [ 'wp-login.php', 'wp-signup.php', 'wp-activate.php', 'repair.php' ], true ) ) {
413+
if ( wp_doing_cron() || ( defined( 'WP_CLI' ) && WP_CLI ) || is_admin() || in_array( $pagenow, [ 'wp-login.php', 'wp-signup.php', 'wp-activate.php', 'repair.php' ], true ) ) {
414414
return false;
415415
}
416416

0 commit comments

Comments
 (0)