Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions inc/spbc-firewall.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ function spbc_firewall_skip_check()
|| spbc_wp_doing_cron() // Pass WP cron tasks
|| \CleantalkSP\Variables\Server::inUri('/favicon.ico') // Exclude favicon.ico requests from the check
|| spbc_mailpoet_doing_cron()
|| spbc_is_cli()
) {
return true;
}
Expand Down
10 changes: 10 additions & 0 deletions inc/spbc-pluggable.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,13 @@ function spbc_mailpoet_doing_cron()
strpos(Server::get('REQUEST_URI', null, 'url'), 'mailpoet_router') !== false
);
}

/**
* Checks if the request is the command line access
*
* @return boolean
*/
function spbc_is_cli()
{
return PHP_SAPI === "cli";
}
Loading