Calling WordPress functions from third party script
-
I have a script that loops through a database full of articles and posts them into the wordpress database structure. I’ve figured I need to call wordpress functionality to add the scheduled posts to the cron array. I need to do this as they just sit there as future posts otherwise, even after the post timestamp elapses.
So, I assume in order to do this I have to call:
wp_clear_scheduled_hook( 'publish_future_post', $post->ID ); wp_schedule_single_event(strtotime($post->post_date_gmt. ' GMT'), 'publish_future_post', array($post->ID));
But I’m unsure what I have to put in my script to call these, and where in the wordpress file structure I have to put the script.
Can anyone understand what I’m trying to do, and can anyone offer any help? Many thanks.
If its plugin territory, thats fine, but I’ve never written a plugin before.
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Calling WordPress functions from third party script’ is closed to new replies.