]> git.mjollnir.org Git - s9y.git/commitdiff
allow plugins to send trackbacks despite missing RDF metadata
authorgarvinhicking <garvinhicking>
Mon, 2 May 2005 12:31:41 +0000 (12:31 +0000)
committergarvinhicking <garvinhicking>
Mon, 2 May 2005 12:31:41 +0000 (12:31 +0000)
docs/NEWS
include/functions_trackbacks.inc.php

index b28667e2b435bad72b832c79831df5b5efce440d..382c29dc99e152934f7249bb6366c6973b3dc5b9 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,6 +3,10 @@
 Version 0.9 ()
 ------------------------------------------------------------------------
 
+    * Added new event hook to the trackback sending facility so that
+      plugins like serendipity_event_trackback (additional_plugins)
+      can send trackbacks to Blogs without RDF-metadata (garvinhicking)
+
     * Allow to view and fetch multiple categories. Categories plugin
       can allow viewers to select multiple categories to view.
       (garvinhicking)
index 9b3abc08e13a2914de7a9ede52685d70e8d7c637..3c4a153dba24ef090cafd6e086f6cc64117801d1 100644 (file)
@@ -120,8 +120,14 @@ function _serendipity_send($loc, $data) {
 
 function serendipity_trackback_autodiscover($res, $loc, $url, $author, $title, $text, $loc2 = '') {
     if (!preg_match('@trackback:ping(\s*rdf:resource)?\s*=\s*["\'](https?:[^"\']+)["\']@i', $res, $matches)) {
-        echo '<div>&#8226; ' . sprintf(TRACKBACK_FAILED, TRACKBACK_NOT_FOUND) . '</div>';
-        return false;
+        $matches = array();
+        serendipity_plugin_api::hook_event('backend_trackback_check', $matches, $loc);
+        
+        // Plugins may say that a URI is valid, in situations where a blog has no valid RDF metadata
+        if (empty($matches[2])) {
+            echo '<div>&#8226; ' . sprintf(TRACKBACK_FAILED, TRACKBACK_NOT_FOUND) . '</div>';
+            return false;
+        }
     }
 
     $trackURI = trim($matches[2]);