1

If you write a title, then move away from (blur) that input field, WordPress will auto-save a draft for you, likely in order to create a post slug placeholder for you.

I'm looking to possibly extend this functionality to also save on blurring of the content body TinyMCE pane. The logic is not entirely straightforward -- for example, it appears to saves a draft only when the post is yet unpublished -- so I need to look further into the logic.

In order to scope this change, I need to find where in the JavaScript (?) codebase WordPress does this auto-saving. Having trouble so far. Does anyone know?

2

I believe the file responsible is wp-includes/js/autosave.js. There is a dev version for easy reading.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.