Changeset 49632 for trunk/src/wp-admin/includes/upgrade.php
- Timestamp:
- 11/17/2020 05:22:32 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/upgrade.php
r49581 r49632 875 875 } 876 876 877 if ( $wp_current_db_version < 49 572 ) {877 if ( $wp_current_db_version < 49632 ) { 878 878 upgrade_560(); 879 879 } … … 2248 2248 */ 2249 2249 function upgrade_560() { 2250 global $wpdb; 2251 2252 // Clean up the `post_category` column removed from schema in version 2.8.0. 2253 // Its presence may conflict with WP_Post::__get(). 2254 $post_category_exists = $wpdb->get_var( "SHOW COLUMNS FROM $wpdb->posts LIKE 'post_category'" ); 2255 if ( ! is_null( $post_category_exists ) ) { 2256 $wpdb->query( "ALTER TABLE $wpdb->posts DROP COLUMN `post_category`" ); 2257 } 2258 2259 // When upgrading from WP < 5.6.0 set the core major auto-updates option to `unset` by default. 2260 // This overrides the same option from populate_options() that is intended for new installs. 2261 // See https://core.trac.wordpress.org/ticket/51742. 2262 update_option( 'auto_update_core_major', 'unset' ); 2250 global $wp_current_db_version, $wpdb; 2251 2252 if ( $wp_current_db_version < 49572 ) { 2253 /* 2254 * Clean up the `post_category` column removed from schema in version 2.8.0. 2255 * Its presence may conflict with `WP_Post::__get()`. 2256 */ 2257 $post_category_exists = $wpdb->get_var( "SHOW COLUMNS FROM $wpdb->posts LIKE 'post_category'" ); 2258 if ( ! is_null( $post_category_exists ) ) { 2259 $wpdb->query( "ALTER TABLE $wpdb->posts DROP COLUMN `post_category`" ); 2260 } 2261 2262 /* 2263 * When upgrading from WP < 5.6.0 set the core major auto-updates option to `unset` by default. 2264 * This overrides the same option from populate_options() that is intended for new installs. 2265 * See https://core.trac.wordpress.org/ticket/51742. 2266 */ 2267 update_option( 'auto_update_core_major', 'unset' ); 2268 } 2269 2270 if ( $wp_current_db_version < 49632 ) { 2271 /* 2272 * Regenerate the .htaccess file to add the `HTTP_AUTHORIZATION` rewrite rule. 2273 * See https://core.trac.wordpress.org/ticket/51723. 2274 */ 2275 save_mod_rewrite_rules(); 2276 } 2263 2277 } 2264 2278
Note: See TracChangeset
for help on using the changeset viewer.