modX.checkSiteStatus
Last updated not available | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn moremodX::checkSiteStatus¶
Reports whether the site answers this request. modRequest::handleRequest() calls it right after OnHandleRequest.
True when either condition holds:
- the site_status setting is
'1'; - a session is initialized and the current policy grants
view_offline.
A false result turns the request into a 503 that serves site_unavailable_page or site_unavailable_message.
Syntax¶
boolean checkSiteStatus ()
No parameters.
Example¶
if (!$modx->checkSiteStatus()) {
// the site is offline for this visitor
}
See Also¶
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn more










