Dotclear


Ignore:
Timestamp:
11/23/16 08:21:31 (9 years ago)
Author:
Jean-Christian Denis
Branch:
default
Message:

Open trackbacks with behaviors and add basic Webmention support, closes #1917

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/public/lib.urlhandlers.php

    r3030 r3415  
    520520                    if ($_ctx->posts->trackbacksActive()) { 
    521521                         header('X-Pingback: '.$core->blog->url.$core->url->getURLFor("xmlrpc",$core->blog->id)); 
     522                         header('Link: <'.$core->blog->url.$core->url->getURLFor('webmention').'>; rel="webmention"'); 
    522523                    } 
    523524                    self::serveDocument('post.html'); 
     
    681682               self::p404(); 
    682683          } else { 
     684               $core =& $GLOBALS['core']; 
     685               if (!is_array($args)) $args = array(); 
     686               $args['type'] = 'trackback'; 
     687 
     688               # --BEHAVIOR-- publicBeforeReceiveTrackback 
     689               $core->callBehavior('publicBeforeReceiveTrackback',$core,$args); 
     690 
    683691               $tb = new dcTrackback($GLOBALS['core']); 
    684                $tb->receive($args); 
    685           } 
     692               $tb->receiveTrackback($args); 
     693          } 
     694     } 
     695 
     696     public static function webmention($args) 
     697     { 
     698          $core =& $GLOBALS['core']; 
     699          if (!is_array($args)) $args = array(); 
     700          $args['type'] = 'webmention'; 
     701 
     702          # --BEHAVIOR-- publicBeforeReceiveTrackback 
     703          $core->callBehavior('publicBeforeReceiveTrackback',$core,$args); 
     704 
     705          $tb = new dcTrackback($core); 
     706          $tb->receiveWebmention(); 
    686707     } 
    687708 
Note: See TracChangeset for help on using the changeset viewer.

Sites map