From 747e0224602e6084d769e9c274a75f27ed9dbe4c Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 5 Sep 2013 16:23:09 +0000 Subject: [PATCH] Document the trackback_post hook in wp-trackback.php. props bananastalktome. see #25229. Built from https://develop.svn.wordpress.org/trunk@25253 git-svn-id: http://core.svn.wordpress.org/trunk@25221 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-trackback.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/wp-trackback.php b/wp-trackback.php index 8b41505f2b..a9e549c009 100644 --- a/wp-trackback.php +++ b/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 ); }