diff options
Diffstat (limited to 'modules/tag')
-rw-r--r-- | modules/tag/helpers/tag_event.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/tag/helpers/tag_event.php b/modules/tag/helpers/tag_event.php index 57986e40..19c917ac 100644 --- a/modules/tag/helpers/tag_event.php +++ b/modules/tag/helpers/tag_event.php @@ -97,4 +97,14 @@ class tag_event_Core { static function item_index_data($item, $data) { $data[] = join(" ", tag::item_tags($item)); } + + static function add_tags_to_item($item, $tags) { + foreach (split(",", $tags) as $tag_name) { + $tag_name = trim($tag_name); + if ($tag_name) { + $tag = tag::add($item, $tag_name); + } + } + } + } |