From 21511593a455de8b517882a27e30c173ac12c5d3 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 5 Sep 2013 16:22:14 +0000 Subject: [PATCH] Document the trackback_post hook in wp-trackback.php. props bananastalktome. see #25229. git-svn-id: https://develop.svn.wordpress.org/trunk@25253 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-trackback.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/wp-trackback.php b/src/wp-trackback.php index 8b41505f2b..a9e549c009 100644 --- a/src/wp-trackback.php +++ b/src/wp-trackback.php @@ -104,7 +104,14 @@ if ( !empty($tb_url) && !empty($title) ) { $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type'); wp_new_comment($commentdata); + $trackback_id = $wpdb->insert_id; - do_action('trackback_post', $wpdb->insert_id); - trackback_response(0); + /** + * Fires after a trackback is added to a post + * + * @since 1.2.0 + * @param int $trackback_id Trackback ID. + */ + do_action( 'trackback_post', $trackback_id ); + trackback_response( 0 ); }