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



unregister_widget ›

Since2.8.0
已弃用n/a
unregister_widget ( $widget )
参数:
  • (string|WP_Widget) $widget Either the name of a `WP_Widget` subclass or an instance of a `WP_Widget` subclass.
    Required: Yes
查看:
  • WP_Widget
定义在:
文档:
Change Log:
  • 4.6.0

Unregisters a widget.

Unregisters a WP_Widget widget. Useful for un-registering default widgets. Run within a function hooked to the {@see 'widgets_init'} action.



源码

function unregister_widget( $widget ) {
	global $wp_widget_factory;

	$wp_widget_factory->unregister( $widget );
}