mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-27 01:38:35 +00:00
Automattically deactivate Automattic Widgets, if activated. see #4169
git-svn-id: http://svn.automattic.com/wordpress/branches/2.2@5344 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4143d41188
commit
79bfe4e9d0
@ -175,6 +175,8 @@ function upgrade_all() {
|
||||
upgrade_110();
|
||||
upgrade_130();
|
||||
}
|
||||
|
||||
maybe_disable_automattic_widgets();
|
||||
|
||||
if ( $wp_current_db_version < 3308 )
|
||||
upgrade_160();
|
||||
@ -1099,4 +1101,13 @@ function wp_check_mysql_version() {
|
||||
die(sprintf(__('<strong>ERROR</strong>: WordPress %s requires MySQL 4.0.0 or higher'), $wp_version));
|
||||
}
|
||||
|
||||
?>
|
||||
function maybe_disable_automattic_widgets() {
|
||||
$plugins = __get_option( 'active_plugins' );
|
||||
|
||||
if ( in_array( 'widgets/widgets.php', $plugins ) ) {
|
||||
array_splice( $plugins, array_search( 'widgets/widgets.php', $plugins ), 1 );
|
||||
update_option( 'active_plugins', $plugins );
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user