apply_filters( 'dynamic_sidebar_params', array $params )
- Since
- 2.5.0
Filters the parameters passed to a widget's display callback.
Description
Note: The filter is evaluated on both the front end and back end, including for the Inactive Widgets sidebar on the Widgets screen.
Compatibility
- WordPress
- since 2.5.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$paramsarray- { @type array $args { An array of widget display arguments.
@type string $name Name of the sidebar the widget is assigned to.
@type string $id ID of the sidebar the widget is assigned to.
@type string $description The sidebar description.
@type string $class CSS class applied to the sidebar container.
@type string $before_widget HTML markup to prepend to each widget in the sidebar.
@type string $after_widget HTML markup to append to each widget in the sidebar.
@type string $before_title HTML markup to prepend to the widget title when displayed.
@type string $after_title HTML markup to append to the widget title when displayed.
@type string $widget_id ID of the widget.
@type string $widget_name Name of the widget.
} @type array $widget_args { An array of multi-widget arguments.
@type int $number Number increment used for multiples of the same widget.
} }$namestringName of the sidebar the widget is assigned to.$idstringID of the sidebar the widget is assigned to.$descriptionstringThe sidebar description.$classstringCSS class applied to the sidebar container.$before_widgetstringHTML markup to prepend to each widget in the sidebar.$after_widgetstringHTML markup to append to each widget in the sidebar.$before_titlestringHTML markup to prepend to the widget title when displayed.$after_titlestringHTML markup to append to the widget title when displayed.$widget_idstringID of the widget.$widget_namestringName of the widget. } @type array $widget_args { An array of multi-widget arguments.$numberintNumber increment used for multiples of the same widget.
Where this hook fires · 2
wp-includes/widgets.php:815dynamic_sidebar()wp-includes/widgets.php:2047wp_render_widget()
Source code
* An array of multi-widget arguments. * * @type int $number Number increment used for multiples of the same widget. * } * } */ $params = apply_filters( 'dynamic_sidebar_params', $params ); $callback = $wp_registered_widgets[ $id ]['callback']; /** * Fires before a widget's display callback is called. *Changelog
Introduced in 2.5.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.