diff options
author | Evan Prodromou <evan@status.net> | 2010-08-13 11:50:33 -0700 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-08-13 11:50:33 -0700 |
commit | 96705b4ec5d9fc658a6add47777912bc1362f406 (patch) | |
tree | d9f39551bc86758c19113406c0494bd7756148cb | |
parent | ed8d8eb5eeedf3caf7f38b5e03519dada24abee1 (diff) |
set notice titles in RSS and Atom output
-rw-r--r-- | plugins/NoticeTitle/NoticeTitlePlugin.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/plugins/NoticeTitle/NoticeTitlePlugin.php b/plugins/NoticeTitle/NoticeTitlePlugin.php index e8377f5b0..c708a9fa0 100644 --- a/plugins/NoticeTitle/NoticeTitlePlugin.php +++ b/plugins/NoticeTitle/NoticeTitlePlugin.php @@ -162,5 +162,27 @@ class NoticeTitlePlugin extends Plugin return true; } + + function onEndRssEntryArray($notice, &$entry) + { + $title = Notice_title::fromNotice($notice); + + if (!empty($title)) { + $entry['title'] = $title; + } + + return true; + } + + function onStartActivityTitle(&$notice, &$xs, &$output) + { + $title = Notice_title::fromNotice($notice); + + if (!empty($title)) { + $output = $title; + } + + return true; + } } |