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.
See also
Parameters
$paramsarrayargsarrayAn array of widget display arguments.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.
widget_argsarrayAn array of multi-widget arguments.numberintNumber increment used for multiples of the same widget.
Source
$params = apply_filters( 'dynamic_sidebar_params', $params );
Changelog
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |
Firstly we create a custom widget field end of the each widgets control form.
Now, we filter widget’s settings before saving. It will save our custom field
columndata.Finally, filter sidebar params for frontend. It will add class to
before_widgetfromcolumnfield