WP_Widget
class WP_Widget
// Constructor: function Object() { [native code] } Core base class extended to register widgets.
Methods 19 methods
| Method / Return | Description |
|---|---|
| widget() void | Echoes the widget content.
Parameters: $args: mixed, $instance: mixed |
| update() array | Updates a particular instance of a widget.
Parameters: $new_instance: mixed, $old_instance: mixed |
| form() (string | Outputs the settings update form.
Parameters: $instance: mixed |
| __construct() void | PHP5 constructor.
Parameters: $id_base: mixed, $name: mixed, $widget_options: mixed, $control_options: mixed |
| WP_Widget() void | PHP4 constructor.
Parameters: $id_base: mixed, $name: mixed, $widget_options: mixed, $control_options: mixed |
| get_field_name() string | Constructs name attributes for use in form() fields
Parameters: $field_name: mixed |
| get_field_id() string | Constructs id attributes for use in WP_Widget::form() fields.
Parameters: $field_name: mixed |
| _register() void | Register all widget instances of this widget class. |
| _set() void | Sets the internal order number for the widget instance.
Parameters: $number: mixed |
| _get_display_callback() callable | Retrieves the widget display callback. |
| _get_update_callback() callable | Retrieves the widget update callback. |
| _get_form_callback() callable | Retrieves the form callback. |
| is_preview() bool | Determines whether the current request is inside the Customizer preview. |
| display_callback() void | Generates the actual widget content (Do NOT override).
Parameters: $args: mixed, $widget_args: mixed |
| update_callback() void | Handles changed settings (Do NOT override).
Parameters: $deprecated: mixed |
| form_callback() (string | Generates the widget control form (Do NOT override).
Parameters: $widget_args: mixed |
| _register_one() void | Registers an instance of the widget class.
Parameters: $number: mixed |
| save_settings() void | Saves the settings for all instances of the widget class.
Parameters: $settings: mixed |
| get_settings() array | Retrieves the settings for all instances of the widget class. |
Properties
| Property / Type | Description |
|---|---|
| $id_base mixed public | No description available. |
| $name mixed public | No description available. |
| $option_name mixed public | No description available. |
| $alt_option_name mixed public | No description available. |
| $widget_options mixed public | No description available. |
| $control_options mixed public | No description available. |
| $number mixed public | No description available. |
| $id mixed public | No description available. |
| $updated mixed public | No description available. |