Opened 6 years ago
Last modified 4 years ago
#3491 accepted enhancement
new hooks for pingback, trackback?
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| 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)
Change History (11)
monkinetic — 6 years ago
- Keywords has-patch added; pingback trackback hooks removed
Looks good. Can we fit this into 2.0.6 or is that feature frozen?
comment:2
markjaquith — 6 years ago
- 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).
comment:3
monkinetic — 6 years ago
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?
comment:4
foolswisdom — 6 years ago
- Milestone changed from 2.2 to 2.3
- 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

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