[wp-hackers] Need feedback on modification to pingback_ping(), new hook

Steve Ivy steveivy at gmail.com
Thu Dec 21 03:58:31 GMT 2006


Hello,

I'm working on an extension of the pingback mechanism that I don't
think fits as a separate xml-rpc mechanism that could be put in
pingback.extensions

For background, see my post about VoteLinks [1] (and mentally
substitute pingback for trackback)

So what I want to do is, during the pingback process, when WP is
scanning the sending post for the link, check to see if the link
contains a REV="vote-for" (/vote-against/vote-abstain) attribute, as
defined by the vote-links spec [2]. if so, then we store that
information somewhere so that themes or plugins have access to it,
essentially giving the link-ee the "intent" of the link.

Architecturally, I think that all that is needed is a hook/filter
somewhere during the link scanning process that would give plugins a
shot at what's being scanned, but i'm not at all certain of that

In my current implementation, I added a call to apply_filters
('pingback_link', $thefullAHref) that returns an array of extended
attributes that get merged with $commentdata. Then, I have a plugin
that adds a 'preprocess_comment' filter to modify the commentdata
based on the whether there is a vote in there.

Clear as mud, right? I'd love some feedback on the idea in general,
and my proposed implementation in specific. Ultimately, it's going to
require modifying pingback_ping() to provide the mid_ping hooks.

Thanks,

--Steve

[1] http://redmonk.net/archives/2006/12/20/votelinks-trackback-voteback/
[2] http://microformats.org/wiki/votelinks

-- 
Steve Ivy
http://redmonk.net


More information about the wp-hackers mailing list