Ticket #3491 (assigned enhancement)

Opened 2 years ago

Last modified 5 months ago

new hooks for pingback, trackback?

Reported by: monkinetic Assigned to: markjaquith (accepted)
Priority: normal Milestone: 2.6
Component: General Version:
Severity: normal Keywords: has-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

trackback_extend_comment.patch (498 bytes) - added by monkinetic on 12/22/06 16:53:52.
This patch adds a call to a new hook before a trackback is saved
pingback_extend_comment.patch (1.1 kB) - added by monkinetic on 12/22/06 17:32:54.
This patch adds a new hook before a pingback is saved

Change History

12/22/06 16:53:52 changed by monkinetic

  • attachment trackback_extend_comment.patch added.

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

12/22/06 17:32:54 changed by monkinetic

  • attachment pingback_extend_comment.patch added.

This patch adds a new hook before a pingback is saved

12/23/06 02:06:48 changed by shorty114

  • keywords changed from pingback trackback hooks to has-patch.

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

12/23/06 10:58:54 changed by markjaquith

  • 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).

12/24/06 15:04:23 changed by monkinetic

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?

03/27/07 22:56:48 changed by foolswisdom

  • milestone changed from 2.2 to 2.3.

09/13/07 21:12:29 changed by ryan

  • milestone changed from 2.3 to 2.4.

02/15/08 13:48:23 changed by pishmishy

  • milestone changed from 2.5 to 2.6.

Feature request so bumping to 2.6 for feature freeze.