WordPress Version: 3.1
/**
* Saves the footnotes meta value to the revision.
*
* @since 6.3.0
*
* @param int $revision_id The revision ID.
*/
function wp_save_footnotes_meta($revision_id)
{
$post_id = wp_is_post_revision($revision_id);
if ($post_id) {
$footnotes = get_post_meta($post_id, 'footnotes', true);
if ($footnotes) {
// Can't use update_post_meta() because it doesn't allow revisions.
update_metadata('post', $revision_id, 'footnotes', wp_slash($footnotes));
}
}
}