dynamic_sidebar_params WordPress Filter Hook

The dynamic_sidebar_params hook is used to pass parameters to the dynamic_sidebar() function. This hook is used to give themes control over the number of widgets that are displayed in a sidebar.

apply_filters( 'dynamic_sidebar_params', array $params ) #

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.

Top ↑

See also


Top ↑

Parameters

$params

(array)

  • 'args'
    (array) An array of widget display arguments.
    • 'name'
      (string) Name of the sidebar the widget is assigned to.
    • 'id'
      (string) ID of the sidebar the widget is assigned to.
    • 'description'
      (string) The sidebar description.
    • 'class'
      (string) CSS class applied to the sidebar container.
    • 'before_widget'
      (string) HTML markup to prepend to each widget in the sidebar.
    • 'after_widget'
      (string) HTML markup to append to each widget in the sidebar.
    • 'before_title'
      (string) HTML markup to prepend to the widget title when displayed.
    • 'after_title'
      (string) HTML markup to append to the widget title when displayed.
    • 'widget_id'
      (string) ID of the widget.
    • 'widget_name'
      (string) Name of the widget.
  • 'widget_args'
    (array) An array of multi-widget arguments.
    • 'number'
      (int) Number increment used for multiples of the same widget.


Top ↑

Source

File: wp-includes/widgets.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.