WordPress.org

Make WordPress Core

Ticket #16741: 16741.upgrade.diff

File 16741.upgrade.diff, 1.8 KB (added by duck_, 7 years ago)
  • wp-admin/includes/upgrade.php

     
    11431143                $wpdb->query( "DELETE FROM $wpdb->usermeta WHERE meta_key LIKE '{$prefix}%meta-box-hidden%' OR meta_key LIKE '{$prefix}%closedpostboxes%' OR meta_key LIKE '{$prefix}%manage-%-columns-hidden%' OR meta_key LIKE '{$prefix}%meta-box-order%' OR meta_key LIKE '{$prefix}%metaboxorder%' OR meta_key LIKE '{$prefix}%screen_layout%'
    11441144                                         OR meta_key = 'manageedittagscolumnshidden' OR meta_key='managecategoriescolumnshidden' OR meta_key = 'manageedit-tagscolumnshidden' OR meta_key = 'manageeditcolumnshidden' OR meta_key = 'categories_per_page' OR meta_key = 'edit_tags_per_page'" );
    11451145        }
    1146 
    11471146}
    11481147
    11491148/**
     
    11861185                update_site_option( 'global_terms_enabled', '1' );
    11871186}
    11881187
     1188/**
     1189 * Execute changes made in WordPress 3.2.
     1190 *
     1191 * @since 3.2.0
     1192 */
     1193function upgrade_320() {
     1194        global $wpdb;
     1195
     1196        $wpdb->update( $wpdb->options, array( 'autoload' => 'no' ), array( 'option_name' => 'uninstall_plugins' ) );
     1197}
     1198
    11891199// The functions we use to actually do stuff
    11901200
    11911201// General
  • wp-admin/includes/schema.php

     
    321321
    322322        // 3.1
    323323        'default_post_format' => 0,
     324       
     325        // 3.2
     326        'uninstall_plugins' => array(),
    324327        );
    325328
    326329        // 3.0 multisite
     
    331334        }
    332335
    333336        // Set autoload to no for these options
    334         $fat_options = array( 'moderation_keys', 'recently_edited', 'blacklist_keys' );
     337        $fat_options = array( 'moderation_keys', 'recently_edited', 'blacklist_keys', 'uninstall_plugins' );
    335338
    336339        $existing_options = $wpdb->get_col("SELECT option_name FROM $wpdb->options");
    337340