• Resolved quasiDigi

    (@quasidigi)


    Hello,

    Is there a way to only use revisions to keep track of saved changes? In other words: is it possible to disable the auto save function while keeping the revisions for saved changes?

    thx!

    ??

    • This topic was modified 4 years ago by quasiDigi.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Joy

    (@joyously)

    A revision is an entry in the posts table of the database, that the auto-save saves.
    Your question is a bit ambiguous.

    Moderator bcworkz

    (@bcworkz)

    The auto-save is independent of revisions. Auto-saves are always written to the same record. Revisions are added when you update the post. There’s no point in disabling auto-save. Revisions are intended to keep track of intentional changes only. I think you’re misinterpreting behavior and that WP is actually behaving as you wish.

    Thread Starter quasiDigi

    (@quasidigi)

    @joyously and @bcworkz,

    Thank you for your responses.

    Let me explain my specific need:

    Lets say that I make a cms for a shop. For them, I make a custom post type named client. There is no editor in the client ctp, only custom fields.
    All workers in the shops have a wp user.
    I want users to be able to edit a client on each visit. For example, when they change from preferred payment method.
    At the same time, their supervisor (another user) needs to be able to see the history the changes to the client, without the auto-saves. The supervisor needs to be able to see the change, the time of the change, and the user that made the change.
    The shop also wants to keep all changes. So, I thought that it would be convenient to disable auto-saving, keeping actual changes.

    Thanks!

    Moderator bcworkz

    (@bcworkz)

    The problem isn’t auto saves, it’s that only title and editor content changes are tracked. Custom field changes are not. To track custom field changes, I recommend seeking advice through the dedicated support forum of whatever custom field plugin you use.

    Thread Starter quasiDigi

    (@quasidigi)

    Ok, thank you. Although I can see the custom fields changes in the revisions.

    But nevertheless, is there a way to disable auto-save while keeping the revisions from the posts that have been updated?

    ///// EDIT:
    I did a little search with the rephrased version of my question and found this article that seems to answer my needs: https://www.collectiveray.com/wordpress-autosave

    Here is the script I used from that article:

    add_action( 'admin_init', 'disable_autosave' );
    
    function disable_autosave() {
    
        wp_deregister_script( 'autosave' );
    
    } 
    • This reply was modified 4 years ago by quasiDigi. Reason: found the answer
    • This reply was modified 4 years ago by quasiDigi. Reason: Added script
    • This reply was modified 4 years ago by quasiDigi. Reason: Typo
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Revisions for only Saved changes’ is closed to new replies.