Title: widget_display_callback
Published: April 25, 2014
Last modified: April 28, 2025

---

# apply_filters( ‘widget_display_callback’, array $instance, WP_Widget $widget, array $args )

## In this article

 * [Description](https://developer.wordpress.org/reference/hooks/widget_display_callback/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/hooks/widget_display_callback/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/widget_display_callback/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/widget_display_callback/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/widget_display_callback/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/widget_display_callback/?output_format=md#wp--skip-link--target)

Filters the settings for a particular widget instance.

## 󠀁[Description](https://developer.wordpress.org/reference/hooks/widget_display_callback/?output_format=md#description)󠁿

Returning false will effectively short-circuit display of the widget.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/widget_display_callback/?output_format=md#parameters)󠁿

 `$instance`array

The current widget instance’s settings.

`$widget`[WP_Widget](https://developer.wordpress.org/reference/classes/wp_widget/)

The current widget instance.

`$args`array

An array of default widget arguments.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/widget_display_callback/?output_format=md#source)󠁿

    ```php
    $instance = apply_filters( 'widget_display_callback', $instance, $this, $args );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-widget.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/class-wp-widget.php#L383)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/class-wp-widget.php#L383-L383)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/widget_display_callback/?output_format=md#related)󠁿

| Used by | Description | 
| [WP_Widget::display_callback()](https://developer.wordpress.org/reference/classes/wp_widget/display_callback/)`wp-includes/class-wp-widget.php` |

Generates the actual widget content (Do NOT override).

  | 
| [the_widget()](https://developer.wordpress.org/reference/functions/the_widget/)`wp-includes/widgets.php` |

Outputs an arbitrary widget as a template tag.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/widget_display_callback/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.8.0](https://developer.wordpress.org/reference/since/2.8.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fwidget_display_callback%2F)
before being able to contribute a note or feedback.