[wp-trac] [WordPress Trac] #39032: When saving Custom CSS, preserve the original version in the revision history.
WordPress Trac
noreply at wordpress.org
Fri Dec 2 19:35:50 UTC 2016
#39032: When saving Custom CSS, preserve the original version in the revision
history.
-----------------------------+-----------------------------
Reporter: georgestephanis | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Customize | Version: trunk
Severity: major | Keywords: has-patch
Focuses: |
-----------------------------+-----------------------------
Related: #30854
When saving CSS revisions via `wp_update_custom_css_post()` the initial
css is lost, and only subsequent updates are versioned in revisions in the
database.
To avoid data loss, @adamsilverstein demonstrated that calling
`wp_update_post( $post )` immediately after insertion can create the
revision correctly as a stopgap measure here:
https://core.trac.wordpress.org/attachment/ticket/30854/test_wp_first_revision_is_not_lost.2.diff
This is only a targeted fix, and will not preserve the first revision of
posts managed via the new WP REST API endpoints.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39032>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list