Make WordPress Core

Changes between Version 1 and Version 5 of Ticket #54708


Ignore:
Timestamp:
12/29/2021 06:33:35 PM (4 years ago)
Author:
adamsilverstein
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #54708

    • Property Keywords dev-feedback has-patch 2nd-opinion added
    • Property Owner set to adamsilverstein
    • Property Status changed from new to assigned
    • Property Summary changed from Retain existing autosave when new autosave is the same to Improve `_set_preview` for case when autosave missing
  • Ticket #54708 – Description

    v1 v5  
    88
    99Deleting the old autosave revision means that later when `src/wp-includes/revision.php` `_set_preview` gets called, and it calls `wp_get_post_autosave` the autosave is missing, and the preview data swaps are not activated.
    10 
    11 Note: core calls `add_filter( 'the_preview', '_set_preview' );` in `_show_post_preview` which is hooked on `init` in `src/wp-includes/default-filters.php`.
    1210
    1311The end result of this is that currently if you set a preview image using a block theme on a published post and preview it, the featured image is not displayed correctly. Skipping deleting the previous autosave fixes the issue.