Skip to content

Commit

Permalink
Footnotes: autosave saves decoded JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Aug 15, 2023
1 parent 6f567a5 commit ea1603a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-library/src/footnotes/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ function _wp_rest_api_autosave_meta( $autosave ) {
return;
}

update_post_meta( $id, 'footnotes', $body['meta']['footnotes'] );
update_post_meta( $id, 'footnotes', json_encode( $body['meta']['footnotes'] ) );
}
// See https://github.com/WordPress/wordpress-develop/blob/2103cb9966e57d452c94218bbc3171579b536a40/src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php#L391C1-L391C1.
add_action( 'wp_creating_autosave', '_wp_rest_api_autosave_meta' );
Expand Down

0 comments on commit ea1603a

Please sign in to comment.