Skip to content

Commit 662e4a9

Browse files
Use wp_doing_cron() instead of constant
Co-authored-by: Weston Ruter <[email protected]>
1 parent 93297d2 commit 662e4a9

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 ( ( defined( 'DOING_CRON' ) && 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' ) || 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)