WordPress at a glance
function is not described

maybe_disable_automattic_widgets() WP 2.2.0

Disables the Automattic widgets plugin, which was merged into core.

No Hooks.

Return

Nothing (null).

Usage

maybe_disable_automattic_widgets();

Code of maybe disable automattic widgets: wp-admin/includes/upgrade.php VER 5.0.3

<?php
function maybe_disable_automattic_widgets() {
	$plugins = __get_option( 'active_plugins' );

	foreach ( (array) $plugins as $plugin ) {
		if ( basename( $plugin ) == 'widgets.php' ) {
			array_splice( $plugins, array_search( $plugin, $plugins ), 1 );
			update_option( 'active_plugins', $plugins );
			break;
		}
	}
}