function ctools_content_editable

Determine if a content type can be edited or not.

Some content types simply have their content and no options. This function lets a UI determine if it should display an edit link or not.

File

includes/content.inc, line 352

Code

function ctools_content_editable($type, $subtype, $conf) {
    if (empty($type['edit form']) && empty($subtype['edit form'])) {
        return FALSE;
    }
    $function = FALSE;
    if (!empty($subtype['check editable'])) {
        $function = ctools_plugin_get_function($subtype, 'check editable');
    }
    elseif (!empty($type['check editable'])) {
        $function = ctools_plugin_get_function($type, 'check editable');
    }
    if ($function) {
        return $function($type, $subtype, $conf);
    }
    return TRUE;
}