Support

Account

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()