WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp register widget control

Description

Registers widget control callback for customizing options.

The options contains the height, width, and id_base keys. The height option is never used. The width option is the width of the fully expanded control form, but try hard to use the default width. The id_base is for multi-widgets (widgets which allow multiple instances such as the text widget), an id_base must be provided. The widget id will end up looking like {$id_base}-{$unique_number}.

Parameters

$id
(integer | string) (required) Sidebar ID.
Default: None
$name
(string) (required) Sidebar display name.
Default: None
$control_callback
(callback) (required) Run when sidebar is displayed.
Default: None
$options
(array | string) (optional) Widget options. See above long description.
Default: array()

Note: Additional parameters may be passed to add to the widget.

Change Log

Since: 2.2.0

Source File

wp_register_widget_control() is located in wp-includes/widgets.php

Related

Widgets: is_active_widget(), the_widget(), register_widget(), unregister_widget(), wp_register_widget_control(), wp_unregister_widget_control(), wp_convert_widget_settings(), wp_get_widget_defaults(), wp_widget_description()

See also index of Function Reference and index of Template Tags.