function ctools_site_language_ctools_access_check

Check for access.

1 string reference to 'ctools_site_language_ctools_access_check'
site_language.inc in plugins/access/site_language.inc
Plugin to provide access control based upon node type.

File

plugins/access/site_language.inc, line 45

Code

function ctools_site_language_ctools_access_check($conf, $context) {
    global $language;
    // Specialcase: If 'default' is checked, return TRUE if the default site language
    // matches the node language.
    if (!empty($conf['language']['default'])) {
        if ($language->language == language_default('language')) {
            return TRUE;
        }
    }
    if (array_filter($conf['language']) && empty($conf['language'][$language->language])) {
        return FALSE;
    }
    return TRUE;
}