upgrade_300() – Execute changes made in WordPress 3.0.

You appear to be a bot. Output may be restricted

Description

Execute changes made in WordPress 3.0.

Usage

upgrade_300();

Parameters

Returns

void

Source

File name: wordpress/wp-admin/includes/upgrade.php
Lines:

1 to 41 of 41
function upgrade_300() {
  global $wp_current_db_version, $wpdb;

  if ( $wp_current_db_version < 15093 ) {
    populate_roles_300();
  }

  if ( $wp_current_db_version < 14139 && is_multisite() && is_main_site() && ! defined( 'MULTISITE' ) && get_site_option( 'siteurl' ) === false ) {
    add_site_option( 'siteurl', '' );
  }

  // 3.0 screen options key name changes.
  if ( wp_should_upgrade_global_tables() ) {
    $sql    = "DELETE FROM $wpdb->usermeta
			WHERE meta_key LIKE %s
			OR meta_key LIKE %s
			OR meta_key LIKE %s
			OR meta_key LIKE %s
			OR meta_key LIKE %s
			OR meta_key LIKE %s
			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'";
    $prefix = $wpdb->esc_like( $wpdb->base_prefix );
    $wpdb->query(
      $wpdb->prepare(
        $sql,
        $prefix . '%' . $wpdb->esc_like( 'meta-box-hidden' ) . '%',
        $prefix . '%' . $wpdb->esc_like( 'closedpostboxes' ) . '%',
        $prefix . '%' . $wpdb->esc_like( 'manage-' ) . '%' . $wpdb->esc_like( '-columns-hidden' ) . '%',
        $prefix . '%' . $wpdb->esc_like( 'meta-box-order' ) . '%',
        $prefix . '%' . $wpdb->esc_like( 'metaboxorder' ) . '%',
        $prefix . '%' . $wpdb->esc_like( 'screen_layout' ) . '%'
      )
    );
  }

}
 

 View on GitHub View on Trac