the_widget WordPress Action Hook

The the_widget hook allows you to display a widget in your WordPress theme. This hook is typically used in the sidebar or footer of a theme.

do_action( 'the_widget', string $widget, array $instance, array $args ) #

Fires before rendering the requested widget.


Parameters

$widget

(string)The widget's class name.

$instance

(array)The current widget instance's settings.

$args

(array)An array of the widget's sidebar arguments.


Top ↑

Source

File: wp-includes/widgets.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.0.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.