Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_unregister_sidebar_widget ›

Da2.2.0
Deprecaton/a
wp_unregister_sidebar_widget ( $id )
Parametri:
  • (int|string) $id Widget ID.
    Richiesto:
Definito a:
Codex:

Remove widget from sidebar.



Sorgenti

function wp_unregister_sidebar_widget( $id ) {

	/**
	 * Fires just before a widget is removed from a sidebar.
	 *
	 * @since 3.0.0
	 *
	 * @param int $id The widget ID.
	 */
	do_action( 'wp_unregister_sidebar_widget', $id );

	wp_register_sidebar_widget( $id, '', '' );
	wp_unregister_widget_control( $id );
}