]> git.mxchange.org Git - friendica.git/blobdiff - include/items.php
freeform text area for private contact info - notes or things you just want to rememb...
[friendica.git] / include / items.php
index 75445ee4956c364014ec26e70cf2b324d005770d..22d47d44fe6cdb667f01cd341c080b8186c1cc66 100644 (file)
@@ -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,7 +182,10 @@ 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 +499,10 @@ function get_atom_elements($feed,$item) {
                $res['target'] .= '</target>' . "\n";
        }
 
+       $arr = array('feed' => $feed, 'item' => $item, 'result' => $res);
+
+       call_hooks('parse_atom', $arr);
+
        return $res;
 }
 
@@ -1231,6 +1243,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 +1302,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;