[wp-hackers] Quest for Self Pingbacks

Otto otto at ottodestruct.com
Wed Sep 2 16:57:56 UTC 2009

Okay, let's run down how pingbacks work, then you can figure out where
the breakage is.

1. When a post is published, if the default_pingback_flag option is
set, then _pingme gets added to the postmeta as a key. The
default_pingback_flag is the "Attempt to notify any blogs linked to
from the article" checkbox on the Settings->Discussions page.

2. Publishing also schedules the do_pings event for immediate
execution in the wp-cron system.

3. When wp-cron fires, it runs the do_pings hook, which is connected
to do_all_pings().

4. First thing do_all_pings() does is to look for posts that have
_pingme on them. For each one, it removes the _pingme and passes it to
the pingback() function.

5. pingback() sifts through the post_content, looking for any urls.
For each one, it loads the URL and looks for the pingback link in it.
If it finds one, it sends out an XML-RPC ping to it.

6. On a ping success, it pops the URL into the pinged column of the
post, to prevent later edits from pinging it again.

Any break in the steps along that path will break pings.


On Wed, Sep 2, 2009 at 8:29 AM, Chris Kasten<handy.solo at gmail.com> wrote:
> Ooops, sorry.
> Well, I have exactly two records with meta_key = '_pingme' in my postsmeta
> table.
> They appear to be referring to posts that don't exist from 3 years ago
> (based on post_id).

More information about the wp-hackers mailing list