function fwp_publish_post_hook($post_id) { global $fwp_held_ping; if (!is_null($fwp_held_ping)) { // Syndicated post. Don't mark with _pingme if (defined('XMLRPC_REQUEST')) { do_action('xmlrpc_publish_post', $post_id); } if (defined('APP_REQUEST')) { do_action('app_publish_post', $post_id); } if (defined('WP_IMPORTING')) { return; } // Defer sending out pings until we finish updating $fwp_held_ping = $post_id; } else { if (function_exists('_publish_post_hook')) { // WordPress 2.3 _publish_post_hook($post_id); } } }
function csyn_generic_ping($post_id) { global $wpdb, $csyn_syndicator; $dates = $wpdb->get_row("SELECT post_date, post_modified FROM {$wpdb->posts} WHERE id={$post_id}"); if ($csyn_syndicator->count <= 1 && $dates->post_modified == $dates->post_date && (strtotime($dates->post_modified < time()) || strtotime($dates->post_date) < time())) { if (function_exists('_publish_post_hook')) { _publish_post_hook($post_id); } else { generic_ping(); } } }