8 votes
Accepted

Callback for wp.autosave.server.triggerSave();

So I found the solution, callback function for when post or page is: jQuery(document).on('heartbeat-tick.autosave', function( event, data ) { // your code here }); This uses the Wordpress ...
Aumkar Thakur's user avatar
3 votes
Accepted

Autosave interval remains default despite wp-config.php defines

You should not put any defines in the end of the wp_config.php it is actually explicitly stated in it ;) Every define you add should be above the line saying /* That's all, stop editing! Happy ...
Mark Kaplun's user avatar
  • 23.2k
2 votes
Accepted

Autosave control in WordPress

Autosave: Autosave is simply about saving your posts automatically in the background while you are editing. So it's different from revisions and for every post there will be only one autosave per ...
Fayaz's user avatar
  • 8,819
1 vote
Accepted

Implementing Autosave Functionality for Long, Multi-page Forms in WordPress

If you can stash the fields one at a time, I'd do something like this: In functions.php or somewhere: add_action ( 'wp_ajax_save_long_form_field', 'my_save_long_form_field', 10, 0 ); function ...
Brian Page's user avatar
1 vote
Accepted

404 in gutenberg autosave of a Custom Post Type with custom rest_namespace

So, why the default namespace persist if I did all right? Would it be some javascript function of wordpress that would be doing the request on the incorrect route? What function? How to fix it? If ...
Tom J Nowell's user avatar
  • 57.6k
1 vote
Accepted

Wordpress publish_post hook not getting featured image and meta on first publish, but works on updating title

I don't know if it's the Gutenberg editor or if it's the hook publish_post The hook itself works, and if you used the old WordPress post editor, then the issue in question would not happen. So you ...
Sally CJ's user avatar
  • 37.3k
1 vote
Accepted

Auto save permalink setting page with the plugin activation

You should use flush_rewrite_rules function for that. You have to remember, that this is expensive task, so you should not do it every time the site loads (many tutorials are making such mistake). ...
Krzysiek Dróżdż's user avatar
1 vote

Disable auto-save and post revisions from inside a theme or plugin

You mentioned: Is there a way, to do that from within a plugin or a themes functions.php? You may want to try the following code. Just place it inside your theme's functions.php file. Using it, ...
marikamitsos's user avatar
1 vote

Disable auto-save and post revisions from inside a theme or plugin

i have found this code: define('my_revisions_amount', 1); // let keep only one revision define('my_autosave_interval', 600); // 600 minutes is enough if (is_admin()){ add_filter( ...
T.Todua's user avatar
  • 5,679

Only top scored, non community-wiki answers of a minimum length are eligible