After follow Ah Knight’s instruction of updating wp_posts to_ping column, it seem like I can’t perform normal trackback again. I got it fix and download the files here. Or read below for more details, there are 2 files need to be change, which is;
- wp-includes/function-posts.php
- wp-admin/execute-pings.php
file: wp-includes/function-post.php
line of code: 700
if ( empty($to_ping) )
return;
Instead of doing nothing here, we replace the return; to Ah Knight’s code, become;
if ( empty($to_ping) ) {
$wpdb->query("UPDATE $wpdb->posts SET to_ping = '' WHERE ID = '$post_id'");
return;
}
file: wp-admin/execute-pings.php
line of code: 22
while ($trackback = $wpdb->get_row("SELECT ID FROM $wpdb->posts WHERE TRIM(to_ping) != '' AND post_status != 'draft' LIMIT 1")) {
echo "Trackback : $trackback->ID
";
do_trackbacks($trackback->ID);
}
Some changes made here, make sure to_ping field is clean and make a trackbacks looping!
$trackbacks = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE TRIM(to_ping) != '' AND post_status != 'draft'");
if (is_array($trackbacks) && count($trackbacks)) {
foreach ($trackbacks as $trackback ) {
echo "Trackback : $trackback->ID
";
do_trackbacks($trackback->ID);
}
}
Done, if you not sure what am I explaning above, you can download the file here in zip format, if you are worry the code is not working, backup your original file.
Happy Trackback!
After 1 year and 6 months working with Ah Chua, today is his last day in the company, heh.. kinda sad leh… nobody can have breakfast with me early morning(usually other colleagues came in quiet late) at the mamak downstair, nobody will wank about php framework with me in the office with me, nobody talking about php classes with me, less people let me kacau, less people cock with me, cannot hear someone said, “No Good la.. no money”… cannot listen chinese oldies songs… 
