Opened 6 years ago

Last modified 4 years ago

#3491 accepted enhancement

new hooks for pingback, trackback?

Reported by: monkinetic Owned by: markjaquith
Priority: normal Milestone: Future Release
Component: Pings/Trackbacks Version:
Severity: normal Keywords: needs-patch
Cc:

Description

I'd like to propose two more hooks for Wordpress, one in pingback_ping()
and the other in wp-trackback.php.

background: http://redmonk.net/archives/2006/12/21/voteback/

The first hook would allow plugins to have access to the full text of a
hyperlink on a site that is pinging this site, before the comment is
built for a ping.

The second would allow plugins to have access to the full post data for
a trackback before the comment is built.

Attachments (3)

trackback_extend_comment.patch (498 bytes) - added by monkinetic 6 years ago.
This patch adds a call to a new hook before a trackback is saved
pingback_extend_comment.patch (1.1 KB) - added by monkinetic 6 years ago.
This patch adds a new hook before a pingback is saved
3491.diff (1.6 KB) - added by sorich87 3 years ago.

Download all attachments as: .zip

Change History (11)

This patch adds a call to a new hook before a trackback is saved

This patch adds a new hook before a pingback is saved

  • Keywords has-patch added; pingback trackback hooks removed

Looks good. Can we fit this into 2.0.6 or is that feature frozen?

  • Owner changed from anonymous to markjaquith
  • Status changed from new to assigned

The trackback_extend_comment.patch isn't needed... you can access the same data in the preprocess_comment hook. The filter is run on the first line of wp_new_comment() and $_POST is a superglobal, so you always have access to it.

The pingback excerpt generating code is flawed, which looking at your pingback patch brought attention to. See #3495 So that code will likely be changing... I'll revisit this once that's taken care of. The best way to handle this will likely be to stick that extra data you need into the commentdata array. That way no new filters are needed at all (again, you'd just use preprocess_comment).

Thanks Mark. Naturally, I figured out that trackback_extend_comment was not needed sometme *after* I posted the patch. Oh well. Is there a milestone you'd expect the new pingback data to show up in?

  • Milestone changed from 2.2 to 2.3

comment:5   ryan6 years ago

  • Milestone changed from 2.3 to 2.4
  • Milestone changed from 2.5 to 2.6

Feature request so bumping to 2.6 for feature freeze.

  • Component changed from General to Pings/Trackbacks
  • Keywords needs-patch added; has-patch removed
  • Milestone changed from 2.9 to Future Release
Note: See TracTickets for help on using tickets.