From bd94583aafe1ca54a3710f48a1086f1a966a5086 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 23 Aug 2012 20:43:47 +0000 Subject: [PATCH] Use get_post() instead of bare SQL in do_trackbacks(). see #21309 git-svn-id: http://core.svn.wordpress.org/trunk@21599 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 19aff1223c..aaf19d6b90 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -1709,7 +1709,7 @@ function do_all_pings() { function do_trackbacks($post_id) { global $wpdb; - $post = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->posts WHERE ID = %d", $post_id) ); + $post = get_post( $post_id ); $to_ping = get_to_ping($post_id); $pinged = get_pung($post_id); if ( empty($to_ping) ) {