Action hook 'dynamic_sidebar'

in WP Core File wp-includes/widgets.php at line 842

Description

Fires before a widget's display callback is called. 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. containing the widget object. Fired on the back end, `$callback` is 'wp_widget_control', see `$_callback`. with an array containing the widget object, see `$callback`. }

Occurrences

Filename Line Number
wp-includes/widgets.php 842
wp-includes/widgets.php 2038

Parameters

Type Name Description
array $widget { An associative array of widget arguments.

PHP Doc

/**
		 * Fires before a widget's display callback is called.
		 *
		 * 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.
		 *
		 * @since 3.0.0
		 *
		 * @param array $widget {
		 *     An associative array of widget arguments.
		 *
		 *     @type string   $name        Name of the widget.
		 *     @type string   $id          Widget ID.
		 *     @type callable $callback    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`.
		 *     @type array    $params      An associative array of multi-widget arguments.
		 *     @type string   $classname   CSS class applied to the widget container.
		 *     @type string   $description The widget description.
		 *     @type array    $_callback   When the hook is fired on the back end, `$_callback` is populated
		 *                                 with an array containing the widget object, see `$callback`.
		 * }
		 */