adding autosave feature to custom fields
Take a look at these lines to have an idea about adding the autosave feature: function hcf_save( $post_id ) { if ( defined( ‘DOING_AUTOSAVE’ ) && DOING_AUTOSAVE ) { return; } if ( $parent_id = wp_is_post_revision( $post_id ) ) { $post_id = $parent_id; } $field_list = [ ‘hcf_author’, ‘hcf_published_date’, ‘hcf_price’, ]; foreach ( $field_list as … Read more