hooks to allow changing RSS content
This commit is contained in:
parent
91c914fa3b
commit
ed8d8eb5ee
|
@ -1056,3 +1056,11 @@ EndNoticeSaveWeb: after saving a notice through the Web interface
|
|||
- $action: action being executed (instance of NewNoticeAction)
|
||||
- $notice: notice that was saved
|
||||
|
||||
StartRssEntryArray: at the start of copying a notice to an array
|
||||
- $notice: the notice being copied
|
||||
- &$entry: the entry (empty at beginning)
|
||||
|
||||
EndRssEntryArray: at the end of copying a notice to an array
|
||||
- $notice: the notice being copied
|
||||
- &$entry: the entry, with all the fields filled up
|
||||
|
||||
|
|
|
@ -462,10 +462,12 @@ class ApiAction extends Action
|
|||
|
||||
function twitterRssEntryArray($notice)
|
||||
{
|
||||
$profile = $notice->getProfile();
|
||||
|
||||
$entry = array();
|
||||
|
||||
if (Event::handle('StartRssEntryArray', array($notice, &$entry))) {
|
||||
|
||||
$profile = $notice->getProfile();
|
||||
|
||||
// We trim() to avoid extraneous whitespace in the output
|
||||
|
||||
$entry['content'] = common_xml_safe_str(trim($notice->rendered));
|
||||
|
@ -524,6 +526,9 @@ class ApiAction extends Action
|
|||
$entry['geo'] = null;
|
||||
}
|
||||
|
||||
Event::handle('EndRssEntryArray', array($notice, &$entry));
|
||||
}
|
||||
|
||||
return $entry;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue