WordPress.org

Make WordPress Core

Ticket #31625: 31625.2.diff

File 31625.2.diff, 1.2 KB (added by polevaultweb, 5 years ago)
  • src/wp-admin/includes/upgrade.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    552552        if ( $wp_current_db_version < 36686 )
    553553                upgrade_450();
    554554
     555        if ( $wp_current_db_version < 37308 )
     556                upgrade_460();
     557
    555558        maybe_disable_link_manager();
    556559
    557560        maybe_disable_automattic_widgets();
     
    16851688
    16861689        // Remove unused user setting for wpLink.
    16871690        delete_user_setting( 'wplink' );
     1691}
     1692
     1693/**
     1694 * Execute changes made in WordPress 4.6.0
     1695 *
     1696 * @ignore
     1697 * @since 4.6.0
     1698 */
     1699function upgrade_460() {
     1700        // Remove plugins with callback as an array object/method as the uninstall hook
     1701        $uninstall_plugins = get_option( 'uninstall_plugins', array() );
     1702        if ( ! empty( $uninstall_plugins ) ) {
     1703                foreach ( $uninstall_plugins as $basename => $callback ) {
     1704                        if ( is_array( $callback ) && is_object( $callback[0] ) ) {
     1705                                unset( $uninstall_plugins[ $basename ] );
     1706                        }
     1707                }
     1708
     1709                update_option( 'uninstall_plugins', $uninstall_plugins );
     1710        }
    16881711}
    16891712
    16901713/**