function tft_archive_create_archive_folder in Taxonomy File Tree 7.2
Creates an archive folder under the passed folder.
Returns the new term ID.
Parameters
int $parent_tid = 0:
Return value
int
1 call to tft_archive_create_archive_folder()
- tft_og_archive_rules_create_og_archive_folder in modules/
tft_og_archive/ tft_og_archive.module - Action callback: add an archive folder for newly created groups.
File
- modules/
tft_archive/ tft_archive.module, line 171 - Hook implementation and logic.
Code
function tft_archive_create_archive_folder($parent_tid = 0) {
$tid = tft_add_term(t("Archives"), $parent_tid);
db_insert('tft_archive_tid')
->fields(array(
'tid' => $tid,
'is_archive' => 1,
))
->execute();
return $tid;
}