wppaste
WordPress

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.
} }
  • $namestring

    Name of the sidebar the widget is assigned to.
  • $idstring

    ID of the sidebar the widget is assigned to.
  • $descriptionstring

    The sidebar description.
  • $classstring

    CSS class applied to the sidebar container.
  • $before_widgetstring

    HTML markup to prepend to each widget in the sidebar.
  • $after_widgetstring

    HTML markup to append to each widget in the sidebar.
  • $before_titlestring

    HTML markup to prepend to the widget title when displayed.
  • $after_titlestring

    HTML markup to append to the widget title when displayed.
  • $widget_idstring

    ID of the widget.
  • $widget_namestring

    Name of the widget. } @type array $widget_args { An array of multi-widget arguments.
  • $numberint

    Number increment used for multiples of the same widget.

Where this hook fires · 2

  • wp-includes/widgets.php:813dynamic_sidebar()
  • wp-includes/widgets.php:2031wp_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.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.8.8 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.