Home › Forums › General Issues › Password protect page with password being a custom field value › Reply To: Password protect page with password being a custom field value
Yes, every time you update a post using wp_update_post() it generates a revision in addition to the one created when it is updated in the admin.
In order to prevent this you must remove the built in WP filter to save a revision
remove_filter('post_updated', 'wp_save_post_revision', 10);
and then add it back again
add_action('post_updated', 'wp_save_post_revision', 10);
It can get complicated depending on what revision you want to prevent. The one created during the normal update process or the one that is created when you manually call wp_update_post()
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2023 Advanced Custom Fields.