WordPress Pinger - How does it work?

ajnnadeau

New member
May 21, 2007
42
1
0
I have a plugin that automatically makes WordPress blog posts by basically posting directly to the wordpress mysql database. I am not sure if WordPress's built-in pinger is being executed with each new post.

My question to all you WP buffs is how does the WP pinger get fired and what would I have to do to fire the WP pinger? Also, is there a way to check to see if my posts are already being pinged?

Thanks in advance for everyones help.
 


guerrilla,

I actually read somewhere that WordPress will ping when you initially schedule the post even though the post is scheduled to go live in the future, but this really isn't my question.

I am trying to figure out how I can get WordPress to ping my posts that are being posted by simply making an entry into the mysql database and not directly posting through the WordPress interface.
 
Thanks LogicFlux. I will have to look into the wp_insert_post function. Anyone else have any experience with this type of issue?
 
I actually read somewhere that WordPress will ping when you initially schedule the post even though the post is scheduled to go live in the future, but this really isn't my question.
This is not longer true, its only when the post gets published. There is also variables in the posts table which says if the page has been pinged and if it should be.

Whip out your mysql client of choice and run the following:

Code:
mysql> SELECT pinged,ping_status FROM wp_posts;
The function which checks to see what needs to be pinged is called get_to_ping(), generic_ping($post_id) does the actual pinging, do_all_pings() does all the pingy type stuff (trackbacks, pingbacks and whatnot).

I think that that by default the pings should be done by WP's cron function

Code:
mysql> select * from wp_options where option_name='cron';
The strange string stuff that is returned from this SQL select statement is serilize() array of functions to call.
 
Last edited:
Thanks Victory. Now it is time to go try to figure all this out. Any idea what the default settings for "pinged" and "ping_status" are BEFORE a post gets pinged?