do_action( 'dynamic_sidebar', array $widget )

Fires before a widget’s display callback is called.


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.


Top ↑

Parameters

$widget array
An associative array of widget arguments.
  • namestring
    Name of the widget.
  • idstring
    Widget ID.
  • callbackcallable
    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.
  • paramsarray
    An associative array of multi-widget arguments.
  • classnamestring
    CSS class applied to the widget container.
  • descriptionstring
    The widget description.
  • _callbackarray
    When the hook is fired on the back end, $_callback is populated with an array containing the widget object, see $callback.

Top ↑

Source

File: wp-includes/widgets.php. View all references

do_action( 'dynamic_sidebar', $wp_registered_widgets[ $id ] );


Top ↑

Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.