Hello,
ACF Extended developer here!
Please allow me to intervene to give a little more context to the user’s request. Typically, the user is using ACF Extended to create posts from a front-end form, and he would like to programmatically configure the newly created posts to automatically expire on a specific date using your plugin.
Users can add any custom PHP code when a post is created on the front-end. So I guess it would be possible to add post meta (or any other data) to the newly created posts, so PublishPress Future interact with it and understands when it has to delete them.
Looking at your documentation about interactions with third party plugins, here is an example of possible usage:
// this is executed everytime a post is created on the front-end
add_action('acfe/form/submit_post/form=my-form', 'my_post_submit', 10, 4);
function my_post_submit($post_id, $args, $form, $action){
// PublishPress Future: enable expiration
update_post_meta($post_id, '_expiration_status', '1');
// PublishPress Future: add expiration date
update_post_meta($post_id, '_expiration_date', '2024-10-24 00:00:00');
// PublishPress Future: enable expiration delete
update_post_meta($post_id, '_expiration_type', 'delete');
// ...
// ...
}
I’m not 100% sure about this code, it is just an example to illustrate what the user could do.
I’ll let you describe how to configure the Post Type to the user, if there is any configuration to do there. But for the front-end part, he’s looking for the PHP code to use to automatically configure the newly created post.
I hope this will give you more context.
Thanks!
Regards.