WordPress开发者和主题制作者的搜索引擎



maybe_disable_automattic_widgets ›

Since2.2.0
已弃用n/a
maybe_disable_automattic_widgets ( 没有参数 )
定义在:
文档:

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



源码

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