Commit 4a6d2fb8 authored by root's avatar root Committed by agata
Browse files

Remove pingback/trackback

Do not perform pingbacks and trackbacks when we update via cron.
parent f4f5cecd
...@@ -2629,13 +2629,11 @@ function do_all_pings() { ...@@ -2629,13 +2629,11 @@ function do_all_pings() {
// Do pingbacks // Do pingbacks
while ( $ping = $wpdb->get_row( "SELECT ID, post_content, meta_id FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_pingme' LIMIT 1" ) ) { while ( $ping = $wpdb->get_row( "SELECT ID, post_content, meta_id FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_pingme' LIMIT 1" ) ) {
delete_metadata_by_mid( 'post', $ping->meta_id ); delete_metadata_by_mid( 'post', $ping->meta_id );
pingback( $ping->post_content, $ping->ID );
} }
// Do Enclosures // Do Enclosures
while ( $enclosure = $wpdb->get_row( "SELECT ID, post_content, meta_id FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_encloseme' LIMIT 1" ) ) { while ( $enclosure = $wpdb->get_row( "SELECT ID, post_content, meta_id FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_encloseme' LIMIT 1" ) ) {
delete_metadata_by_mid( 'post', $enclosure->meta_id ); delete_metadata_by_mid( 'post', $enclosure->meta_id );
do_enclose( $enclosure->post_content, $enclosure->ID );
} }
// Do Trackbacks // Do Trackbacks
...@@ -2691,9 +2689,8 @@ function do_trackbacks( $post_id ) { ...@@ -2691,9 +2689,8 @@ function do_trackbacks( $post_id ) {
if ( $to_ping ) { if ( $to_ping ) {
foreach ( (array) $to_ping as $tb_ping ) { foreach ( (array) $to_ping as $tb_ping ) {
$tb_ping = trim( $tb_ping ); $tb_ping = trim($tb_ping);
if ( ! in_array( $tb_ping, $pinged ) ) { if ( !in_array($tb_ping, $pinged) ) {
trackback( $tb_ping, $post_title, $excerpt, $post->ID );
$pinged[] = $tb_ping; $pinged[] = $tb_ping;
} else { } else {
$wpdb->query( $wpdb->query(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment