do_action( 'dynamic_sidebar', array $widget_id )
Fires before a widget’s display callback is called.
Description Description
Note: The action fires on both the front end and back end, including for widgets in the Inactive Widgets sidebar on the Widgets screen.
The action is not fired for empty sidebars.
Parameters Parameters
- $widget_id
-
(array) An associative array of widget arguments.
- 'name'
(string) Name of the widget. - 'id'
(string) Widget ID. - 'callback'
(array|callable) When the hook is fired on the front end, $callback is an array containing the widget object. Fired on the back end, $callback is 'wp_widget_control', see $_callback. - 'params'
(array) An associative array of multi-widget arguments. - 'classname'
(string) CSS class applied to the widget container. - 'description'
(string) The widget description. - '_callback'
(array) When the hook is fired on the back end, $_callback is populated with an array containing the widget object, see $callback.
- 'name'
Source Source
File: wp-includes/widgets.php
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |