WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/23/2016 02:31:15 PM (4 years ago)
Author:
swissspidy
Message:

Revisions: Remove unused post meta data during database upgrade.

Introduced in [23811], WordPress displayed some additional information for restored revisions for a short period of time. This was removed again in [25194], but the meta data was still being saved unnecessarily.

After 3 years and no plugins ever using this meta data, it's time to stop collecting it.

Fixes #36526.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/upgrade.php

    r37583 r37854  
    552552    if ( $wp_current_db_version < 36686 )
    553553        upgrade_450();
     554
     555    if ( $wp_current_db_version < 37854 )
     556        upgrade_460();
    554557
    555558    maybe_disable_link_manager();
     
    16891692
    16901693/**
     1694 * Executes changes made in WordPress 4.6.0.
     1695 *
     1696 * @ignore
     1697 * @since 4.6.0
     1698 *
     1699 * @global int  $wp_current_db_version Current database version.
     1700 * @global wpdb $wpdb                  WordPress database abstraction object.
     1701 */
     1702function upgrade_460() {
     1703    delete_post_meta_by_key( '_post_restored_from' );
     1704}
     1705
     1706/**
    16911707 * Executes network-level upgrade routines.
    16921708 *
Note: See TracChangeset for help on using the changeset viewer.