As per this thread I'm scheduling a wp_cron every hour which runs a function. The function I'm running is reasonably lengthy and I didn't want authors to have to deal with the waiting times.
My question is this - when creating a function which runs from the following code ($ids is a list of post IDs):
$ids = unserialize( get_option( 'my_updated_posts' ) );
foreach( $ids as $v ) {
YOUR_FUNCTION_HERE( $v );
}
How do I a) retrieve content if the id relates to a Post type and then update it, or b) update meta fields if said id is actually a species Custom Post Type?
For b), will I have to update each meta field individually or is there a filter I can apply?
Thanks in advance,