diff options
author | Friendika <info@friendika.com> | 2010-12-24 18:32:23 -0800 |
---|---|---|
committer | Friendika <info@friendika.com> | 2010-12-24 18:32:23 -0800 |
commit | 10731ea361005bc6a56516ad03984b6c366b3a27 (patch) | |
tree | 0b980b0a3a1d56ea0c975e0f017a9fceef6d34f3 /include | |
parent | c217e9da345d6c6c0d42da3a0de39294a4454f6f (diff) | |
download | volse-hubzilla-10731ea361005bc6a56516ad03984b6c366b3a27.tar.gz volse-hubzilla-10731ea361005bc6a56516ad03984b6c366b3a27.tar.bz2 volse-hubzilla-10731ea361005bc6a56516ad03984b6c366b3a27.zip |
more plugin hooks
Diffstat (limited to 'include')
-rw-r--r-- | include/items.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php index 75445ee49..a606749ce 100644 --- a/include/items.php +++ b/include/items.php @@ -158,7 +158,12 @@ function get_feed_for(&$a, $dfrn_id, $owner_id, $last_update, $direction = 0) { )); + call_hooks('atom_feed', $atom); + if(! count($items)) { + + call_hooks('atom_feed_end', $atom); + $atom .= '</feed>' . "\r\n"; return $atom; } @@ -177,6 +182,8 @@ function get_feed_for(&$a, $dfrn_id, $owner_id, $last_update, $direction = 0) { $atom .= atom_entry($item,$type,null,$owner,true); } + call_hooks('atom_feed_end', $atom); + $atom .= '</feed>' . "\r\n"; return $atom; } @@ -491,6 +498,8 @@ function get_atom_elements($feed,$item) { $res['target'] .= '</target>' . "\n"; } + call_hooks('parse_atom', array('feed' => $feed, 'item' => $item, 'result' => $res)); + return $res; } @@ -1231,6 +1240,9 @@ function atom_author($tag,$name,$uri,$h,$w,$photo) { $o .= "<uri>$uri</uri>\r\n"; $o .= '<link rel="photo" type="image/jpeg" media:width="' . $w . '" media:height="' . $h . '" href="' . $photo . '" />' . "\r\n"; $o .= '<link rel="avatar" type="image/jpeg" media:width="' . $w . '" media:height="' . $h . '" href="' . $photo . '" />' . "\r\n"; + + call_hooks('atom_author', $o); + $o .= "</$tag>\r\n"; return $o; } @@ -1287,6 +1299,8 @@ function atom_entry($item,$type,$author,$owner,$comment = false) { if($mentioned) $o .= $mentioned; + call_hooks('atom_entry', $o); + $o .= '</entry>' . "\r\n"; return $o; |