function tft_is_archive_folder in Taxonomy File Tree 7
Same name and namespace in other branches
- 7.2 tft.module \tft_is_archive_folder()
Checks if the term is an "Archive" term. These cannot be edited or deleted.
Parameters
int $tid:
Return value
bool
5 calls to tft_is_archive_folder()
- tft_archive_term_form in ./
tft.admin.inc - Archive a term form
- tft_delete_term_form in ./
tft.admin.inc - Delete a term form
- tft_edit_term_form in ./
tft.admin.inc - Edit a term form.
- tft_folder_content in ./
tft.module - Loads the given folder content.
- tft_get_content in ./
tft.module - Get the folder content and return it in an array form for the theme_table call
File
- ./
tft.module, line 630 - Module hooks.
Code
function tft_is_archive_folder($tid) {
// Must be a direct child.
if (tft_get_depth($tid) == 1) {
$title = db_select('taxonomy_term_data', 't')
->fields('t', array(
'name',
))
->condition('tid', $tid)
->execute()
->fetchField();
if ($title == 'Archives') {
return TRUE;
}
}
return FALSE;
}