Remove old edit_*_per_page usermeta keys.
These per-page values were when the post type or taxonomy name has a hyphen. Previously, these were converted to underscores. This changed in [21322]. fixes #18958. git-svn-id: http://core.svn.wordpress.org/trunk@21811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1b99559639
commit
d6b2024a7d
|
@ -399,7 +399,7 @@ function upgrade_all() {
|
||||||
if ( $wp_current_db_version < 20080 )
|
if ( $wp_current_db_version < 20080 )
|
||||||
upgrade_340();
|
upgrade_340();
|
||||||
|
|
||||||
if ( $wp_current_db_version < 21501 )
|
if ( $wp_current_db_version < 21811 )
|
||||||
upgrade_350();
|
upgrade_350();
|
||||||
|
|
||||||
maybe_disable_link_manager();
|
maybe_disable_link_manager();
|
||||||
|
@ -1195,6 +1195,19 @@ function upgrade_350() {
|
||||||
|
|
||||||
if ( $wp_current_db_version < 21501 && $wpdb->get_var( "SELECT link_id FROM $wpdb->links LIMIT 1" ) )
|
if ( $wp_current_db_version < 21501 && $wpdb->get_var( "SELECT link_id FROM $wpdb->links LIMIT 1" ) )
|
||||||
update_option( 'link_manager_enabled', 1 ); // Previously set to 0 by populate_options()
|
update_option( 'link_manager_enabled', 1 ); // Previously set to 0 by populate_options()
|
||||||
|
|
||||||
|
if ( $wp_current_db_version < 21811 && is_main_site() && ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) {
|
||||||
|
$meta_keys = array();
|
||||||
|
foreach ( array_merge( get_post_types(), get_taxonomies() ) as $name ) {
|
||||||
|
if ( false !== strpos( $name, '-' ) )
|
||||||
|
$meta_keys[] = 'edit_' . str_replace( '-', '_', $name ) . '_per_page';
|
||||||
|
}
|
||||||
|
if ( $meta_keys ) {
|
||||||
|
$meta_keys = implode( "', '", $meta_keys );
|
||||||
|
$wpdb->query( "DELETE FROM $wpdb->usermeta WHERE meta_key IN ('$meta_keys')" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -11,7 +11,7 @@ $wp_version = '3.5-alpha-21751';
|
||||||
*
|
*
|
||||||
* @global int $wp_db_version
|
* @global int $wp_db_version
|
||||||
*/
|
*/
|
||||||
$wp_db_version = 21804;
|
$wp_db_version = 21811;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the TinyMCE version
|
* Holds the TinyMCE version
|
||||||
|
|
Loading…
Reference in New Issue