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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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).
...
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, ...
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( ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
autosave × 47save-post × 9
custom-post-types × 7
revisions × 7
custom-field × 6
posts × 5
metabox × 4
plugin-development × 3
functions × 3
ajax × 3
plugins × 2
php × 2
customization × 2
javascript × 2
jquery × 2
wp-admin × 2
block-editor × 2
categories × 1
woocommerce-offtopic × 1
images × 1
permalinks × 1
css × 1
pages × 1
database × 1
widgets × 1