Determine whether current page does not render the theme outputs
-
Hi there,
I’m wondering what would be a good way to detect whether the current page is loaded in the background which does not involve theme rendering.
At the moment, I’m doing something like this,
if ( in_array( $GLOBALS[ 'pagenow' ], array( 'wp-cron.php', 'admin-ajax.php' ) ) ) { // yes } else { // no }But there must be other pages that do not render the theme outputs like the REST API and feeds, possible more which I’m not aware of. Does anybody know a good way to do it?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Determine whether current page does not render the theme outputs’ is closed to new replies.