intertwingly

It’s just data

Two Pings For Every Post


Joseph Scott: Today we’ve turned on PuSH support for the more than 10.5 million blogs on WordPress.com. There’s nothing to configure, it’s working right now behind the scenes to help others keep up to date with your posts.

function publish_post( $post_id ) {
	$subs = $this->get_subscribers( get_bloginfo( 'rss2_url' ) );
	foreach ( (array) $subs as $callback => $data ) {
		if ( $data['is_active'] == FALSE )
			continue;

		$this->schedule_ping( $callback, $post_id, 'rss2', $data['secret'] );
	}

	$subs = $this->get_subscribers( get_bloginfo( 'atom_url' ) );
	foreach ( (array) $subs as $callback => $data ) {
		if ( $data['is_active'] == FALSE )
			continue;

		$this->schedule_ping( $callback, $post_id, 'atom', $data['secret'] );
	}
}