wp_save_footnotes_meta

The timeline below displays how wordpress function wp_save_footnotes_meta has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

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));
        }
    }
}

WordPress Version: 6.3

/**
 * 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', $footnotes);
        }
    }
}