Make WordPress Core

Ticket #26334: 26334.patch

File 26334.patch, 1.0 KB (added by SergeyBiryukov, 11 years ago)
  • src/wp-admin/includes/upgrade.php

     
    412412
    413413        maybe_disable_automattic_widgets();
    414414
     415        maybe_disable_mp6_thx38_dash();
     416
    415417        update_option( 'db_version', $wp_db_version );
    416418        update_option( 'db_upgraded', true );
    417419}
     
    19901992}
    19911993
    19921994/**
     1995 * Disables MP6, THX38, and DASH plugins, which were merged into core.
     1996 *
     1997 * @since 3.8.0
     1998 */
     1999function maybe_disable_mp6_thx38_dash() {
     2000        $plugins = __get_option( 'active_plugins' );
     2001
     2002        foreach ( (array) $plugins as $plugin ) {
     2003                if ( in_array( basename( $plugin ), array( 'mp6.php', 'thx-38.php', 'dashboard.php' ) ) ) {
     2004                        array_splice( $plugins, array_search( $plugin, $plugins ), 1 );
     2005                        update_option( 'active_plugins', $plugins );
     2006                        break;
     2007                }
     2008        }
     2009}
     2010
     2011/**
    19932012 * Disables the Link Manager on upgrade, if at the time of upgrade, no links exist in the DB.
    19942013 *
    19952014 * @since 3.5.0