IP camera jpg stream to post

If you’re adding a post every few seconds, then you’d really spam your database. Adding an attachment (which is some type of post), is not really different, but more appreciated. Take a look at these functions. Just my 2 cents: I’d just display it according to the url, not download, save and add a post … Read more

How can I send edits to my blog programmaticly?

Use the XML-RPC API to post to your blog. Windows Live Writer and other apps are using that too. I am not very familiar with that API, so I have no good examples. But you should find enough with the keyword. There are also many plugins with sample code.

Auto Populate Custom Field with Complex Value That Increase by One?

I suppose you need somewhere to globally store last order number. Preferable in table wp_options. Method update_option will help you. Then you need to make a function which will fires everytime when new order appears. something like that: add_action( ‘save_post’, ‘setOrderNumber’); function setOrderNumber($post_id) { $slug = ‘orders’; // slug of your post_type called “Orders” if … Read more

How to auto empty comment trash after X days

When deleting a comment it’s possible to use the second input argument: wp_delete_comment( $comment, $force_delete = true ) to delete it permanently and avoiding the trash bin. You could try to adjust your scheduled script accordingly. There’s also the EMPTY_TRASH_DAYS constant, that’s default set to empty the trash bin after 30 days, but it will … Read more