I'd like my script to post an article to Wordpress site automatically.
Looks like Wordpress's
wp_insert_post() function is what I need. But if I would include
wp-includes/post.php file into my script the function
add_action() (placed in
wp-includes/plugin.php) will be needed.
The same story to
So I will probably need to include more and more files and I don't really like it as I'm not sure that everything will be OK with this mass including.
Probably Wordpress has some let's say 'header' file?
I tried also to include
wp-blog-header.php file which looks like including all needed functions (at least my script stops to argue for using of unknowing functions) but it sends headers and probably can do something what I'm not expected.
Disclaimer: I have read wp_insert_post page on Codex and make some network search. But I still don't have an answers.