A WordPress-centric search engine for devs and theme authors



maybe_disable_automattic_widgets ›

Since2.2.0
Deprecatedn/a
maybe_disable_automattic_widgets ( No parameters )
Defined at:
Codex:

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



Source

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;
		}
	}
}