CoreFiles by mySites.guru
execute-pings.php30 lines, 1,267 bytes, from wordpress-2.0.zip
Raw History Compare with 1.5.2
md5
dea132d5b99c69f91df7fe275c8ed130
sha1
dfa0f69cff59b3784ef3ff5aa494291a536af799
sha256
39ce599974aadc4f45e5a379eae91027c860e536cdf6f02bf874b7e27f25c13e
<?php
require_once('../wp-config.php');

register_shutdown_function('execute_all_pings');
//execute_all_pings();

function execute_all_pings() {
	global $wpdb;
	// Do pingbacks
	while ($ping = $wpdb->get_row("SELECT * FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_pingme' LIMIT 1")) {
		$wpdb->query("DELETE FROM {$wpdb->postmeta} WHERE post_id = {$ping->ID} AND meta_key = '_pingme';");
		pingback($ping->post_content, $ping->ID);
		echo "Pingback: $ping->post_title : $ping->ID<br/>";
	}
	// Do Enclosures
	while ($enclosure = $wpdb->get_row("SELECT * FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_encloseme' LIMIT 1")) {
		$wpdb->query("DELETE FROM {$wpdb->postmeta} WHERE post_id = {$enclosure->ID} AND meta_key = '_encloseme';");
		do_enclose($enclosure->post_content, $enclosure->ID);
		echo "Enclosure: $enclosure->post_title : $enclosure->ID<br/>";
	}
	// Do Trackbacks
	while ($trackback = $wpdb->get_row("SELECT ID FROM $wpdb->posts WHERE TRIM(to_ping) != '' AND post_status != 'draft' LIMIT 1")) {
		echo "Trackback : $trackback->ID<br/>";
		do_trackbacks($trackback->ID);
	}
}

_e('Done.');

?>

No other release has this exact content. See every version of this file.