public static function is_defined($forguests = false) {
        global $CFG;
        if (!empty($CFG->sitepolicyhandler)) {
            // This handler can also be used as a fallback in case of invalid $CFG->sitepolicyhandler,
            // in this case assume that no site policy is set.
            return false;
        }
        if (!$forguests) {
            return !empty($CFG->sitepolicy);
        } else {
            return !empty($CFG->sitepolicyguest);
        }
    }
public static function is_defined($forguests = false) {
        global $CFG;
        if (!empty($CFG->sitepolicyhandler)) {
            // This handler can also be used as a fallback in case of invalid $CFG->sitepolicyhandler,
            // in this case assume that no site policy is set.
            return false;
        }
        if (!$forguests) {
            return !empty($CFG->sitepolicy);
        } else {
            return !empty($CFG->sitepolicyguest);
        }
    }
public static function is_defined ( $ forguests = false ) { global $ CFG ; if ( ! empty ( $ CFG -> sitepolicyhandler ) ) { // This handler can also be used as a fallback in case of invalid $CFG->sitepolicyhandler, // in this case assume that no site policy is set. return false ; } if ( ! $ forguests ) { return ! empty ( $ CFG -> sitepolicy ) ; } else { return ! empty ( $ CFG -> sitepolicyguest ) ; } }
Checks if the site has site policy defined

@param bool $forguests
@return bool
Checks if the site has site policy defined